Robok

Published September 04, 2008
Advertisement
Excuse horrible placeholder graphics:



Time to unveil a bit more detail about the new project then. The backdrop and main sprite graphics in the above are purely placeholder.

Now that the basic physics is sorted after yesterday's post, it was time tonight to start on some of the cool stuff. The main character can now jump and swing around the level using his telescopic robot arm.

You move the player with A, D and W for jump. Whenever you hold down left mouse button, he fires his robot arm towards the cursor and if it hits a wall, it sticks. At this point, you can swing on the arm 360 degrees (well, not through walls, obviously). When you release left mouse, the arm zooms back to its start position at the centre of the player.

The arm is rigid, not a flexible rope. The main reason is that I don't really know how to implement rope physics, but it also gives the game a bit of originality so its staying.

Texturing the arm was a bit tricky - I've learned to my peril recently that repeating textures and linear filtering are hard to get to play nice together, so instead I load a long repeating arm sprite into my texture atlas, then calculate texture coordinates for the arm based on the length of the arm and the difference between the top and bottom V's of the texture coordinate rectangle that the atlas generates for the arm sprite.

Feels pretty nice and smooth to play and quite fun just swinging around the test level at the moment.

I want to move a bit further forward before I release the first demo, but I'll keep posting progress updates and if I update any of the graphics I'll bung up some more screenshots.

Thanks as always for reading and comments always welcomed.
Previous Entry Getting somewhere
Next Entry Pod
0 likes 5 comments

Comments

O-san
Looks great fun =)
September 05, 2008 03:22 AM
extralongpants
Looks like the makings for a fun game.

I think adding rope physics might actually negatively impact gameplay, so a rigid arm is probably not a bad idea. Although, maybe you could have it wrap around corners, ala the rope in Worms (very rigid, single joint bending around contact points). That would be pretty sweet. Maybe as an 'upgrade' later in the game.
September 05, 2008 01:27 PM
ukdm
I agree, stay with a rigid rope. The indie game Aether was recommended this week. Apart from me not "getting it" on a quick play the rope was just really annoying...

I'm looking forward to seeing where this goes :-)

September 05, 2008 03:27 PM
Milkshake
I love where you're going with the gameplay. A buddy of mine and I were talking about doing something just like this ... but the whole rope/grapple thing kind of scares me =)
September 05, 2008 09:55 PM
Aardvajk
Quote:Original post by Milkshake
I love where you're going with the gameplay. A buddy of mine and I were talking about doing something just like this ... but the whole rope/grapple thing kind of scares me =)


This from the guy who implements his own physics solver [smile].

It's pretty simple the way I've done it - when you are locked on the arm, I apply velocity to the player, then (shit, looks it up, can't remember...)


if(Claw.Mode()==cmLocked)
    {
    Vector R=P-Claw.Position();

    if(fabs(R.Length()-Claw.Length())>0.1f)
        {
        Vector N=R.Normalised(); N*=Claw.Length(); 
			
        Vector U=Claw.Position()+N;
        Vector C=U-P;
			
        Shape.Pos=U;
        Vel+=C*16.0f;
        }
    }


So I just move the player new position to the anchor position plus the length of the arm, then compute a new velocity based on the difference between the previous velocity and the new angle. Or something. Wrote the above months ago and I'm drinking at the moment, so I can't really remember how it works [smile].

Cheers for all the comments above - I agree about Aether, technically very impressive but (sorry if this sounds arrogant) I think my version is a bit more fun.
September 06, 2008 12:33 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement