I think I will delete my fork then and go for a clone.
Right now I just copied stuff that I needed into my project. Before committing I would prefer to discuss issues first
There are many issues
But if you want I'd like to discuss here!!
is a good piece of code IMHO
You can:place it on screen easily, render and update it. But... but is not perfect, I was developing a little rpg example for MarteEngine (here MoveAvatarTest
) , it's working and you can add keybinding to actions movements, animations and so on.. but all code is too complicated and an Entity must be more general, I need to put some effort in it, I know
My idea is not to build a component based entity system, but instead build a little library to help in developing simple games. Put thing on screen, move it, and then play more with Slick, java and gameplay elements
For example, what do you think of this TopDownActor
2) must I add World concept from FP
to MarteEngine? Worlds are some sort of box for anything related to a level/menu on screen, something like rooms of GM. Ideally could be interesting, but there are issues with Slick. For my point of view Worlds = State for a state based game, but without useful stuff around it: d
3) work hard to put collision stuff on a good level: need some testing with it, for now only shape (aka Rectangle) collision is in MarteEngine, but could be cool to put some sort of pixel perfect collision? We can use FP ideas
4) write demos! For now I have only HelloWorld, Pong and MoveAvatarTest, but what I want in perspective is a little platformer and an rpg
Demos is useful to test MarteEngine and find new and useful features
5) debug features: if you set a debug key, MarteEngine show you some veeery basic information about your game: collision boxes
This kind of thing is really useful (you), but what about a little console? Maybe with scripting capabilities ? This could be awesome
One extremely useful stuff of FP are Alarms
, add it to a game, MarteEngine handle it, and then call callback, so developer don't need to work with elapsed time and so on
7) Package organization
I will follow maven structure (but for now ME is not a maven project
), just to have more clean organization in this project
I'm thinking also on a small gui integration, maybe with TWL, I don't know: most games don't need very sophisticated guis, but a basic message system
For example as I already mentioned I would love to use ME in a state based game environment. This makes it necessary to modify ME from being a static container "for everything" to some instance oriented thing.
Meaning each GameState instance has its own ME instance.
If you pass the appropriate ME instance into each entity the code changes should be minimal.
State and StateManager are something really useful, but I need to think about it. How much games need it? How to support State on a general Entity of MarteEngine without force too much stuff? How to support your idea? Maybe what do you have in mind is a sort of FP World approach: have different "World" (aka states, with entities, alarms, etc..) and one FP static class with one current world rendered/updated and capability to switch between them --> as I written before, this is a replacememt for Slick-based approach? I don't want to confuse anyone, in particular me
Another thing is the way of dealing with commands inside of Entities. I think this is not the best design.
Imagine two game states, intro and main game. In intro you want to show the player sprite running around just for the fun of it. But because the command handling is dealt with inside Entity and so inside the Player code you cannot forbid user input on the intro screen...
So I would move the command handling stuff out of Entity and maybe move it into the ME class or even completely drop it and put it into the update method of the GameState subclass.
I will fiddle around with your code and come back to you
After read this comment I think that we need World approach
So you can define one World with menu stuff and another one World with Game stuff (in particular Player Entity with commands), what do you think?
I'm writing a lot today