I am starting to implement a drag and drop puzzle 'game'.
This is more an experiment than a real game, but I wanted to get advice from experimented C2 users on the best practices to achieve such project.
My goal is to start small by setting up a kid puzzle game. It would be some easy 4 pieces puzzle where you can drag and drop the pieces in their correct placeholders.
Later on I'd like to move forward in my learning to be able to start building board games (there as well it would go from very simple to more complex stuff based on what I would have learned)
So far I am not at the 'simple kid puzzle game' yet, I just have a capx file/project that does the following:
1) Initiate a player in a placeholder sprite
2) Initiate a map composed of 5 sprite having a disabled 'black and white' effect
3) Add drag and drop on player (and position it to the touch position)
4) Highlight the map cell I am over (by dragging the player). Only one map can be highlighted at the time)
5) Handle the 'on drop' so the player position is either set on the map cell highlighted, either it's placed back on the initial placeholder.
(sorry I can't post links yet)
Demo is there : lo-zone.com/labo/puzzleLo/demo/index.html
Capx is there : lo-zone.com/labo/puzzleLo/puzzleLo.capx
I looks a bit 'static' to me, I was wondering if there were better way to implement such things. Maybe there are plugins that would be better to use for such 'game' maybe there is a way to 'loop' through the map definition, or a way to group map items toegether as they mainly have the same behaviour.
here for each map item I copy pasted the events and updated to fit to map1, map2, map3, map4 or map5. maybe there is a way to have a loop that could define the whole map (especially if I start having bigger maps).
Don't hesitate to let me know if you need further info or if you want me to clarify some points.
Thx in advance for any help you could give me.