Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've been learning programming for a while and things are slow but steady. I only have a couple experiments that look something like a game (JavaScript,HTML5,CANVAS). One of the things I would like to establish this early in my process though is a basic level system to my games. I'm thinking like Atari, NES type simple.

mainMenu , level1 , level2 , ...

Later I'll work on including such screens as; titleScreen , pause , highScore. But for now just looking for the basics.

Any good articles/tutorial links would help. Or just a snippet of code I can look over.

Thank you kindly :)

share|improve this question
Please clarify if you want to know how to build a single level, or how to build a structure of levels and menus. If it is the first look for "2D Tile map [language of your choice] tutorial" If you meant the second you might want to check out "Game State management" (Here is a tutorial for it in C++) – floAr Sep 24 '12 at 11:30
2  
What is your question? – Yannbane Sep 24 '12 at 13:50
Hi ROROX; welcome to GameDev.SE! We focus on answering actual specific problems, and just asking for "any good articles/tutorial links" or code snippets isn't really something we provide. Look into game state management and game screen management and do some research. Before you next ask a question here I suggest you read the What kind of questions can I ask here? and What kind of questions should I not ask here? sections of the FAQ. – Jonathan Hobbs Sep 24 '12 at 22:52
Yes I know the stack exchange network goes to great lengths to assure people ask qualified questions. And I know this was low on that scale. But as I slowly learn piece by piece in my coding I keep coming back to test the waters to see if I'm at a level worthy of stack exchange (gamedev in this instance). Maybe next time. Thanks for the suggestions also. I posted the same question to reddit and they also mentioned game-states , game-screen. Any how, thanks, I'll continue refining my questions in the future. – ROROX Sep 25 '12 at 0:13
Thanks. I've been focusing on learning C++ also so this sounds suitable. – ROROX Sep 25 '12 at 1:02

closed as not a real question by Yannbane, Byte56, John McDonald, Jonathan Hobbs, Martin Sojka Sep 25 '12 at 15:59

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

If you are looking for a tile-map code to learn from? You could try to learn from Flixel It has FlxTilemap, a pretty sturdy tile-map implementation. http://flixel.org/features.html

It has good documentation and includes collision detection as well.

Good luck!

The basic idea is creating a large 2D array of integers that contains the id(type) of each tile in your game map.

It is a ActionScript 3.0 which is similar enough to JavaScript for learning purposes.

I would personally suggest using an existing framework for game creation. All professionals use Engines and using an existing framework and Engine is always better than creating your own, you get to spend more time in making the game.

share|improve this answer

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