Jump to content
  • Advertisement
Sign in to follow this  
vagosduke

Help writing old-school game engine

This topic is 2348 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello!

I don't know if my question is as platform-specific as I may think, so please excuse me if I am posting wrong.

Well, I have been writing an old-school platform 2D menu-based turn-based tactics/RPG game in Java for Android. So, it will be a little different from regular PC games in that although most game actions are linear, yet the animations, input, etc. will be computed at real time. IT started as an educational project, so the game engine is written from scratch.

I am afraid I am somewhat stuck at designing though. My biggest challenge so far is to design how to game engine will handle input and events such as "menu return options", "sprite animation end", etc. Unfortunately I have no experience programming such low-level game mechanics, especially this type of games. So I am searching for a professional and most elegant solutions that will respect object-oriented programming.

I had tough luck finding information on the web due to the nature of my question. I also downloaded the source of some open-source PC games, but none of them handles the things exactly how I have in mind, because PC games rely mostly on mouse cursor to get the player actions.

My preliminary thought is letting the game entities themselves handle the events (such as the characters requesting user input through a menu), but this doesn't respect much the concept of classes. The second thought is a state machine implemented as a large class with many {if then else} and {switch case} to handle input and events in each game state. Another thought is (since I'd like to be as adaptable as possible and also allow backtracking) implementing this state-machine with a "thread" of events that each event "opens" the next one. This last option though needs several of different classes for handling different events.

So, as I said since I have no experience designing game engines, here I am asking professional devs for their opinion, suggestions and pointing me to the right direction.


Thank you for your time.
ps. please excuse my bad English.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!