• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

# floor collisions

This topic is 5922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hiya! I''m working on a sonic game for the megacd and I was wondering if anybody here knows how Sonic team inplemented the floors in Sonic 2. I know they used tiles to make the level map but I''m wondering how they implemented and associalted the floors with the tiles. Thanks! - Metalix

##### Share on other sites
-My guesses:

per-pixel thing- drawing sonic according to how high this pixels go on a particular column depending on where sonic is standing

slope calculation for each tile- using a startheight and an endheight, meaning the hight on the left, hieght on the right, and the slope between the two

Good luck with your Sonic game!

##### Share on other sites
I know that, well most of it anyway!

Say for instance tile 1 collision= bla bla bla
tile 1 graphics = ox01120490
ox00900043

tile 2 collision= bla bla bla
tile 2 grahics = 0x09090909
0x76763773

so now we have the level map:

map_array [300][300]= {0x2487A5656D8448F
0x3688Df78438aed3

where each byte represents a tile number so how do I now implement all the tiles collision data in the level map.

- Metalix

##### Share on other sites
quote:
Original post by matt_j
per-pixel thing- drawing sonic according to how high this pixels go on a particular column depending on where sonic is standing

I think per-pixel would actually be pretty tough for the wee Genesis to pull off. I''d guess that they probably made the ground in large shapes (rectangles, circles) and defined that inside these rectangles is "floor". By combining these bounding shapes you can probably do a pretty fair collision detection.

Just a guess, I don''t really know how people do it.

Resist everyone

##### Share on other sites
Heh, "Sonic 3 and Knuckles" and "Contra Hard Corps" are a bit much for a wee genesis to pull off, but it does! It''s the way the games are programmed and optimized for a cartrige-based-console that makes them work so well.

##### Share on other sites
I studied this topic some years ago, and sonic handles the levels as Ravuya said.
Hey Metalix?.what are u using to program the game?
Later

##### Share on other sites
Hiya!

None of you guys know much about the sega megadrive do you?

The megadrive, or in my case the megacd has *2* 32 bit main CPU''s (Motorola 68000) and 1 z80 sound processor and a Video Display Processor and the rotale and scaling chipset in the mega cd and a load of extra sound hardware. I also have the 32x for my game that I can use for the extra 4 mbit RAM and the load of extra video hardware for my free use! So whoever said the megadrive could hardly handle sonic 2 & knuckles was wrong. I also know some extra programming tricks that can get me virtually any amount of colours on the screen simulateaosly instead of the normal 64! I have quite an extensive knowledge on the hardware for the sega megadrive and megacd, its just the psuedo code and techniques for making games I need to learn about.
Does anybody here know where I can find lessons on the following subjects:

*Psuedo code/ game coding techniques
*(game (Jpop/Jrock) Music composition and production
*Pixel art design and production

In answer to Tai-pans question I program my games with a mixture of C and ASM. If you meant hardware wise I''m burning cd-rs for the main developments of my game and I''m using the controller ports to upload small peices of data to my game.

Seya!

##### Share on other sites
the controller portsto upload data?!?! how do you do that?!

##### Share on other sites
here you can find some excellent pixel art tutorials: http://pixeltutorial.cjb.net/

Can I help you with the Z80 part of the development in any way?
Later

##### Share on other sites
Tai-pan, what do you know about the Z80, do you think you could e-mail me (metalix@anime-genesis.com).

You upload data by sending a few words (the address) to the memory where the controller inputs kept, you then copy the first few words at that address (your address you gave) and use it for you destination address. The rest of the data thats uploaded to the controller port memory is the data that is to be sent to your address.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634146
• Total Posts
3015775
×