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! / Mario/Sonic games

Author
Message
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 17th Oct 2004 05:00
How would i go about making a game like mario or sonic (2d). Usind Dark Basic. I need to know.
>How to make levels and load them.
>Control my sprite through the level.

200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD
dj chainz
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 18th Oct 2004 06:15
I am in the devlopment of an entire commercial-release 2d platform engine, and i will tell you a little of the way we are going to implement such a level.

We will use a number of image levels - a couple of background layers (one for fixed image; one for passing, animated objects, e.g. birds, clouds or stars), a main level(for the bit our character walks on), characters and enemies layer, a foreground layer(for vegetation etc.) and an on-top text layer (for scores etc.). We will be using polygonal collision, as in the good old sonic games. This means we have invisible, 2d polygons on top of our sprite levels, that move with the position of the main level layer. I have scoured the net and found a point-in-polygon source snippet from underwaredesign.com, but i have obviously heavily modified it for my engine.

Sprites are easy to control through the level, and you can make sliding speed variables using the curvevalue() command - much easier than fiddling with sin() values.

For our characters, we have developed a specific format for laying out the characters in grid squares 60x60 pixels. This gives us enough flexibility for different characters to be imported into our engine.

You will also need to make a level editor to do such a game. I suggest that you take a look at my blog over the next few weeks to see how you can make an engine and editor. http://www.dbgame.blogspot.com!

visit http://dbgame.blogspot.com on how to make a commercial-level game engine
Johnston
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location: SCOTLAND!!
Posted: 18th Oct 2004 06:55
If your new to making these sort of games i would think you would be better off building the game graphics using 16*16 images and storing the data in an array like below.

Map:
1,1,1,1,1
1,0,2,0,1
1,0,0,0,1
1,1,1,1,1

This way of storing the data means that each image is assigned its own number making finding collisions easier as you could the array to find what image your character is on and what the images are around him. There can be multi layers by using many arrays and it makes the job of scrolling the map easier as well.

The problem is that you really need a level editor for using this method as making the maps is time consuming when done manually.
This method works fine with a mario like game, but i don't think it works too well with a sonic like game as the graphics are a lot harder to do, but if your not confident with 2d programming you need to start off easy anyway.

If i find time i will look out some source code for you.

It was like that when i got here.

Login to post a reply

Server time is: 2025-05-16 15:30:32
Your offset time is: 2025-05-16 15:30:32