Sign in to follow this  

Just another beginner

This topic is 2055 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

I believe that there must be thousands of topics like this [img]http://public.gamedev.net//public/style_emoticons/default/rolleyes.gif[/img]
Well, I study C++ for some time (through the Deitel book) and start C# through Head First series. My question is which is a good book to start in game development? I would like to make a 2D platform game and wonder how the level design, it is all the code or is there a level editor? Recently I bought the book [url="http://www.amazon.com/gp/product/1449394620/ref=as_li_ss_tl?ie=UTF8&tag=contraargumen-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=14493946208&m=A2986ZQ066CH2F"]Learning XNA 4[/url], yet if you have any good indication of book I'm open to suggestions. I thought I'd start studying Unity too, but can make a 2D game without much difficulty?

Sorry so many questions[img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] Thanks

Share this post


Link to post
Share on other sites
I started recently myself. And this is my two cents on the thing:

C - Good language to learn not so good to use in game development. However since most graphics libraries are C compatible it is a good place to start some VERY simple games such as Tic-Tac-Toe, Pong and tetris alike. Plus when you eventually learn C++. You will already know the library and a lot of it's syntax. Well supported.

C++ - A bit too complex for beginners. You will spend more time learning the language than actual game development. For more advanced users it's almost the best way to go. Incredibly well supported

C# - This is a different story. It is easier to learn and the "standard library" is very easy to understand and use not a bad choice for beginners. Mediocre support. (Only Windows if you want access to the full features) Although you CAN program in Linux,Mac ,..

Java - They say it's similar to C#. I don't think so. It's approach is different and it was not designed with game development in mind. That does not mean it's bad for game development. Hell i use it primarily it's just that i have to program a lot of stuff myself. It's standard library is also pretty big and has everything you need. Very well supported.

Game techniques for your problem

For simple games that are one 2d screen you usually hardcode the level rather that use the level editor. It's not uncommon such levels are randomly generated.
For something like your platformer game You have three options:

-Make a level editor (A lot of work to be done)

-If the map is simple enough(Something like less than 100 types of tiles) you can can make your entire maps in plain ascii format. For example

..................................................
=====........................................
..........=====..............................
....................=====.......P............
..............................=====..........

Lets say the '=' sign is somewhere you can stand. Then this is a simple jumping through several platforms. and 'P' Is where the player would start.
This approach is less powerful of course but it saves you a LOT of work making a level editor.
All your program has to do is learn to read form this .txt files and generate maps accordingly.

-Get a level editor and engine of a platformer and just add your own gameplay to it. (Easiest way of course)

I would not recommend complex game engines. At least not to the beginner. But simpler ones are just fine if you wish.

Good luck.

Share this post


Link to post
Share on other sites
[quote name='faoliveira' timestamp='1335319749' post='4934599']
I believe that there must be thousands of topics like this [img]http://public.gamedev.net//public/style_emoticons/default/rolleyes.gif[/img]
Well, I study C++ for some time (through the Deitel book) and start C# through Head First series. My question is which is a good book to start in game development? I would like to make a 2D platform game and wonder how the level design, it is all the code or is there a level editor? Recently I bought the book [url="http://www.amazon.com/gp/product/1449394620/ref=as_li_ss_tl?ie=UTF8&tag=contraargumen-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=14493946208&m=A2986ZQ066CH2F"]Learning XNA 4[/url], yet if you have any good indication of book I'm open to suggestions. I thought I'd start studying Unity too, but can make a 2D game without much difficulty?

Sorry so many questions[img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] Thanks
[/quote]


It appears that you are looking for book recommendations. In this regard, I find almost all of the best books are technology specific, such as your XNA book, or a book on Cocos2D, JS/Canvas, etc... So in order to make a recommendation, you kinda need to pick a technology.

If you do go the Unity route this [url="http://gamefromscratch.com/page/Unity-Book-Roundup.aspx"]Unity Book Round-up[/url] should be of some use. It's a list of every single ( I think ) Unity book in existence with the key information you might need ( rating, publisher, page count, table of contents, description, publisher/amazon/safari links, etc ) all on a single page. Having all your options together in one spot really helps making deciding a lot easier... or harder. ;)

Unity can do 3D, but it's "faked". You are essentially doing things in 3D, and then dropping a D. This is actually becoming increasingly common.

Share this post


Link to post
Share on other sites
[quote name='Sh@dowm@ncer' timestamp='1335358812' post='4934733']
-If the map is simple enough(Something like less than 100 types of tiles) you can can make your entire maps in plain ascii format. For example

..................................................
=====........................................
..........=====..............................
....................=====.......P............
..............................=====..........

Lets say the '=' sign is somewhere you can stand. Then this is a simple jumping through several platforms. and 'P' Is where the player would start.
This approach is less powerful of course but it saves you a LOT of work making a level editor.
All your program has to do is learn to read form this .txt files and generate maps accordingly.

Good luck.
[/quote]

Can you provide a source for somethin' like this? Googling it doesn't provide me anything, and I haven't run into anything like it in beginner books.

Found somethin' like this. [url="http://forum.unity3d.com/threads/108264-Free-Code-Load-a-map-from-ASCII"]http://forum.unity3d.com/threads/108264-Free-Code-Load-a-map-from-ASCII[/url]
Been diving into XNA a lot, so somethin' in C# preferably.

Share this post


Link to post
Share on other sites
Thanks for all reply
[quote name='Serapth' timestamp='1335383930' post='4934869']
It appears that you are looking for book recommendations. In this regard, I find almost all of the best books are technology specific, such as your XNA book, or a book on Cocos2D, JS/Canvas, etc... So in order to make a recommendation, you kinda need to pick a technology.

If you do go the Unity route this [url="http://gamefromscratch.com/page/Unity-Book-Roundup.aspx"]Unity Book Round-up[/url] should be of some use. It's a list of every single ( I think ) Unity book in existence with the key information you might need ( rating, publisher, page count, table of contents, description, publisher/amazon/safari links, etc ) all on a single page. Having all your options together in one spot really helps making deciding a lot easier... or harder. ;)

Unity can do 3D, but it's "faked". You are essentially doing things in 3D, and then dropping a D. This is actually becoming increasingly common.
[/quote]

Thanks for the tip of the Unity Book. I was looking for some book like [url="http://www.amazon.com/gp/product/0321735625/ref=as_li_ss_tl?ie=UTF8&tag=contraargumen-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0321735625"]Learning Cocos2D[/url] for C++, a book that took a game project and was showing his development throughout the book, something like this.

I search for a level editor in google and found some editors, some very old and others that usability seems best for RPG. For those who develop a level editor, used SMFL?

Thanks again

Share this post


Link to post
Share on other sites
[quote name='Confirm4Crit' timestamp='1335402583' post='4934938']
[quote name='Sh@dowm@ncer' timestamp='1335358812' post='4934733']
-If the map is simple enough(Something like less than 100 types of tiles) you can can make your entire maps in plain ascii format. For example

..................................................
=====........................................
..........=====..............................
....................=====.......P...........
..............................=====..........

Lets say the '=' sign is somewhere you can stand. Then this is a simple jumping through several platforms. and 'P' Is where the player would start.
This approach is less powerful of course but it saves you a LOT of work making a level editor.
All your program has to do is learn to read form this .txt files and generate maps accordingly.

Good luck.
[/quote]

Can you provide a source for somethin' like this? Googling it doesn't provide me anything, and I haven't run into anything like it in beginner books.

Found somethin' like this. [url="http://forum.unity3d.com/threads/108264-Free-Code-Load-a-map-from-ASCII"]http://forum.unity3d...-map-from-ASCII[/url]
Been diving into XNA a lot, so somethin' in C# preferably.
[/quote]

I don't know about others but i got the idea from a set of games called roguelikes. They use ASCII as a graphic representaion. Since GUI ports existed without any changes to gameplay i figured simply map each character on the map to a specific Tile image. We use something like this on our current project. But it's top-down 2d instead platformer. Still code for loading the above map would look something like this:

[CODE]
int loadMap(char *fname,Layers &l,TileList &tileSet) {
//Layers is a object containgng various types of layers (solid,background,etc..)
// In this case this is our map in memory
int height;
int width;
char c;
Tile t;
// Three layers for diffrent types of tiles.
TileList *solid = l.getLayer(SOLID_LAYER); // TileList is just that a list of Tiles
TileList *backg = l.getLayer(BACKGROUNG_LAYER);
TileList *monster = l.getLayer(MONSTER_LAYER);

FILE *input = fopen(fname,"r"); // or something like this i forgot benn awhile since i used C/C++
// First line are the dimensions of the map
fscanf(input,"%d%d",&height,&width);
// Coordinates for the tiles
int x;
int y;
//Go through the map
for(int i=0;i<height;i++)
for(int j=0;j<width;j++) {
if((c = fgetc()) == EOF) return MAP_LOAD_ERROR;
if(c == '\n') j--; //ignore the new line

x = Tile.height*j; // standard tile height
y = Tile.width*i; // standard tile width
switch(c) {
case '.':
backg->add(new Tile(tileSet.getTile(SKY),x,y));
break;
case '=':
solid->add(new Tile(tileSet.getTile(PLATFORM),x,y));
break;
case 'P':
monster->add(new Tile(tileSet.getTile(PLAYER),x,y));
break;
default:
}
}

fclose(input);

return SUCCESS;
}
[/CODE]

This was written on the fly and may contain errors. This is the general idea behind it.

Share this post


Link to post
Share on other sites
[quote name='Sh@dowm@ncer' timestamp='1335429792' post='4935004']
[quote name='Confirm4Crit' timestamp='1335402583' post='4934938']
[quote name='Sh@dowm@ncer' timestamp='1335358812' post='4934733']
-If the map is simple enough(Something like less than 100 types of tiles) you can can make your entire maps in plain ascii format. For example

..................................................
=====........................................
..........=====..............................
....................=====.......P...........
..............................=====..........

Lets say the '=' sign is somewhere you can stand. Then this is a simple jumping through several platforms. and 'P' Is where the player would start.
This approach is less powerful of course but it saves you a LOT of work making a level editor.
All your program has to do is learn to read form this .txt files and generate maps accordingly.

Good luck.
[/quote]

Can you provide a source for somethin' like this? Googling it doesn't provide me anything, and I haven't run into anything like it in beginner books.

Found somethin' like this. [url="http://forum.unity3d.com/threads/108264-Free-Code-Load-a-map-from-ASCII"]http://forum.unity3d...-map-from-ASCII[/url]
Been diving into XNA a lot, so somethin' in C# preferably.
[/quote]

I don't know about others but i got the idea from a set of games called roguelikes. They use ASCII as a graphic representaion. Since GUI ports existed without any changes to gameplay i figured simply map each character on the map to a specific Tile image. We use something like this on our current project. But it's top-down 2d instead platformer. Still code for loading the above map would look something like this:

[CODE]
int loadMap(char *fname,Layers &l,TileList &tileSet) {
//Layers is a object containgng various types of layers (solid,background,etc..)
// In this case this is our map in memory
int height;
int width;
char c;
Tile t;
// Three layers for diffrent types of tiles.
TileList *solid = l.getLayer(SOLID_LAYER); // TileList is just that a list of Tiles
TileList *backg = l.getLayer(BACKGROUNG_LAYER);
TileList *monster = l.getLayer(MONSTER_LAYER);

FILE *input = fopen(fname,"r"); // or something like this i forgot benn awhile since i used C/C++
// First line are the dimensions of the map
fscanf(input,"%d%d",&height,&width);
// Coordinates for the tiles
int x;
int y;
//Go through the map
for(int i=0;i<height;i++)
for(int j=0;j<width;j++) {
if((c = fgetc()) == EOF) return MAP_LOAD_ERROR;
if(c == '\n') j--; //ignore the new line

x = Tile.height*j; // standard tile height
y = Tile.width*i; // standard tile width
switch(c) {
case '.':
backg->add(new Tile(tileSet.getTile(SKY),x,y));
break;
case '=':
solid->add(new Tile(tileSet.getTile(PLATFORM),x,y));
break;
case 'P':
monster->add(new Tile(tileSet.getTile(PLAYER),x,y));
break;
default:
}
}

fclose(input);

return SUCCESS;
}
[/CODE]

This was written on the fly and may contain errors. This is the general idea behind it.
[/quote]
Hmm, neato. I'll look into it some time, thanks. :D

Share this post


Link to post
Share on other sites

This topic is 2055 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this