Sign in to follow this  

How to design a pseudo 3d game?

Recommended Posts

Currently, I'm making a 2d platform game in C++ with Box2d for physics. I have an EntityManager class, which is basically an entire instance of the game encapsulated. In addition to updating and drawing entities, it transforms input into commands for the player, plays music, saves the game, etc. When the player enters a new room, the EntityManager deletes all existing entities except the player, loads the entities of the new room, and then adds the player back. However, one of my level concepts requires major changes to this design. I'm trying to figure out the best way to redesign my game. I want the game to occur in multiple planes in a sort of 3d effect. Entities can be swapped between the planes but otherwise, the physics on each one happens independently. I guess what I want is pretty similar to the game Time Fcuk. So how can I redesign my game to make this effect possible? I'll probably need a different b2World instance for every plane of every level, as well as a separate list of entities, but I have no idea how to accomplish the swapping. I was also thinking of trying to decouple the entity groups from the game instance, so that I could preload the group of entities associated with a room to speed up room transitions. But the problem is that the entities need access to the game instance so that they can use callbacks to save the game, play sounds, unlock secret items, etc.

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