• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
venture

2D Physics Engine for Mining Game

9 posts in this topic

Just curious about something. This would be for a project I would be starting in, at the bare minimum, 1.5 years(after I've experimented with programming and am sufficiently comfortable with it. So, no, I'm not planning on jumping into a complex project initially :wink:)



I was wondering if there was a 2D physics engine available that would be able to handle a mining game.

Essentially, 2D, "Minecraft-esque" but not based around blocks. Using a pickaxe, drill or other tool would dislodge and fragment earth, stone etc. which could then be placed by the player. Dropping a handful of dirt would cause it to fall and spread like, well, dirt.

Players would also have to reinforce their tunnels to prevent a collapse, and would have to process stone chunks into, for example, brick before they would be able to build.

Ideally, it would also be able to handle things like rock slides, pressurized oil underground and other such things.


Does a physics engine exist that will be able to do this? If one does not, I will either have to seriously re-think or scrap this project, as creating my own engine would be a monumental undertaking of which I will likely never be ready for.
0

Share this post


Link to post
Share on other sites
What programming language are you considering? See if there's a version of Box2D for it. Box2D is a great physics engine that is free, open-source, and pretty easy to figure out if you understand basic physics concepts.
0

Share this post


Link to post
Share on other sites
C++, if that matters.


I've done a bit of research, and was currently planning on going with Farseer, which appears to be based on Box 2D. I was just wondering if:
A. It has the capabilities I need(from what you are saying, it appears it does)
and
B. If there were any other engines I have missed.
0

Share this post


Link to post
Share on other sites
Chipmunk physics is a great 2D physics library. It out performs Box2D. Box2D has been out longer, so it's more well known, but I'd check out [url="http://code.google.com/p/chipmunk-physics/"]Chipmunk Physics[/url]
0

Share this post


Link to post
Share on other sites
I don't know anything about Chipmunk, but Box2D (and similar) libraries typically model rigid bodies. What you seem to be talking about are fluid dynamics, which AFAIK much more complex and processor hungry. The large worlds of Minecraft and Terraria depend on simplifying things by basing everything on cells (blocks), greatly simplifying physics, and even then need to be optimized. [url="http://www.gamasutra.com/view/feature/6367/an_intro_to_cellular_automation.php"]Here[/url] is an article about the use of cellular automata in these types of games, if you are interested.
1

Share this post


Link to post
Share on other sites
[quote name='laztrezort' timestamp='1314074624' post='4852647']
I don't know anything about Chipmunk, but Box2D (and similar) libraries typically model rigid bodies. What you seem to be talking about are fluid dynamics, which AFAIK much more complex and processor hungry. The large worlds of Minecraft and Terraria depend on simplifying things by basing everything on cells (blocks), greatly simplifying physics, and even then need to be optimized. [url="http://www.gamasutra.com/view/feature/6367/an_intro_to_cellular_automation.php"]Here[/url] is an article about the use of cellular automata in these types of games, if you are interested.
[/quote]

Chipmunk is based on Box2D to my knowledge. Thank you for that article- reading it currently.

I still have a lot to grasp and figure out about this whole process but: to your knowledge, can what I desire be handled? And if not, could I replicate it, perhaps by scaling down the size of cells, or by other means?
0

Share this post


Link to post
Share on other sites
[quote name='Venture' timestamp='1314083923' post='4852679']
[quote name='laztrezort' timestamp='1314074624' post='4852647']
I don't know anything about Chipmunk, but Box2D (and similar) libraries typically model rigid bodies. What you seem to be talking about are fluid dynamics, which AFAIK much more complex and processor hungry. The large worlds of Minecraft and Terraria depend on simplifying things by basing everything on cells (blocks), greatly simplifying physics, and even then need to be optimized. [url="http://www.gamasutra.com/view/feature/6367/an_intro_to_cellular_automation.php"]Here[/url] is an article about the use of cellular automata in these types of games, if you are interested.
[/quote]

Chipmunk is based on Box2D to my knowledge. Thank you for that article- reading it currently.

I still have a lot to grasp and figure out about this whole process but: to your knowledge, can what I desire be handled? And if not, could I replicate it, perhaps by scaling down the size of cells, or by other means?
[/quote]

No, it's not based on Box2D, he used some idea for his original implementation from box2d, but it's since been improved upon. The author made his own 2d physics implementation, and his latest release, v6.0.1 is really fast.

As far as what you want to do, it depends on the scale of "particles" you plan on using. If you can assign each piece of "earth" that becomes dislodged as separate body/shape, then you'll be OK. Otherwise, I'm not sure how you'd accmoplish what you want.
0

Share this post


Link to post
Share on other sites
[quote name='Venture' timestamp='1314083923' post='4852679']
[quote name='laztrezort' timestamp='1314074624' post='4852647']
I don't know anything about Chipmunk, but Box2D (and similar) libraries typically model rigid bodies. What you seem to be talking about are fluid dynamics, which AFAIK much more complex and processor hungry. The large worlds of Minecraft and Terraria depend on simplifying things by basing everything on cells (blocks), greatly simplifying physics, and even then need to be optimized. [url="http://www.gamasutra.com/view/feature/6367/an_intro_to_cellular_automation.php"]Here[/url] is an article about the use of cellular automata in these types of games, if you are interested.
[/quote]

Chipmunk is based on Box2D to my knowledge. Thank you for that article- reading it currently.

I still have a lot to grasp and figure out about this whole process but: to your knowledge, can what I desire be handled? And if not, could I replicate it, perhaps by scaling down the size of cells, or by other means?
[/quote]

As Beernutts suggested, you can use small(ish) bodies to represents fragments of earth and rock to simulate falling chunks, rockslides, etc. However, pressurized fluids may be a whole different matter. Also, at some point, all physics simulations no matter how fast will be limited by the number of active bodies. These libraries are typically highly optimized, however, such as putting bodies to "sleep" if they are not in motion, and using broad phase collision to limit collision checks. In the end it will depend on how large of a world you are trying to represent, and how small the bodies will be. My advice would be to experiment with a particular library, and see what can and cannot be accomplished with it. You may have to mix methods, such as rigid bodies, cellular automata and "just plain faking it" to get what you are looking for.
0

Share this post


Link to post
Share on other sites
[quote name='laztrezort' timestamp='1314111376' post='4852795']
[quote name='Venture' timestamp='1314083923' post='4852679']
[quote name='laztrezort' timestamp='1314074624' post='4852647']
I don't know anything about Chipmunk, but Box2D (and similar) libraries typically model rigid bodies. What you seem to be talking about are fluid dynamics, which AFAIK much more complex and processor hungry. The large worlds of Minecraft and Terraria depend on simplifying things by basing everything on cells (blocks), greatly simplifying physics, and even then need to be optimized. [url="http://www.gamasutra.com/view/feature/6367/an_intro_to_cellular_automation.php"]Here[/url] is an article about the use of cellular automata in these types of games, if you are interested.
[/quote]

Chipmunk is based on Box2D to my knowledge. Thank you for that article- reading it currently.

I still have a lot to grasp and figure out about this whole process but: to your knowledge, can what I desire be handled? And if not, could I replicate it, perhaps by scaling down the size of cells, or by other means?
[/quote]

As Beernutts suggested, you can use small(ish) bodies to represents fragments of earth and rock to simulate falling chunks, rockslides, etc. However, pressurized fluids may be a whole different matter. Also, at some point, all physics simulations no matter how fast will be limited by the number of active bodies. These libraries are typically highly optimized, however, such as putting bodies to "sleep" if they are not in motion, and using broad phase collision to limit collision checks. In the end it will depend on how large of a world you are trying to represent, and how small the bodies will be. My advice would be to experiment with a particular library, and see what can and cannot be accomplished with it. You may have to mix methods, such as rigid bodies, cellular automata and "just plain faking it" to get what you are looking for.
[/quote]

Alright. Some more research is probably required on my part. No real worry, as I have plenty of time.

But would the overall consensus be Chipmunk? Farseer?

Which is the overall more powerful?
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0