Mario clone.. (DOS 2D)

Started by
39 comments, last by bubach 20 years, 9 months ago
I am working on a 2D (in DOS =)) super mario clone and have some trubble. The biggest problem is the collison detection. How to know were the ground is, and what to collison test? The question is, should i make it tile/sector(some sort of world map?) based to make it all much simpler? And how am i going to do it? Scrolling. How to and examples please... =) If you have some example game (that uses some usefull technic or is similar to super mario) with source-code please post it.. Thanks..
Advertisement
Go to www.makegames.com , there´s a free book about how to make a 2D sidescroller game in DOS. Hope that helps!
collision detection is an issue in a game my friend and i are making as well, but it must be more accurate because it is a fighting game. go to ignacio''s site. it should be helpful!! !)
i really am just an artist. i rely on vbdestroyer for programming.ummmm.... why are you still reading this???:?:P
I´m making a sidescroller too and this article was really useful when I planned the collision detection module: http://www.fastgraph.com/fsm.html
I have the source of a semi-mario clone....it isn''t complete though...there''s no enemies, no bigness, no flowers. But it''s a start if someone would be willing to host i can just email you the link...I can''t post it here cuz my bandwidth will be totally eaten up
ok, thanks. i have already had a look at makegames.com/sidescroller but it is based to much on fastgraph.. when i discovered that i stopped reading, maybe i should read it anyway.. =)

feel free to email me links to anything that could help me..
( sourcecode!! =) )
bubach85@hotmail.com

i have a "almost working" test_coll() rutine, but another problem is the number of tests that i will have to do..

i think that the best thing to do is to make the world tile and sector based, but how do i do that?

and the scrolling?

thanks alot anyway..
and another thing (or two)..
my jumpingcode sucks, anyone that got a good one? and when the player moves it should check so that it is ground under it.. how do i do that?

thanks..
Look a pixel under the player. If you hit a solid tile then he''s on ground, and you can allow the jump button to make him jump. Note that if he''s not on ground any more then he should start falling.

Almost fiendish in its simplicity.

For collision, try to make a routine that takes two vectors as inputs (the starting position and the desired position) as well as something that represents the shape you''re trying to collide (like the radius of a sphere). The function could then modify the desired position on exit to say "this is where you hit a wall", and return true to say it did so.

Break the problem up into smaller ones first.

Why you shouldn''t use iostream.h - ever! | A Good free online C++ book
but to use any of those technics i need to make it tile/sector based.. how do i do that? some sample code?

thanks
as it is now i have a big picture as background, the player character and a box on the ground..
i have a variable GROUND that contains the x value of the ground.
(this sucks!)
i can make the background to several 16x16 tiles, but how can i do a rutine that draws the world by a argument
( like draw_world(level1); ) and level1 is some sort of array or something? and when the world is drawed... i have so _many_ questions.... the best thing would be if i could find some sample sourcecode..

someone out there that knows both pascal and c/c++?
have a look at this:
http://home.wxs.nl/~mike.wiering/mario/

it is a _very_ good mario clone, but sadly i do not understand that much of the code.. because it is in pascal, and of course it is harder to understand code that i have not written myself.. =)

This topic is closed to new replies.

Advertisement