0
\$\begingroup\$

I'm developing a small Snake game using a custom engine and trying to apply Robotlegs-like MVC-S architecture with Commands, Events as well. Currently I put some commands for collision checks, bounds checks, turning snake etc. into command queue and engine processes this command queue. However regarding rendering and update(moving the snake) which will last constantly, I'm confused which way to follow. I have two options as follows;

  • As there is already Update and Render commands provided by the engine. I'll just create commands/event listeners just for position or transformation changes, the rendering method will handle appropriately.
  • I'll create commands for render and update as well and put them constantly into the command queue.

There are Views, Mediators and Models for Snake and Food as well.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.