Today again I painted the next drawing. I look at him and I understand that something is wrong in him. Can problems with the prospect or with black and white or with the composition or is everything terrible? help me figure it out, help.. My english is not very well, i'm from russia and i want to draw for game
New simple concept, one touch game. Please try and give your feedback
Like it : https://www.facebook.com/bitrolling/
Contact : firstname.lastname@example.org
First, a bit of context. I'm having my first contact with the entity-component-system architectural pattern in the simple shoot'em up game I'm writing. I appreciate the flexibility and decoupling the pattern promotes. So far, I believe I have the basics down. I have already defined a handful of components and systems which operate based on them.
I'm now looking to add a cannon to the player's spaceship. I defined a Cannon component and attached it to the player entity (IOW, I "tagged" the player entity as having that capability). That component has a single member which indicates the cannon's rate of fire. Then I defined a PlayerWeapon system that is responsible for actually firing. At the moment, all it's doing is write a message to the console. Because no actual rate control is implemented yet, each press of the assigned fire button causes multiple messages to be output in quick succession. I would like to implement a sort of debouncing mechanism to have the fire rate respect what the cannon component dictates, e.g. fire once every 500ms.
Now for the actual question on ECS modeling. Suppose I'd use a simple elapsed time accumulator to decide when the next shot should be allowed to fire. Where would that information be stored? Should the system be responsible for managing that type of information? Or should systems be considered completely stateless? In that case, the accumulator would be stored in the cannon component, along with the existing fire rate. Would you kindly share some advice on how to handle a situation like the above? As stated, I'm new to ECS and would like to make sure I implement the concepts as properly as possible.
I tried to implement the command pattern explained in this book : http://gameprogrammingpatterns.com/command.html. I'm looking up for someone which could revise my code and see if I did implement it the right way, or even if I did deviate a lot from how it should be implemented.
Here's the code : https://github.com/Luhanmacedo/Command-Pattern
I didn't understand if the base class (Command) could be modified to introduce methods as I did to facilitate implementation details in the derived classes.
What would be a good way to map the buttons according to the configuration the player wants to use, such as X for Jump and Y to shoot.
P.S. : If it's not possible to review the whole code, tips in some parts are welcome as well.