Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / 2D 101 - How to make a 2D game

Author
Message
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 18th May 2003 00:52
Whilst I don't want walking hand-in-hand on this, I just want guidelines for someone who wants to start work on a 2D game for the first time...

So, yes, I want to start work on a 2D game, not sure what, probably a platformer (if that isn't too difficult for my first 2D game),
but I don't have a clue where to start? Is there any starting points, or experiences/mistakes etc that anyone can tell me.. for example, what to avoid, what to do etc.


Graphics, don't know where to start, sprites? I really am clueless, and what can I make the certain graphics in?

Making the levels (designing them etc)

Animation (though I think animation in 2D is sprites.. I really don't know)

I apologise if this in some form or another seems a bit brash and possibly even offensive (?)

Thankyou all in advance.
-Nilrem
I hear and I forget. I see and I remember. I do and I understand.
RisTar
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 18th May 2003 01:24
start with some programs , and stuff like this , just learn the basic , about the sprite animation , sorry but u gotta learn how to do that urself , im planing to make a 3d game for months but i can , because i cant model , so what im gonna do is , im gonna learn , and when ill be ready , ill start making it , all u gotta do is learn how to make a game from all of the subjects , then think about makin one !

Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 18th May 2003 01:29 Edited at: 18th May 2003 01:30
RisTar, where can I find things that cover the 2D side? DBP is great for 3D, but I haven't seen much (I am shortsighted though...) that covers the 2D side, hopefully someone is writing some 2D tutorials for the DB/DBP tutorial request.

I hear and I forget. I see and I remember. I do and I understand.
RisTar
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 18th May 2003 01:31
tell u the true i dont really now ! but one thing i do know , that its easy to learn , u can learn it by yourself , just cheack some commands and examples .

Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 18th May 2003 02:16
Oki firstly a sprite is basically a picture (or a series or pictures to animate) with a invisible area so that it may be any shape you want. In Sonic, Sonic himself is a sprite, each enemy is a sprite, each power up is a sprite. The background is made of tiles, but COULD be made of one, HUG sprite. The score system graphics are sprites... basically almost everything.

You can make a sprite in any paint package (Window's built in "paint" will do even) but I strongly recommend Paint Shop Pro, which is cheap and excellent. Whats more there's a free 30 day trial on almost every PC magazine you'll ever buy (PCFormat has it every month under essentials) Or you can get it at http://www.paintshoppro.com/ .

Once you have a paint package, make an image any size you want, for example 50x50 pixels. for a start, draw a red circle in the middle of the image, and colour the outside of it in pure black. Then save the image as "sprite.bmp" in a directory "c:\sprites\"

in Dark Basic Pro, type the following

LOAD IMAGE "c:\sprites\sprite.bmp",1,1
x=320: y=240
DO
SPRITE 1,x,y,1
IF leftkey()=1 then x=x-1
IF rightkey()=1 then x=x+1
IF upkey()=1 then y=y-1
IF downkey()=1 then y=y+1
LOOP

when you run it you'll see your red circle approximately in the middle of the screen. Notice how the black area is completely ignored, and you just see the circle. Instead of the red circle you could have had a coloured space ship, or mario or sonic

When you press the arrow keys, your sprite will move around the screen. Hopefully by looking at the simple program above you'll be able to see whats going on, the screen is essentially split into a x and y axis, like in a mathematical graph. you plot the point you want your sprite to be displayed, and it draws it there for you

The line "SPRITE 1,x,y,1" essentially draws a sprite, labels it 1, positions it at points x, y and makes it look like image 1. You could add a second sprite like this.

LOAD IMAGE "c:\sprites\sprite.bmp",1,1
x=320: y=240
DO
SPRITE 1,x,y,1
SPRITE 2,x+100,y+100,1
IF leftkey()=1 then x=x-1
IF rightkey()=1 then x=x+1
IF upkey()=1 then y=y-1
IF downkey()=1 then y=y+1
LOOP

Each sprite you make must have a different number value. You can test for collisions between the sprites using the "sprite collision" command. Look through the help files for more detailed options, commands and help.

I hope that helps you get started

Before you try a scrolling platformer, attempt something with essentially no background, like SPACE INVADERS to practive with sprites. A Moving background with full collision is a whole load more complex

Cheers, Sam / Kangaroo2

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
samjones@kangaroo2.com - http://www.kangaroo2.com - If the apocalypse comes, email me
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 18th May 2003 12:29
Ok I will Sam, many thanks, your feedback was most inspiring, I'll get to it right not, red dots here I come!!

I hear and I forget. I see and I remember. I do and I understand.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 18th May 2003 12:56
How do I get rid of the blueness behind the sprite? (in this case it's the whole background)

I've tried:



but to no avail.

I hear and I forget. I see and I remember. I do and I understand.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 18th May 2003 13:01
Silly me I forgot to put it inside the DO...LOOP loop :-s

I hear and I forget. I see and I remember. I do and I understand.
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 18th May 2003 14:57
Glad it was helpful, it shouldn't take too much imagination to get some really cool results quite quickly, not just red dots If you need anymore help, email me

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
samjones@kangaroo2.com - http://www.kangaroo2.com - If the apocalypse comes, email me
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 18th May 2003 16:37
Will do.
Thanks once again.

I hear and I forget. I see and I remember. I do and I understand.

Login to post a reply

Server time is: 2024-04-19 09:48:50
Your offset time is: 2024-04-19 09:48:50