Skip to main content
GameDev.net gamedev.net
🔒 Locked

Phun - a 2D physics playground

Started by emilk Feb 13, 2008 at 2:12 PM 143 replies 110k views
Original Post
emilk
emilk
Phun is an application for creating 2D simulations of physics. It has a cartoony feel to it and is simple and fun to use! Check out this video to see what it's all about:
">
I have been developing Phun for the past six months as my Master of Science thesis, and now it's time to reveal it to the public. Phun is completely cross-platform, it's written in C++ and uses OpenGL for rendering. It also uses SDL (for window management and input), SDL_image (for reading images), GLEW (for OpenGL extension management), boost and boost_filesystem. I use no external physics engine or GUI library. Download Phun here: www.acc.umu.se/~emilk/ (Windows and Linux, soon MacOS) The program is still in Beta, so expect it to crash at least once for you. But don't worry, it has autosave. If you don't trust the autosave, just use ctrl-s a lot. Please let me know what you think of it! - Emil Ernerfeldt Update: I just released beta 3. Hopefully this will run on more computers. [Edited by - emilk on February 19, 2008 6:11:33 PM]
owl
owl
The name is perfect! Very cool.
[size="2"]I like the Walrus best.
Zakwayda
Zakwayda
That's great - amazing physics, and a very cool interface.

Congrats! :)
Sijmen
Sijmen
Looks phun! Bookmarked for the upcoming OS X version. Looking forward to trying it out.
fd9_
fd9_
Quote:
Original post by emilk
I use no external physics engine or GUI library.


After watching the video, I'm amazed that you did all of that yourself! That's quite impressive. Have you thought about releasing your own physics library or GUI library?

The game crashes for me at startup. The logfile says:

15:11:50: Application created15:11:50: Parsing autoexec.cfg...15:11:50: Creating window...15:11:50: Destroying GL resources15:11:51: Loading all resources...15:11:51: Destroying GL resources15:11:51: Creating GL resources15:11:51: Reloading class rendering::Texture15:11:51: Reloading class rendering::Shader


And the last line in the console window says "Creating window..."
Boder
Boder
Man, I'm really looking forward to this. I've just been exploring this field.

You do know that the vc_redist files are taking up 5 megs out of your 7 meg download?
BeanDog
BeanDog
I am very impressed. Not only does it work smoothly and as advertised, but it's actually fun :-) I can see this being used in a sort of suped-up Incredible Machine type game.
jonahrowley
jonahrowley
This is simply amazing. This is the best 2d physics demo I've ever seen.

You've put tons of work into this and it really shows. I'll have quite a bit of fun playing with this, and I look forward to (hopefully) new versions in the future.
Kelly G
Kelly G
That is awesome. I wish my masters thesis was that "phun"!
emilk
emilk
Thanks for all the great replies, glad you like it!

Quote:
Original post by fd9_
After watching the video, I'm amazed that you did all of that yourself! That's quite impressive. Have you thought about releasing your own physics library or GUI library?


Thank you! Exactly how Phun and it's parts will finally be released is not yet decided. For now I'm just gonna continue to add cool features.

Quote:

The game crashes for me at startup. The logfile says:

15:11:51: Reloading class rendering::Shader


I should have warned you that the program may crash at times (and now I do). Sometimes at startup - sometimes just out of spite.

In your case, problem loading a shader could simply mean you need new graphics drivers (or worse, hardware). But it could also be some strange coding from my part, I'll look it over until the next beta.

__ODIN__
__ODIN__
Very cool!

For the water, it's just simulated with Spheres with low friction and low restitution, or is there something more complex going on there?

Allan
Boder
Boder
Did this kind of thing exist before crayon physics?
Why did you decide to make your own GUI?
Have you used or looked at open source physics libraries?
jonahrowley
jonahrowley
One thing I've wondered about these simulations is why they're not simulated exactly the same way every time? If I load a scene like towerkill hit start, undo the start and hit start again, the blocks won't fall in the same way twice.
Moe
Moe
That looks pretty dang amazing!
Dancin_Fool
Dancin_Fool
Quote:
Original post by jonahrowley
One thing I've wondered about these simulations is why they're not simulated exactly the same way every time? If I load a scene like towerkill hit start, undo the start and hit start again, the blocks won't fall in the same way twice.


One thing it can be is if the solver doesn't use a constant time step, it could cause different results in the calculations.
leiavoia
leiavoia
awesome. the video made me laugh! the GUI alone would take weeks or months to program and you've got those cool window animation fx to go with it. kudos!

will there be code made available?
Entropai
Entropai
Wow, this looks really promising, like virtual sandbox with physics (feel like kid again :D). I liked the water most although it quickly slows down the simulation, do you use GPU for calculating the physics?

This reminds me of an old game idea i had back in 2002. Physics puzzle game where player(s) would face problems that they need to solve by using various physical pheneoms such as (much simplified) thermodynamics, material properties, fluid dynamics and traditional rigid bodies. The more ridicilious contraptions&combinations they would produce the more points they would earn from solving the problem. Like someone said earlier suped-up TIM.

But for masters thesis i hope you'll get the good ratings which this kind creativity deserves.
Intellect
Intellect
Kudos. Thats one fine demo. Amazing work.
RamboPowPow
RamboPowPow
The video was very impressive !

It didn't work on my computer though, i suppose it's because my 3d card doesn't support shaders. (same error as fd9_)





Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.