Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Level 4

Sign in to follow this  


In case you missed it.

Work on Level 4 has begun:

This will be my most ambitious level yet. It will feature alot of platforming elements that haven't been in previous levels.

However, it's hard to make good platforming elements when all the player can do is jump on static tiles. This brings the need for moving platforms, falling platforms, etc.

But how should I implement them? I only have a way for the player to stand on tiles, but not on non-tile objects. So I have to not only let the player stand on these platforms, but have it look natural.

Yesterday, I started thinking of how to make them, and here's what I've come up with.

I figure that I've got one really good thing going for me, the enemies have access to the player object all the time. That means manipulating the player from the platform objects will be very easy (as platforms are defined in this game as enemies).

So, I suppose I should just apply the same collisions for these platforms as I do with tiles. That means once a player collides with one, it will push the player to the surface of it. However, I don't want the player to be able to shoot to the surface by just touching a platform with Stompy's head. So I figure this, only allow the player to land on a platform if Stompy's feet collide with it.

Okay, but how do I make Stompy stay on a platform if it is moving? Well, I guess I could just move Stompy when I move the platform.

There are several other issues, though. For instance, to the player object, if there is a platform underneath Stompy, it will act like there is nothing there. It does this with all non-tile objects. This problem is what will probably cause the most headaches.

Well, I'm going to take a shot at making these non-tile platforms. Hopefully my ideas will work.
Sign in to follow this  


Recommended Comments

In the not too distant future,
Next Sunday A.D.
There was a guy named Joel,
Not too different from you or me.

He worked at Gizmonic Institute,
Just another face in red jump suit.
He did a good job cleaning up the place,
But his bosses didn't like him & they shot him into space!

We'll send him cheesy movies,
The worst we can find...(la! la! la!)
He'll have to sit & watch them all,
Then we'll monitor his mind...(la! la! la!)

Now keep in mind Joel can't control,
When the movies begin & end...(la! la! la!)
Because he used those special parts,
To make his robot friends --


Cambot (Pan Left!)
Gypsy (Hi Girls!)
Tom Servo (Hi Tall Guy!)
Crooooooow (I'm The Wisecracker!)

If you're wondering how he eats & breathes,
And other science facts...(la! la! la!)
Then repeat to yourself its just a show,
I should really just relax...For Mystery Science Theater

Share this comment

Link to comment
LOL, I that was one of my favorite shows of all time, I have all the DVDs.... anyways

So yesterday I downloaded you new version, but before I could post some feedback the site went down, so I'll try and remember what I said.

-If you just keep running forward, horizontal bullets fired at you pass straight through you without doing any damage (I assume this has something to do with the bullets skipping right over the player's collision boundaries)

-Those huge sprites(Battleship, First Boss, etc) really slow down the game when they are onscreen, maybe you could split them up into smaller easier to blit pieces.

-This is just a question, are you "culling" the tiles and enemies that aren't on the screen?

Well, thats all I can remember, but enough with the bad, the game is really fun, I'd rate++ you, but I dont think it will let me do it again.

Share this comment

Link to comment
Moving platforms (and keeping the player moving while standing on one) can be kind of tricky.

I think you've made a good start by classifying moving platforms as enemies. They are inherently evil, so it's very appropriate! :p I was actually gonna suggest it as I was reading, but you're 3 steps ahead of me.

This is how I would handle keeping Stompy moving whilst atop a moving platform (let's say it moves horizontally)...

You have the platform draw routine (or maybe a separate movement routine, I don't know; for simplicity let's assuming you handle it all in one Draw function). So, you call Draw(), and you say x+=dx;. After that, you can do a collision test between the player and the platform. (You already do this since the player gets hurt and flashes when touching enemies right now.) In this case, though, you don't hurt the player and make him flash on collision; instead, you add a call such as player.x+=dx; (where dx is the platform's moving speed).

You'd also have to align the player's y-coordinate properly, and you might have to make the platform's rectangle a couple pixels larger (since the player should be standing immediately on top of it, but not inside of its rectangle).

You could also do a test of the player's vertical movement during collision time to determine what to do. You might not want the player to be able to jump up, through a platform, then land on it. (Instead, you want the player to hit his head and bounce back down.) Then you could say, 'if player.dy<0, then don't move the player, except for pushing him back down and stopping his jump.' Or, if you want the player to be able to jump through the bottom but not fall through the top, you could say, 'if there's a collision and player.y>=0 (not jumping), then move the player along with the platform, but if he's still jumping, don't move him until he actually lands on the platform.'

Hopefully some part of that makes sense. ;)

Share this comment

Link to comment
Ravuya: Mystery Science theater 3000 was a good show, but I've only seen a few episodes.

Sir Sapo: about the horizontal shots not doing damage, does that only happen on one specific level(third?), or in all the levels? About culling, the tiles are culled, but now that you mentioned that, I noticed the enemies weren't. Well that's fixed now.

MikeDoty: thats alot like the idea I'm having. Luckily, it's even simpler than that. Although it might look like it, an enemy in the game doesn't have to do damage, or even attack. For instance, the items that you pick up in the game are enemy objects as well. I don't know why I called the objects "Enemy", when a more appropriate name is "Entity".

MarijnStevens: Well, MikeDoty made a good level editor. I haven't made one myself yet, but I might after I finish the main game.

Thanks for all of the feedback!

Share this comment

Link to comment
It happens on all the levels I have played so far, but only bullets that are moving in a perfect horizontal line(ie. the foot soldier robots on Level 2). If you need more info just let me know.

Share this comment

Link to comment
I don't think something is being cleared right, or something. If you make a level that doesn't have an end (you can go all the way too the last tile) and jump up, its acts like you're on a crate. I was pushing right as I was jumping, so it might be going out of the array bounds or something.

Do we get a lightsaber in level 4?

Share this comment

Link to comment
Yeah, I'm aware of that bug, but can't seem to fix it.

There seems to be some confusion. Level 4 is on a bridge at night, not in space[grin]

Share this comment

Link to comment
Oh, it looked like your older platformer "Bob", I thought you were paying homage to it or something...

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!