Archived

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

Metalix_Sega_programmer

floor collisions

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Metalix...I just sent you an email...reply it explaining how could i help you..i can code in C, C++, Z80 asm, and I could learn any other language(technique), oh, i almost forgot, i LOVE any of the Sega machines

Share this post


Link to post
Share on other sites