Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

158 Neutral

About MHGameWork

  • Rank
  1. MHGameWork

    Hacking the monolithic entity system

    Yup, thats how i do it. Have your entities return a 'time until next think'. Note that this is actually Very similar to an Actor Model (http://en.wikipedia.org/wiki/Actor_model). You can implement a scheduler in your engine which schedules these 'think' calls Jerome mentions. Using the actor model way of thinking you could even make this updating multithreaded with some additional restrictions on your think methods.
  2. The anwser to your question is simple. Follow the golden rule of programming:   This means that your first focus should be to make your code work. After your code is properly tested, you probably need some refactoring in order to clean up the design. At this point you should have stable and working code. Because: "Only then, one should look at optimizing".   My experience tells me that premature optimization, especially at the cost of code readability or simplicity always comes back at you. The reason for this is that of the 10000 lines of code you write, probably only a few 100 of them will take up 90% of the processing time. Only optimize where you need to optimize.   Sidenote: I am not saying you should ignore algorithmic complexity until last.
  • 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!