I'll need to make it more object oriented, create and reuse some common components, comment it more, separate configuration and include levels as example and probably much more. When I opened it and saw the code, I was like, OMG did I really write this? Can't understand anything. 90 Step by step tutorials 636 Bugs and issues 195 Introduce yourself 215 Announcements 103 Forum talk 399 Relax cafe Popular Tags. Well of course in depends on how you store levels.Īll in all you reminded me that I need to redo GameTemplate. 344 Game & application design 304 Plugins 69 User experience 74 Marketplace 286 Code snippets 33 Building a team 265 Suggestions & requests 350 Announce your apps made with Gideros. Ok, I don't know if you miscopied it, but you need to close (if showDescription then) statement with end and also whole desc function.Īlso mousedown event is defined as a part of level class, but it is not used in level class and you haven't attached that mousedown handler to anywhere.Īnd I'd suggest to put description texts together with levels, that way you won't have to create long if statements to see which text to show now. But then again it means user won't see new description. Question, and when you end level, you simply go back to level select and let user select next level? It could be frustrating and I'd recommend to simply load next available level. (As I'll be using it myself, I hope it will be upgraded with more features, etc).Īnd of course, feel free to use it even in commercial projects I'm uploading it to my website, so I'd have only one place to update it, etc. To allow easy selecting from current state.Need to complete previous level to unlock next one.Need to complete previous pack to unlock next one.With provided level quantity (configured for up to 20 levels).But if you'll have questions, feel free to ask. ![]() My code might be unreadable and seem unlogic, tried to comment it. ![]() It doesn't implement any game logic (well it does, but only for demonstration purpose), but it handles pretty much all the rest that is needed, leaving you with fun part - creating your game logic. Here is a template, I'm using in my games.
0 Comments
Leave a Reply. |