Archived

This topic is now archived and is closed to further replies.

Best way to start a Tile-Based game?

This topic is 5043 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Alright, after my finished Pong game (6 days with 1000+ lines of code) I''ve decided to move on to some harder stuff. I''ve seen a 2D side scrolling shooter''s code and it seemed too simple, that''s another project I could have blown off in another week. So, I remembered an old NES game I always played (it''s called Zelda, ever hear of it? :D) and I thought to myself, hey, it would be cool to have a game like that but with guns instead of swords and other stuff since it''s already been done. So, my question to you - the community of GameDev.net, what would be the best way to approach this? I am quite proficient in C/C++ and I''ve got the SDL documentation on my hard drive in my E-Books folder. I looked through the Isometric & Tile Based Games part in the Articles and Resources section and found nothing that would have been of use to me. I haven''t looked through Google yet, I plan on doing that tomorrow but I figured here would be my best bet. Who knows, maybe I''ll be making a topic in the Help Wanted forum if I ever need some extra help creating this, hopefully, to be work of art.
R.I.P. Mark Osback Solo Pa Mi Gente VG-Force Ekim Gram Productions

Share this post


Link to post
Share on other sites
I can see that your joking but I''m really serious. I really should have mentioned that Pong isn''t the only project I''ve done. I''ve worked with a few teams but Pong the only project I''ve done alone, mind you. ''sides, with everybody else working on MMO''s, my idea would probably used already



R.I.P. Mark Osback
Solo Pa Mi Gente
VG-Force
Ekim Gram Productions

Share this post


Link to post
Share on other sites
just a few ideas,

if you are serious of stepping up your games, a good design document is a necessity. Something that will give you a clear and concise idea about the game, gives you focus. A pong is easy, because the design is simple, but for a Zelda game, or even a shoot''em up, that''s a different story. I''m no game designer (hell, haven''t seen a design doc in ages, that''s what I hate mostly about my job), but for example, and in no order,

what it''s story is,
a complete script of the story, main characters and their interactions, quests,
characters design,
playable charaters,
non playable character (NPC),
their behaviour,
AI,
scripts,
game flow,
interaction with the environment,
interaction with NPCs and enemies,
interaction with the user,
menus,
weapons,
environment, variety of environment, their design,
buildings and cities,
multiplayer aspect supported? On several machines? What''s the network architecture? (Server / Client)?
cooperative mode (for a zelda game, that can be interesting, but bring a LOT of complications),
what''s the competition and their pros/cons,
the graphics and look of the game,
the scale of the game (how populated, size of the world, cities),
the save / load system, automated, at user request, ect...
the sounds and ambience,
special effects,
things that will hook a player to the game and set your game a class apart,
the replayability and minimum completion time of the game,
difficulty settings,
the target audience and target platform,
the graphics and sounds, who''s gonna do them?
design an engine, or use one already made?
scripting language?
very important, level editor, and other editors,
the technicalities of the game, the potential problems, and their solutions,
Object design,

from there, a schedule,

how much time per day can you afford on the game, when you want to finish it, split the work into tasks, assign timetables on tasks, see how long it takes, if takes too long, cut down some aspects, or get some help, maybe get an artist to do the art, because it will double your workload. Set yourself milestone dates for beta releases.

from there, work on a prototype, solve the most important technical and design aspects of the game (storing the world, NPCs, collision detection, interacting with NPCs at a small level), do a small quest on one map, fight NPCs, sounds, graphics and animation (quality more than quantity), interact with them, ect... prove the game can work on a grander scale, ect...

look on the web for design document specifications and examples, and here, on this very website

http://www.gamedev.net/reference/list.asp?categoryid=23

Share this post


Link to post
Share on other sites
Be careful about branding a side-srolling shooter as easy. The difficulty level is entirely dependent upon what sort of goal you set yourself. Furthermore, I''ve started many a project feeling I''d thought it through and believing it to be easy (in theory), only to find some time later that there were many aspects I''d failed to consider fully. So, don''t be too swift to dismiss an idea because you''ve seen some code and think it would be easy. Looking at well-written code can make things seem deceptively easy.

Anyway, having said my part about being cautious it''s good to see someone start with Pong and then carry their enthusiasm onto bigger and better projects. I''d suggest you start by putting together a design document outlining what you''d really like to see in the game. Don''t worry about finding a proper template just write a document that is as clear and concise as possible in detailing every aspect of your game and how it will work. The idea is that someobody else could pick up the docuement and almost make the game from it without having to ask you for details.

How detailed you get is entirely up to you but try to get the core structure and components covered. Once that is taken care of I''d set about putting together a TileEngine to power your masterpiece. Get it reading in map files, displaying tiles, controlling input and entities. As you make progress with that you should start to get an idea of how capable you are of entirely envisaging your idea. At that point either rewrite or revise your document bearing in mind exactly what you feel capable of, after making that prototype.

With that done you can commit to your feature list and either work onwards from the prototype or start a fresh armed with the experience gained from that initial foray into writing a tile-engine.

Hope that is of some use, and best of luck to ya.

Share this post


Link to post
Share on other sites
Get the main thing running, the game.

Display tiles from an (dynamic) array on the screen, preferrably look into possible scrolling (adding an offset). Now draw only the visible tiles on the screen.

Add objects. Display and update objects. Colission between objects. Colission between object and world (simple tilebased-which tile is this object in?, or with colission bitmaps-e.g. slopes).

That ought to have you working for a while. Probably sketch out your source code in simple classes in your head or on paper before.

If you get this up and running you will be a step farther again, and can look to get story or levels into the whole shebang.

Share this post


Link to post
Share on other sites
SDl will do just fine.

You can start by classifying everything. Start breaking the bigger problem of "the game" into smaller chunks to tackle. Perhaps the actual tiling engine or level layout would be a good start. If it''s zelda-ish then each area will be a simple rectangle.

Then tackle various other issues including:
animations (even state-based animation trees in the AI forum)
collision detection
level design
enemy AI (harder than you think at times)

However, i would start by sitting down and putting down in writting all the things you want your game to include. With your Pong project, there was no design, you already know the game and are just copying it. Now you''re making something new so you will be actually designing a *game* and not just a computer program.

Another bit of advice is create a roadmap. For a first milestone version, you want features x,y,z complete. For version 0.2, you want another few, etc.

And think about however long you believe it will take and multiply it by x10.

Share this post


Link to post
Share on other sites
*thinks* Holy crap that''s a lot more work than I thought it would be. Since I''m in school right now, I won''t be able to spend a lot of time on it but the summmer...I''m beginning to think it would be a very good idea to put it off till then. I''d be able to work on it a lot more and I''d be able to do everything without rushing and such. Thanks a bunch guys. Once this get''s posted, I''m book marking this thread.



R.I.P. Mark Osback
Solo Pa Mi Gente
VG-Force
Ekim Gram Productions

Share this post


Link to post
Share on other sites
Mike, I am also int he process of school (going for my masters in CS) I have been tinkering around with games as well and writing a story for a game like you are discussing. If you would like to compare notes send me an email and I will share with you some of my ideas and if similar enough we could work together on this. I would eventually like to make a retail quality game so I will be semi-private about some of this stuff but since you seem interested I would love to brainstorm with you.

kramer1225@hotmail.com
or
youngunsguild@yahoo.com

I will try to set up a web page soon to try to clear up some of the ideas so anyone else who might be interested in taking on a project like this email me too. I would prefer to work with a small team for many reason. Easies to coordinate etc. anyhow any1 interested drop me a line and we can discuss ideas.

ps. Mike the best time for me will also be during the summer but i am going to continue to hone my skills until then and work on the story since that is the hardest part!

Share this post


Link to post
Share on other sites
Ekim i am doing the same exact thing you are doing. I made Pong and decided to start working on an RPG like Zelda and Final Fantasy tile based just like you. The only difference is im using DirectDraw instead of SDL(i originaly ment to use SDL except i found very little resources for it and desided to go with DirectDraw.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Listen guys, you know those ppl who have the great games that everyone is playing? Well a lot started programming when they were very young. And don''t think they put off working on a game until summer.

If you want to be successful at this, many times you will need you have an obsession with video game development. You need to work on it in all your free time. And have it consuming your thoughts while you are doing other stuff. It''s more important than school. Yes, gotta get the good grades and stuff, but only to get out of school. This sound overboard? Well the difference between the people at the top and those who fail is those that work almost obsessively and those who "wait until summer".

When you look back upon now, who cares what grade you made on some stupid test? But you WILL remember your successes in development. And they will benefit you surely.

It may sound a bit crazy, but that is the difference between those who want and those who have.

If you would rather spend your time sitting around and watching TV during freetime after school, stop making games right now.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Listen guys, you know those ppl who have the great games that everyone is playing? Well a lot started programming when they were very young. And don''t think they put off working on a game until summer.

If you want to be successful at this, many times you will need you have an obsession with video game development. You need to work on it in all your free time. And have it consuming your thoughts while you are doing other stuff. It''s more important than school. Yes, gotta get the good grades and stuff, but only to get out of school. This sound overboard? Well the difference between the people at the top and those who fail is those that work almost obsessively and those who "wait until summer".

When you look back upon now, who cares what grade you made on some stupid test? But you WILL remember your successes in development. And they will benefit you surely.

It may sound a bit crazy, but that is the difference between those who want and those who have.

If you would rather spend your time sitting around and watching TV during freetime after school, stop making games right now.


Trust me dude, I know what your saying. I''m just putting it off until summer because I will have all the free time I need and I''m quite sure I''m not ready for it yet.



R.I.P. Mark Osback
Solo Pa Mi Gente
VG-Force
Ekim Gram Productions

Share this post


Link to post
Share on other sites
you can spend some time before the summer working out the design details, so you know what you need to do when you get there. or work on some small test projects, such as getting a scrolling tile engine running, just so you know what needs to be done and what to avoid.

Share this post


Link to post
Share on other sites
quote:
Original post by krez
you can spend some time before the summer working out the design details, so you know what you need to do when you get there. or work on some small test projects, such as getting a scrolling tile engine running, just so you know what needs to be done and what to avoid.


This is exactly what i am doing now. My game is in design mode and i am working on stuff to brush up my skills with graphics and stuff. Shoot I just started this idea Jan/15/2004 on know this for sure because I taped the receipt to the notebook I bought for all my notes. I figured might as well start out organised. I work 40 hours a week and Have a grad school class then the rest of my time is my wife''s then the game. She sleep about twice as much as me so i get a solid three hours a night to work on it. DOn''t worry I ain''t gonna fizzle out on this and if he wants to wait till summer I can get more details drawn out and make the rule set better. I can also just work on the whole thing alone as I had planned to from the beginning.

-N

Share this post


Link to post
Share on other sites
Waiting till summer is not a bad idea, but a better idea is to work on your project at least a little bit each day. Maybe set aside an hour or so to work. When you do, have something deffinate as a goal, don''t just tinker. That way you work slowly, but are at least accomplishing something. I work like everyone else but try to get in an hour a day, more on weekends if time permits.

I''ve been working on my game at that pace for over a year. More if you count additional design and learning C++. I don''t expect to be "done" for another year and a half. Just so you know what you are getting into.

Share this post


Link to post
Share on other sites
I have actually been working on a very very similar project. I have done Pong Tetris and Space Invaders clones using SDL. Now I am in the middle of doing a pacman.

I have a question. My TileSet class has a dynamic array of sdl surfaces that each hold one tile. When I initialise the set, it loads a tileset bitmap which contains all the tiles in one file, it then splits them into seperate tiles stored in the array.

My pacman map is stored as 2d array of ints/chars and when I draw the map I just pick the appropriate index of the array and draw that tile.

Should I load and keep the tiles all in one surface, and just select the area I need when I need to blit it, as opposed to splitting them all up at the start?

Share this post


Link to post
Share on other sites
If both ways work, why worry about it?

You''ll probably find your code is simpler with individual surfaces for each tile, but that it''s slightly more memory efficient to use 1 surface for all of them. It''s not a big deal.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Listen guys, you know those ppl who have the great games that everyone is playing? Well a lot started programming when they were very young. And don't think they put off working on a game until summer.

If you want to be successful at this, many times you will need you have an obsession with video game development. You need to work on it in all your free time. And have it consuming your thoughts while you are doing other stuff. It's more important than school. Yes, gotta get the good grades and stuff, but only to get out of school. This sound overboard? Well the difference between the people at the top and those who fail is those that work almost obsessively and those who "wait until summer".

When you look back upon now, who cares what grade you made on some stupid test? But you WILL remember your successes in development. And they will benefit you surely.

It may sound a bit crazy, but that is the difference between those who want and those who have.

If you would rather spend your time sitting around and watching TV during freetime after school, stop making games right now.


some people actually dont have enough time to be that obsessed, i go to school (college not high school) full time, year round, so theres no putting anything off to summer, summer is just as bad as any other time. i also work and have a girlfriend but im still very dedicated to game developing. i just dont think you should have given that speech because you dont know how busy someone can be. my guess is your still in high school and dont have any responsibilities

[edited by - graveyard filla on February 21, 2004 8:09:05 PM]

Share this post


Link to post
Share on other sites
what i do is load static images for the whole map rendering class, then have each tile store a pointer to the static surface. that way you only have 1 surface for each tile type in memory that everyone uses.

Also, i don''t understand the advantage of having all your tiles stored on a single bitmap. that seems like the "in" thing to do lately. It seems inefficient since you have to cut/paste at some point instead of just loading from a file.

Share this post


Link to post
Share on other sites
well put graveyard (not to start a flame war but he is right) so yes I do work with goals each day but the nearest goal I have is to polish my graphics ability first then move on to classes that handle tiles etc. I do a lot of design work at work on breaks and such. so I feel I will be fine just a little slow.

Share this post


Link to post
Share on other sites
Probably one of the most time consuming things i can think of about a tilebased/isometric engine would be getting a good map editor working and at the same time working on your game. ^^ I made a tiel based game but I never coded a map editor so I have lots of random tiles generated. It looks kinda stupid , after that Id say getting a good engine system in general, once you get that down the rest tends to get easier.

Getting all the tiles made, and getting them in the right spots is a-lot of work, not to mention making grass and other related things blend correctly so that you dont see lines between tiles as if the tiles are a grid, it just doesnt look good :/

It kinda becomes a endless task of putting together a big jiggsaw puzzle of maps, but at the same time making them look good.

As for keeping all the tiles in one image you don't really have to but its a good idea to not have like, a file for every tile, mainly because it would be a pain to go through every file opening one after another after another to edit some tiles. Not to mention it cuts down on code and string references , plus have you ever tried putting a bitmap on your desktop and then clicking it once and holding down the enter key it tends to lag when it opens all those paint programs people who play games don't wanna hafta wait every screen for you to access a ton of bitmaps, not to mention it kinda in a since cuts down on ram usage.

[edited by - DevLiquidKnight on February 21, 2004 10:02:57 PM]

Share this post


Link to post
Share on other sites