Issues with Box2D as our physics engine

Description: General discussion regarding the current engine development.
Moderator: Moderators

CaptainSwag101 M
Topic author, Moderator
Moderator
Avatar
CaptainSwag101 M
Topic author, Moderator
Moderator
Age: 20
Reputation: 20
Posts: 113
Joined: 2 Apr 2014
Location: California, United States
YouTube

Post #1by CaptainSwag101 » 17 Oct 2014, 0:49

I came across an article that talked about why using Box2D for a Mario-style platformer game was not a good idea.
I believe a big issue was that if the player stands on an object such as a platform, and that platform starts moving sideways, the player will remain stationary while the moving platform will slide out from under their feet, and there is no easy way to make the player move along with another object.
However, the article itself also discusses many other issues with using Box2D which could possibly affect our game engine.
This could cause problems in the future when we need to implement moving platforms like from SMB3 and SMW. Therefore, I wanted to see what everyone thinks of this, and whether it is a big deal or not.

Here is a link to the full article (the example is for iPhone games, but the concept should still be the same with our game):
http://www.learn-cocos2d.com/2013/08/physics-engine-platformer-terrible-idea/
Image
--The Captain of Swag

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #2by Wohlstand » 17 Oct 2014, 2:01

I know about the platform issue: I should manually appending velocity of platforms (which an NPC's - dynamic bodies) to objects which stand over them.
I found them, when I put second (non-controllable player) over first player, and when I moved first player, second is still in the same position (velocity is not appending to objects which stand over).

I had the idea of programming our own physics engine for using in the game, but the main work - is a collision detection (because on the level can be 10000~30000 and even 40000 items (blocks, BGO's, NPC's, warps, environment zones (water, sand, gravity, air streams, which are overwriting general environment by themselves) )). System of NPC Sleep was be even (SMBX set NPC's to sleep (return to initial position with "invisible sleep" state (you can see them if you will attach to them a layer with blocks) and reactivating on enter into visible zone again) after 4 sec. offscreen, original Mario games set NPC's to sleep instantly when they are offscreen).

I have a thought process in the end about it, in this way:
- We could use Box2d only for collision detection and program movements and reacting between objects manually.


Return to “Engine Development”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest