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! / how do i make a basic 2d level?

Author
Message
outer heaven
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: london, england
Posted: 23rd Sep 2003 02:32
hey people, i was wondering how you make a level like in the megaman x games.
i havnt found a decent tutorial around anywhere.
basically its a 2d platformer and i need help programming/puttin one together from scratch.

tricks evolve... spots change... trends fade... skateboarding is forever.
MagiKnight
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location:
Posted: 26th Sep 2003 23:40
outer heaven, Megaman X is tile based I think or thats is how I would go about making a clone of it anyways.... you need to make a tile engine.

MMMMMM Low level programmimg...
outer heaven
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: london, england
Posted: 27th Sep 2003 00:16
and how do i go about doing that

tricks evolve... spots change... trends fade... skateboarding is forever.
MagiKnight
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location:
Posted: 27th Sep 2003 00:49 Edited at: 27th Sep 2003 00:51
there are alot of ways i like the data statement one best

dim level_tiles(4, 4)

for y = 0 to 4
for x = 0 to 4
read level_tiles(x,y)
next x
next y

data 01,01,01,01,01
data 01,01,01,01,01
data 01,01,01,01,01
data 01,01,01,01,01
data 01,01,01,01,01

do
for y = 0 to 4
for x = 0 to 4
paste image level_tiles(x,y), x* 63, y* 63
next x
next y
loop



DO NOT copy and paste this then pretend you made it your only fooling yourself and no one else ...this is only an example.

MMMMMM Low level programmimg...
Erusuwasu
20
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Where am I? I think I\'m lost...
Posted: 12th Oct 2003 09:55
That's some nice code, but do you mind explaining it? I'm sorry but I haven't quite gotten a grasp on the whole data and read statements. I've read the USER MANUAL command descriptions and I couldn't see how it worked. What I get from the code is:

You make a 2D array called level_tiles. Then you read the data from the array useing the for/next statement. Then you do the data statements(don't quite understand that part). Then you paste all the images.

Where is the bitmap that the paste image command is pulling the 64*64 images from?

I guess what I'm asking for is a step by step description? Sorry if that is asking for too much? Thankyou to anyone who can explain it to me

I've got DBClassic and Photoshop Skillz and I'm not afraid to use um!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Oct 2003 14:31 Edited at: 12th Oct 2003 14:32
The Images would be loaded at the beginning before the game starts.

Load Image "Tile1.bmp",1
Load Image "Tile2.bmp",2

data 02,01,01,01,02

Tiles are numbered the same as the data... ,1 .... ,2
The Data can go anywhere at the end of your program because 'Read' finds it anyway.

So draw some tiles, call them whatever you want, but remember to load them with the numbers at the end that match the Data values, that draw your screen.

Pincho.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Oct 2003 14:43
The whole game level of DATA would usually be designed in a map editor. This is basically a locked grid. So that when you move your squares around in real time on the screen, they jump around in 32*32 or 64*64 grid positions. You can stick your squares down, and the application remembers where you stuck them. When you have drawn a whole scrolling level, you can save the DATA to a file. You can copy/Paste it into your program, or Load it as a Map. You will probably find it easier to Copy/Paste it. Map editors can be written in any language, because even Blitz map editors save DATA.

Pincho.
Erusuwasu
20
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Where am I? I think I\'m lost...
Posted: 12th Oct 2003 15:32
Thankyou for the help Pincho. I'm still having a hard time understanding it but that is probably because it's 6:30 A.M. and I haven't gotten any sleep. I'll let you know how things work out tommorrow when I'm more awake to go over it.

I'll let you know how it goes...

I've got DBClassic and Photoshop Skillz and I'm not afraid to use um!

Login to post a reply

Server time is: 2024-05-05 18:20:28
Your offset time is: 2024-05-05 18:20:28