8 Replies - 1009 Views - Last Post: 30 May 2011 - 04:02 AM Rate Topic: -----

#1 4D1  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 225
  • Joined: 22-October 09

Mario Game Help

Posted 29 May 2011 - 12:49 PM

Hi Guys,

I am making/replicating a Mario game, I have started it and it works quite well, but I'm not sure how to address making a level, I want the scene to scroll along as mario walks and maybe have changes in the ground level etc, If I was to create a giant image as the level and just reposition it as Mario moves I would have to some how keep track of when the ground level changes etc. I can think of a few ways to do it, but most of them seem messy or cumbersome, is there a trick to it?

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Mario Game Help

#2 Ntwiles  Icon User is offline

  • D.I.C Addict

Reputation: 118
  • View blog
  • Posts: 716
  • Joined: 26-May 10

Re: Mario Game Help

Posted 29 May 2011 - 01:12 PM

I would recommend creating small layered tiles to create your maps out of. You may even want to invest your time into developing a map editor. If it's a big game it will save you time in the long run.

This post has been edited by Ntwiles: 29 May 2011 - 01:12 PM

Was This Post Helpful? 2
  • +
  • -

#3 4D1  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 225
  • Joined: 22-October 09

Re: Mario Game Help

Posted 29 May 2011 - 01:17 PM

It's the first game I have ever made, so I am just figuring it out as I go, I dont know the best way to create a level let alone a level editor. I was thinking of making a large image of the whole level, and then using objects to represent physical things like the ground, boxes, pipes, enemies etc and iterating over a collecton of objects to test for collision, and maybe use an interface so each object can have its own action to do if a collision occurs, would that be the way to go or is there a better way?
Was This Post Helpful? 0
  • +
  • -

#4 Ntwiles  Icon User is offline

  • D.I.C Addict

Reputation: 118
  • View blog
  • Posts: 716
  • Joined: 26-May 10

Re: Mario Game Help

Posted 29 May 2011 - 01:27 PM

I really think tiles would be the easiest option. If you're saying just make the whole thing one big picture then putting in 'invisible walls' to make seem solid, that could of course work too. Someone more experienced could probably give you more insight.

I will say that I'm working on my first Java game also and I'm going for a game closer to a Space Invaders style. I think it's a more realistic beginner game genre because it uses more simple collision checking and you don't have to worry about gravity. Just something to think about.

This post has been edited by Ntwiles: 29 May 2011 - 01:28 PM

Was This Post Helpful? 1
  • +
  • -

#5 4D1  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 225
  • Joined: 22-October 09

Re: Mario Game Help

Posted 29 May 2011 - 01:51 PM

Hmmm, Ive already got a pretty good start on Mario, he can run and jump around and his movement is based on velocity the longer the button is pressed the faster he goes and he has to slow down he cant just come to a stop, and his jumps are based on velocity he starts fast begins to slow down and when he reaches a peak he starts to fall faster until back on the ground. I am pretty proud of it for what it is, there are a few issues not so much with the functionality, but in terms of my choices on classes and laying things out, but I dont want to think about resolving them until I have a better idea of how the game as a whole will work.
Was This Post Helpful? 0
  • +
  • -

#6 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10180
  • View blog
  • Posts: 37,594
  • Joined: 27-December 08

Re: Mario Game Help

Posted 29 May 2011 - 02:52 PM

Moved to Game Programming from Java. :)
Was This Post Helpful? 0
  • +
  • -

#7 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: -4
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Mario Game Help

Posted 29 May 2011 - 06:17 PM

The reason why, at least in the first instance, you are getting stuck is because you have not thought out the code design. You're using Java so what classes are you going to have and what relationship will they have to one another? A agree with Ntwiles and starting with a very simple game. you will be surprized as to what is going on under the hood with a Mario game and you haven't even toughed on 1% of it yet! :D
Was This Post Helpful? 0
  • +
  • -

#8 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 166
  • View blog
  • Posts: 1,904
  • Joined: 13-October 07

Re: Mario Game Help

Posted 29 May 2011 - 07:03 PM

Look into designing the games Engine, It sounds like it will be a side scrolling game that loads the background (tiles) as mario moves forward or backward.

Instead of making one big image, create a table that out lines what tiles go where for each level

0,0,0,0,0,0,0,0,0,0,1,1,1
0,0,0,0,0,0,0,0,0,0,1,1,1
0,0,0,0,0,0,0,0,0,0,1,1,1
0,0,0,0,0,0,0,0,0,2,1,1,1
0,0,0,0,0,0,0,0,2,1,1,1,1
0,0,0,0,0,0,0,2,1,1,1,1,1
0,0,0,0,0,0,2,1,1,1,1,1,1
0,0,0,0,0,2,1,1,1,1,1,1,1
0,0,0,0,0,2,1,1,1,1,1,1,1
0,0,3,0,0,2,1,1,1,1,1,1,1
0,0,3,3,3,2,1,1,1,1,1,1,1
0,0,3,0,0,2,1,1,1,1,1,1,1
0,0,0,0,0,2,1,1,1,1,1,1,1
0,0,0,0,0,2,1,1,1,1,1,1,1


0 = the sky tile
1 = the ground tile
2 = the stone tile
3 = the mushroom tile

The game engine will read this table in just like how a player piano reads in a roll. Of course the data in the table is not in the same orientation as your game screen but that can be easily rotated as the file is read into memory.

You can even make an editor to make it easy to edit the table just like ntwiles said
Was This Post Helpful? 2
  • +
  • -

#9 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 994
  • View blog
  • Posts: 4,158
  • Joined: 14-February 08

Re: Mario Game Help

Posted 30 May 2011 - 04:02 AM

You could use an existing map editor, such as Tiled. You will still have to write code to load the map but the editing is a snap :)
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1