[gameprogrammer] Re: How do i make save game?

--- "®£$Ç?\"v@M$Ħ ¢© $..........." <theamericansushi@xxxxxxxxx>
wrote:

> How can I make a saved game?

Simple answer:
- Open a file. 
- Save what you need to save (position, health, ammo, etc.)
- Close file.

Format of the file is entirely up to you.  Seeing that you are a new
programmer, keep it simple.  I would suggest a simple ASCII text
file.  Store key-value pairs.  This is so that when you change what
you need to save, when you read it back in you can read old and new
saved files without issue.  It might be therapeutic to do it yourself
instead of using a lib (XML, INI or something).


> How do I create levels?

We can't answer this mainly because this can vary wildly depending on
the game and how custom it is.

If you are using some 3D engine, there should be some documentation
on how to make a level in some popular 3D programs and the method for
exporting them or converting them to a format that the 3D engine will
be able to read in.  Quite often you may be on your own in getting
that information into the engine.  If those 3D programs aren't
available to you because they are not free, then there should be
documentation that will allow you to generate a level more manually. 
This will require you to handle the output formats of whatever tools
you use in the creation of the level and convert them to how the 3D
engine would require them.

A lot of makers of 2D games have written their own level editors. 
This is because the levels are so tailored to the game that there
isn't a level editor out there that satisfies the problem.  So it's
quite possible you are on the hook for developing what a 'level'
should look like in memory and on disk.  2D level building is
actually pretty simple.  It just boils down to a 2D array of values. 
A simple ASCII text file is usually sufficient to get started with.

In either case, whether there is a level editor or not, you will
still need to plan things out.  How it will be represented in memory.
 What features of a level are required and are not.  Some engines are
very flexible but you many not need all that flexibility.  So I would
suggest you take a step back and identify what is it you need for
your game.

> -- 
> Reply,
> (R)(((???£   Å?Ç?"v@Ë?Ë?MÅ?Ħ ¢  ???)))(c)
> N?§²æìr¸?z
> -¢m§ÿàjg©®?+ji?­Ê&þf¢?)à?+-?Ù¥


Robbert de Groot


      ____________________________________________________ 
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: