1 decade ago
by Ken
So in the game I am building, you have a series of boards that you complete. At the end of each level, I want a little "Congrats, you've earned X points" type of screen where they click "Go" to load the next level. They way I think this would be accomplished is either:
1.) Create it as a level that is loaded that contains the graphics and generated text.
or
2.) Just spawn a new entity that consists of a little "billboard" type graphic and then draw the text over that.
Any thoughts on which way would be best or a better way?
Thanks
First off, I think the 2nd idea is a better one. If you have any background music playing, switching could interrupt it. So having a "level complete overlay" seems like the best idea.
Otherwise, I'm still trying to figure this out. I'll post here if I do. :)
1 decade ago
by Ken
I was leaning toward that one too. Thanks for the sanity check. :) Hope you find a good solution. I'll post back if I come up with one as well. Good luck and thanks.
1 decade ago
by Ken
I may have a third option, just show/hide an html div that is not really part of the game proper, but you can write to it and control it from js in the game. This off the cuff seems the easiest way to go.
1 decade ago
by MikeL
I've actually been thinking of going with something more like your first option, though I hadn't considered the music issue. By the way, not sure if you caught it in another post, but I created a "director" class which allows one to easily load levels into an array and then navigate levels in a simple way such as: director.nextLevel() or director.firstLevel. I found this to be useful for managing the movement through a lot of levels in simple way. Hope it may be of some help.
https://github.com/boneheadmed/Director
1 decade ago
by Ken
@MikeL - Thanks for the link to your Director! Downloaded :) Thats going to make my life easier. Much appreciated.
I decided to go the Entity route.
I created a semi-transparent background box, that I'm then drawing the text on with the appropriate message. Then when the player clicked on that entity, I just kill it and resume the game either replaying that level or loading the next one.
It was pretty quick to set up.
Thanks again for the Director level loader!
1 decade ago
by MikeL
Thanks for letting us in on how you are doing that Ken. I think the way you are doing it is better and in fact I'm going to change to the Entity route as well. It is a lot cleaner and more simple as you've laid it out above. Glad to know the Director code may make life easier. Happy game creating!
Page 1 of 1
« first
« previous
next ›
last »