Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm currently looking for a simple and basic start screen for a game using javascript, so basically its the first function that is called and then press play which then goes into the game.

Looked online and they all seem to be advanced ones and can't seem to find any tutorials either.

share|improve this question
    
When making a game, you should start with some core logic, not with menu. –  Ivan Kuckir Mar 8 '13 at 14:32
    
I've already created the game, the next stage is the menu –  Nick Mar 8 '13 at 14:33
    
if you used some framework, can't you make menu in that framework? –  Ivan Kuckir Mar 8 '13 at 15:52
add comment

1 Answer

up vote 2 down vote accepted

Menus and other non-gameplay related UI are actually much easier to create when they are driven by the same visualization code used in your gameplay. In the same way you display animate your game objects, you should be able animate your UI buttons and menus as well.

Think of a menu button as a game object with a different sprite. When polishing your game you'll be happy to have the ability to easily tween, scale and fade in/out your UI elements.

Since you don't mention a framework (such as ImpactJS or Crafty, for example) I'm assuming that you've got something home grown. If that's the case you may not have such generic ways to visualize game elements. While you can brute force through creating menus and title screens which do not share the same visualization code as your core game, you'll end up with something much less maintainable and extensible.

Because you're using HTML5 it's also an option to create your menu code using HTML DOM and CSS. While much of the animating and layout of menus will be easy with some CSS transitions, it's still (in my opinion) an inferior option to having your canvas framework be generic and flexible enough to easily create and animate any kind of game object.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.