Verlet 2d - proof of concept

Community Forums/Showcase/Verlet 2d - proof of concept

Stevie G(Posted 2007) [#1]
Hello,

I've been working on this engine for a few months now when I've found the time. It's at a stage where I'd like to show a demo.









The engine is verlet integration based and quite versatile as you can see by some of the objects. The collision engine is ok and could do with some improvement. Some objects get stuck in others but are easy enough to free ( actually I quite like it ). What I'm most happy about is the ragdolls and physics based emergent behaviour.

The basic idea is that you control a ragdoll and throw stuff at other ragdolls using something similar to the 'force'. Hold leftmouse button over an object to grab and drag it towards the cursor. You can only grab most objects at their centers ( neck and hip for ragdolls ). The force can only be used on objects within your 'force' radius. At the moment the only objects which do damage are the mines and you only control the yellow guy who is indestructable .

I have a pretty good idea where I'm going with this one but feel free to suggest anything. All feedback welcome. Please also report FPS, which is limited to 50fps btw.

OBJECTS
=====================
Ragdoll
Spider
Bird
Worm
Hamster Ball
Crate
Sack
Wrecking ball
Rope Bridge
Cart
Mine
Vine
Palm Tree
Grass

CONTROLS
=====================
LM = Grab/Pull
RM = Explosion test
Mouse = Move cursor
SPACE = Reset Game
=====================

http://www.steviegoodwin.plus.com/TD.zip

Short Video
http://www.youtube.com/watch?v=jBe5JOhszzw#GU5U2spHI_4

Cheers
Stevie


Pete Carter(Posted 2007) [#2]
amazing work mate love it.


tonyg(Posted 2007) [#3]
It'd make an great Spiderman game


Pinete(Posted 2007) [#4]
wow!
its impressive!
what library has you used? verlet2D? where could I find this?

thanks in advance!


big10p(Posted 2007) [#5]
Neat. It's bit slow-mo on my machine, tho - only get ~20FPS.


Stevie G(Posted 2007) [#6]
Thanks folks.


where could I find this?


Unfortunately, only on my hard drive ;)


Stevie G(Posted 2007) [#7]
@ big10p - it's a bit of a stress test. you want another version with less going on?


big10p(Posted 2007) [#8]
S'ok, mate - no need to go to any trouble. My PC is hideously out-of-date so the fault is at my end, really. ;)


Who was John Galt?(Posted 2007) [#9]
Tremendous stuff, Steve. I really like the creatures. They're so... organic. The gfx remind me of a scene from the Disney classic 'The Black Hole.'


caff_(Posted 2007) [#10]
Class! Fun. You've really gotta release a game with some of this verlet stuff.


Madcap13(Posted 2007) [#11]
That's some great stuff. It runs about 13 fps on this lump of junk I'm using but considering that it's a pretty large scene I'd forgive that.

I seems I code on a crappier comp than big10p. :)

seriously though this is awesome. It's the sort of thing I've always wanted to write but never had a good enough reason to.


taumel(Posted 2007) [#12]
Looks very nice! I like the art and it looks like a cool engine. Only thing i would have to moan about is that from the video (there isn't a mac version?) i can't feel where the fun is coming from after you found out how the objects interact. This for sure takes a lot of level design & testing...


clownhunter(Posted 2007) [#13]
This is amazing. Great work. I spent probably 10 minutes flinging that bomb into people and the creatures exploding them. :D I was also surprised that I was getting 40-50fps on my laptop because it's pretty bad as well.


Torrente(Posted 2007) [#14]
Any chance of this being released or sold? I would love an engine like this.


Stevie G(Posted 2007) [#15]
Thanks for the comments folks - I've had a 6 month lull in programming motivation but I feel rejuvinated again!


i can't feel where the fun is coming from after you found out how the objects interact. This for sure takes a lot of level design & testing...



I have a clear idea with what type of game I'm making with the engine. It will be simple ( so that I can finish it ) and fun ( so that me and the mates can be arsed testing it ) I can assure you.


Any chance of this being released or sold? I would love an engine like this.



It's definately worth thinking about when this game is complete. A probable issue is that it's 2d in 3d and the landscape is actually a mesh so these would have to be created by the user, rather than support collision with 2d images.

Stevie


Zenith(Posted 2007) [#16]
Amazing atmosphere Stevie, beautiful! :)


Barliesque(Posted 2007) [#17]
That's a terrific demo! Concept proven!

And the concept is superb. It reminds me a bit of the original 2D Worms, but without turn-based gameplay. ...How about borrowing the idea of explosions that gouge away some of the landscape?

I also thought at first that the grass was 'sticky' but realised it wasn't--so there's an idea: Make the vegetation sticky, and therefore dangerous if you get stuck in it (not permanently, of course).


Stevie G(Posted 2007) [#18]
Thanks! :)

I'm almost done with the game play - it is a bit like worms but there's a wee bit more skill and strategy involved!



Stevie


ImaginaryHuman(Posted 2007) [#19]
I had a play with it, seems pretty nice, interesting physics stuff, but I found the camera constantly going in and out a little bit offputting.


Stevie G(Posted 2007) [#20]
Yeah, the camera annoyed me too so it's much improved now.


Stevie G(Posted 2007) [#21]
Quick video update:

Stacking
Pirahnas
Kicking
Fans



http://www.youtube.com/watch?v=FCDPC8F1KI8

p.s. If you fancy doing a bit of beta testing send me an e-mail to StevieATStevieGoodwinDOTplusDOTcom.


mkg(Posted 2007) [#22]
Really nice work. Just had a quick play with the demo and it's great. Interested to see what kind of game emerges. Ran fine on my AMD 64 3200 with XP and a decent but not fab graphics card.


Trader3564(Posted 2007) [#23]
looks cool.

b.t.w. i poped against this vid: http://www.youtube.com/watch?v=7YDWGCbfiJ0&mode=related&search=
^^ (really funny with the music)


Stevie G(Posted 2007) [#24]
Thanks folks. The gameplay is fully working now. I had a long session with a few mates last weekend - the emergent physics gameplay was hilarious. It needs a bit of balancing and a few more objects. An electric heater is now in - you can throw it in the water and electricute those nearby :) Also, added a shark ( needs a bit of work ).



Been working on a GUI system for the game and editors all week ( nothing fancy but does it's job ) - what a chore :( !!!



The main issue for me now is sound / music. If anyone fancies helping out please e-mail me to discuss.

Stevie


Matt Merkulov(Posted 2007) [#25]
Very impressive and interesting. Thanks for showing it.

Are you planning to replace these black figures with images? That will improve look of the game drastically and make it eye-candy, IMO.

I suggest adding some sprite particles and breakability for all objects. And it will be cool if objects (and brilliant if objects' parts) could resist damage differently (some are hard to break, some is easy to).

UPD: And I recommend switching to BlitzMax - speed, flexibility and powerful 2D engine worth this.


Stevie G(Posted 2007) [#26]

Are you planning to replace these black figures with images? That will improve look of the game drastically and make it eye-candy, IMO



I like the silouette look so it's there to stay I'm afraid. I'm sick of saying it but graphics don't make a game. To me the gameplay is most important.


I suggest adding some sprite particles and breakability for all objects. And it will be cool if objects (and brilliant if objects' parts) could resist damage differently (some are hard to break, some is easy to).



There are already loads of particle effects in the current version. Breaking objects is definately happening and I already have an armour factor which effects the amount of damage an object can resist before breaking up.


UPD: And I recommend switching to BlitzMax - speed, flexibility and powerful 2D engine worth this.



It aint gonna happen in the short term. Maybe some day but I don't have the time to convert everything into Max. My 3d in 3d engine is plenty fast enough for now and I doubt it'd be any faster in Max if you bear in mind I'm using B3d's native collision system which will be faster than creating my own suite of intersection funcitons.

Stevie


Matt Merkulov(Posted 2007) [#27]
graphics don't make a game

But it's very important part of the game, anyway (gameplay and concept are much more important, I agree). Though, you seems to make a kind of own style like Eric Chahi did in his brilliant "Out Of This World/Another World".
There are already loads of particle effects in the current version.

I have seen only quadrats, is it all?
I'm using B3d's native collision system which will be faster than creating my own suite of intersection funcitons

It's intended for 3d collisions, so it's possible to make (or borrow) 2D collision system which will be much faster, as it focused on 2D world. Though, it will take some time (maybe a lot of) to implement it in your project, so never mind.


Yahfree(Posted 2007) [#28]
So those are Meshs with solid black textures? interesting.. how does that work if you don't mine me asking? i'm just a interested noob, i love physic games, its fun playing with objects ect.


Stevie G(Posted 2007) [#29]

I have seen only quadrats, is it all?


For now yes, they will obviously be improved but they serve their purpose for now. It's all about priority and particle effects, while important are not top of the list right now.


It's intended for 3d collisions, so it's possible to make (or borrow) 2D collision system which will be much faster, as it focused on 2D world. Though, it will take some time (maybe a lot of) to implement it in your project, so never mind.



I'm only using Blitz collisions for pointmass --> landscape collisions to prevent penetration. Each object is a collection of 3d pivots with a collision radius.



All object --> object collisions are handled myself. I have experimented with line / sphere intersection so I can assure you that what I'm doing is fastest and most robust.

Basically, everything you see is a mesh. All the objects are made from textured single surface quads. The landscape is a full 3d mesh but only intersections on the x/y plane need to be done. Here's a screenshot of the quick level editor I threw together months ago. Only the blue polys are used for collisions and even on a bigger, more complex level there are never more than a few thousand which is plenty fast.



Stevie


Buggy(Posted 2007) [#30]
Umm... pardon me, but what exactly is a quad?


Stevie G(Posted 2007) [#31]
A quad is mesh which has 4 vertices & 2 triangles in the shape of a rectangle/ square. It's similar to a sprite but with more control.

This is what one of the ragdolls looks like in wireframe ..




Yahfree(Posted 2007) [#32]
thats very nice, how do you go about controlling so it only checks collisions on a X/Y axis? very clever about putting a number of pivots w/ their own collisions for a detailed collision/ragdoll thing..

Also is there any physics lib involved? or are you using your own methods for the push/pull bring it to life effect?


Stevie G(Posted 2007) [#33]

thats very nice, how do you go about controlling so it only checks collisions on a X/Y axis?



I just separate the blue part of the mesh from the black part and have collisions on the blue only. As you can see there are no poly's facing in the z direction - hence collision checking will only be done on the xy plane.


Also is there any physics lib involved? or are you using your own methods for the push/pull bring it to life effect?



No libs - all my own work.


_33(Posted 2007) [#34]
Are you plotting directly to the graphics card and use RenderStates? How can you obtain pixel precision in 3D?

Thanks.


Stevie G(Posted 2007) [#35]

Are you plotting directly to the graphics card and use RenderStates? How can you obtain pixel precision in 3D?



Not touching renderstates - the objects are not rendered pixel perfectly though. It's impossible due to the zooming etc. The GUI system above is pixel perfect and is actually pretty easy to do.

See here ( you'll need your own "Cursor" texture )




_33(Posted 2007) [#36]
Seems to work in all resolutions. Good show! Pixel perfect 2D over a 3D scene in all simplicity, that's just what I wanted.

EDIT: BTW I noticed that depending on how or where the 2D image is drawn, I get to see the triangles that make up the 3D shape. Is there a workaround for this?

Cheers.


McSeb(Posted 2007) [#37]
I love the creepy shadow puppet effect, don't touch the graphics.

I'm really wondering how your gonna make a game out of it.


Yahfree(Posted 2007) [#38]
"I'm really wondering how your gonna make a game out of it."

its already a game imo, i personaly love these Physics/Ragdoll/Throw stuff around games...

it needs more GUI ect, some polishing options, and your good to go imo


McSeb(Posted 2007) [#39]
@Yahfree: I know, I know, I had lots of fun with it and was very impressed, but I showed it to a few friend who know nothing about programming and they said "so what ?" and quit after 30 secs.

I'm just saying what kind of objectives can you put in and what kind of game you can make with it.


Stevie G(Posted 2007) [#40]

EDIT: BTW I noticed that depending on how or where the 2D image is drawn, I get to see the triangles that make up the 3D shape. Is there a workaround for this?



Not sure what you mean - got a screenshot?


I love the creepy shadow puppet effect, don't touch the graphics



Thank you - someone who appreciates the look I'm going for!


"I'm really wondering how your gonna make a game out of it."

its already a game imo, i personaly love these Physics/Ragdoll/Throw stuff around games...

it needs more GUI ect, some polishing options, and your good to go imo



Me and some mates played it for 3 hours after the pub the other night - best fun I've had playing a game in ages!! There's alot of emergent strategy involved .. e.g. Smack someone hard enough with the ball and their foot will get stuck inside. If you then carefully drop it in the water they'll get dragged under and may drown or get torn appart by pirhana's by the time they get another shot. It can get very brutal - which is nice!


@Yahfree: I know, I know, I had lots of fun with it and was very impressed, but I showed it to a few friend who know nothing about programming and they said "so what ?" and quit after 30 secs.



Rember that demo is only a proof of concept. Sadly, some people won't play or enjoy a game which doesn't have photo realistic graphics. Such is life!


Yahfree(Posted 2007) [#41]
Its just a type of game: Physics, i love physics games, some don't, i don't like puzzle games, some do.. its just a matter of what you like and what you don't.. my friends loved it, some things i'd like to see, is online play mabye, where the object is to destroy the other player by drowning him, or throwing objects at him ect..


wedoe(Posted 2007) [#42]
Really cool stuff, keep it up :o)


Stevie G(Posted 2007) [#43]
Thanks Mate - still on it! Still working on the GUI .. pah .. boring as feck!!! ;)


Buggy(Posted 2007) [#44]
So what gives a quad more control than a sprite? Does it hog more memory (of course it does!)? Is it native to Blitz, do you need libraries, or does it count as any other mesh?


Geehawk(Posted 2007) [#45]
This would make a great DS game.


AltanilConard(Posted 2007) [#46]
It's awesome, the style, the gameplay, everything fits togeteher pefectly. Great game, cheers!


Stevie G(Posted 2007) [#47]
Thanks folks.

Here's the GUI so far .... almost there.