Jump to content
  • Advertisement

Archived

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

bubach

Mario clone.. (DOS 2D)

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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..

Share this post


Link to post
Share on other sites
Advertisement
Go to www.makegames.com , there´s a free book about how to make a 2D sidescroller game in DOS. Hope that helps!

Share this post


Link to post
Share on other sites
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!! !)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
but to use any of those technics i need to make it tile/sector based.. how do i do that? some sample code?

thanks

Share this post


Link to post
Share on other sites
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.. =)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!