View Full Version : Barefoot Longjump
KIERIOSHIMOTO
August 10th, 2006, 12:28 AM
Was looking at some games from the Kirupa game contest and I found http://web.mit.edu/kirupa/www/Game%20Contest/35.htm
Barefoot Longjump it's called. I was wondering how I would go about making a game like this one. Maybe put some opposition into it aswell, ad some new events, running, swimming eg. Any help would be appreciated.
KIERIOSHIMOTO
August 11th, 2006, 06:38 AM
Any takers?
evildrummer
August 11th, 2006, 08:35 AM
Well the creator was on the forums and miht still be, try and find out the creator and PM him, Have you any experience in creating games, because if not I think its a bit advanced for you.
Joppe
August 11th, 2006, 10:39 AM
something like this? :to:
KIERIOSHIMOTO
August 11th, 2006, 01:29 PM
I have done some basic games following tutorials.
KIERIOSHIMOTO
August 11th, 2006, 01:33 PM
That's good joppe! But I agree with evil it's a bit advanced for me at the time being.
Joppe
August 11th, 2006, 02:36 PM
Its not really advanced, just do an check for which button was pressed last (using variables) then if the button you just pressed wasnt pressed last time put speed up.
evildrummer
August 11th, 2006, 02:43 PM
How long that take too make joppe? :huh:
Joppe
August 11th, 2006, 04:12 PM
A half hour maybe.. maybe not that long, I was a bit bored you see.. '-_-
TNTWolverine
August 11th, 2006, 04:28 PM
ya right...you know you worked on it like all yesterday joppe...quit tellin lies;)
Joppe
August 11th, 2006, 05:30 PM
Hahaha :D
KIERIOSHIMOTO
August 12th, 2006, 05:26 AM
Lol, you make it sound so simple....
Joppe
August 12th, 2006, 06:35 AM
It IS simple.
See, first you have the onEnterFrame
onEnterFrame = function(){}
Then the keypresses
if(Key.isDown(Key.LEFT)){}
if(Key.isDown(Key.RIGHT)){}
then inside both of those have like
inside the left keypress
if(!l){speed+=1;l=true;r=false}
and in the right
if(!r){speed+=1;r=true;l=false}
and now you have created the movement.. NOT hard :)
KIERIOSHIMOTO
August 12th, 2006, 11:18 PM
lol..
Santa Clause
August 15th, 2006, 08:59 PM
yeeeh score 249, haha, nice game ;) (i mean joppe's version)
KIERIOSHIMOTO
August 15th, 2006, 11:05 PM
i noticed that 249 is the max score, anyone else notice that?
Joppe
August 16th, 2006, 03:09 AM
No.. It isnt, the max score is around 800...
KIERIOSHIMOTO
August 16th, 2006, 06:18 AM
i tryed for a while and only got 249
KIERIOSHIMOTO
August 16th, 2006, 06:20 AM
hey thanks joppe but i figured out my own way
See here for the swf http://img89.imageshack.us/my.php?image=longjumpym8.swf
Joppe
August 16th, 2006, 06:36 AM
And that code is simpler you say?
nathan99
August 16th, 2006, 06:53 AM
Hmm... KIERIOSHIMOTO you first say that Joppe's code was advanced.. you rip out a code like that.. maybe you should explain what's going on for the beginners?
KIERIOSHIMOTO
August 16th, 2006, 07:07 AM
var friction:Number = .9;
//make the friction variable.. makes the jumper slide to stop
var additon:Number = 5;
//how much to add to speed when a key is clicked
var totalScore:Number = 0;
//set the start score for the totail game to 0
var startTrackX:Number = track._x;
//where the rtack starts
var KeyU:Object = {};
//thje object to hold the key down event
Key.addListener(KeyU);
//add the listener tto the keyboard
finBut.onRelease = setUp;
//when they press the finished button for retry restart the game
function addTo():Void {
l = !l;
// l = whatever its not
r = !r;
// r = whatever its not
speed += additon;
// add on to the speed
}
function setUp():Void {
r = true;
// right = true
l = false;
// lieft = false
finBut._visible = false;
// hide the restart buttom
NS =speed = 0;
//set the new score and speed to 0
track._x = startTrackX;
// move the track back to start
KeyU.onKeyDown = function() {
// when they press a button
Key.getCode() == Key.LEFT && r ? addTo() : Key.getCode() == Key.RIGHT && l ? addTo() : null;
// check which button should be pressed and mpove
Key.getCode() == Key.UP && !jumping ? (jumping=true, jump=-10) : null;
//jump
};
jumper.onEnterFrame = function() {
this._y = jumping ? this._y+jump++ : track._y;
//if theyre jumping move on the jumpo otherwise move to the path
this._y>=track._y ? jumping=false : null;
//if theyre lower than the track move to the rtacks Y
track._x -= speed *= friction;
//move the track
if (this._x>track._x) {
//past the jump line ?
if (this._y>=track._y) {
///not jumping?
delete this.onEnterFrame;
//remove the onEnterGFrame event
totalScore += NS=NS == 0 ? 0 : NS;
//set the new scre
Message = NS == 0 ? "FOULED\n"+(totalScore) : "Score: "+NS+"\n"+totalScore;
//Show the mfinsihed message. Win or lose
finBut._visible = true;
//show the finsihed button
} else {
NS = (this._x-track._x)*5;
//add to the total score
}
KeyU.onKeyDown = null;
//disable keydowns
}
};
}
setUp();
//start the game
KIERIOSHIMOTO
August 16th, 2006, 07:09 AM
Feel free to use it if u wish joppe ;)
nathan99
August 16th, 2006, 07:15 AM
OK... kinda proved me wrong.. :P GJ :thumb:
Joppe
August 16th, 2006, 07:26 AM
Feel free to use it if u wish joppe ;)
Why would i want to use it? I just made my own :sure:
nathan99
August 16th, 2006, 07:31 AM
Why would i want to use it? I just made my own :sure:
... hes right :P hed did. Oi, kiero... whatever you have MSN? If so.. add me
KIERIOSHIMOTO
August 16th, 2006, 07:54 AM
yeah man bulldogz_bia tch[.]at[.]hotmail[.]com
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.