I know this has come up before but i just thought I'd share my attempt at a tiny little "Tech Demo"
How does it feel to play? I tried to add in acceleration and stuff like that.. Is it believable?
http://www.thethoughtradar.com/AGS/Platformer7.zip (http://www.thethoughtradar.com/AGS/Platformer7.zip)
Yes, it is. It feels very good.
Yep, nice and smooth. Good work.
Wow, Calin, that's great! It doesn't feel "AGS-ie" at all. Great work! I especially like how you made his hat flip up when falling down or decending from a jump... great job.
Quote from: Snake on Wed 04/11/2009 17:37:49
I especially like how you made his hat flip up when falling down or decending from a jump... great job.
I stole the idea from somewhere... I wont say where... It's secret
Bouncy Boxing? :p
Haven't checked this out yet but will asap.
Ramps!
http://www.thethoughtradar.com/AGS/woop.zip (http://www.thethoughtradar.com/AGS/woop.zip)
mario assaults draculas castle.
But you'll notice that the ramps dont work.
Im using regions to define platforms.. so Region 1 defines the top of a platform and will not allow the character to fall through it and region 2 defines obstacles that cant be passed through horizontally. Obviously this means that slanted ramps dont work.
Any ideas?
Colin, you magnificent bastard, your platformer works like a charm and feels smooth... except for the multi-jumps. If you hold down "up" you can jump endlessly, which not many platformers actually do. This can be easily fixed, however.
Now I know why you asked about room width limitations. ;)
That looks realy cool. Did you draw these background graphics?
Quote from: Crimson Wizard on Wed 04/11/2009 22:56:16
That looks realy cool. Did you draw these background graphics?
My guess was a tile set from castlevania actually
Quote from: Crimson Wizard on Wed 04/11/2009 22:56:16
That looks realy cool. Did you draw these background graphics?
HAH! I wish kiddo.
So I had a quick try at parallaxing.
I paint the background (the sky) onto the room surface at the viewport but it seems to lag slightly and is especially noticeable if you jump.
Any ideas why that might be?
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.Clear();
surface.DrawImage(GetViewportX(),GetViewportY() , 14);
http://www.thethoughtradar.com/AGS/Platformer.zip (http://www.thethoughtradar.com/AGS/Platformer.zip)
This looks nice.
However, when I tried the second one you uploaded, I sometimes fell through the top of staircases.
Sometimes with disastrous results:
(http://www.2dadventure.com/ags/Bug.jpg)
EDIT:
Having a look at the parallax problem, I'm haven't really got any ideas, except that it might just be general lagging.
I did notice that when you move to the left, you get a similar thing, but when you move to the right, it's fine.
You get this when you walk to the left:
(http://www.2dadventure.com/ags/Bug2.jpg)
My thoughts on the ramp problem are that perhaps if you were within a certain distance of the surface of the ramp(a couple of pixels should be enough), then you could make it so that....Arg! I cant explain!
I'll try pseudo
if (this.Location == StairAreaType.Right) //if the thingy is within the special ramp area of a ramp
{ //going up to the right
this.HorizontalRightMovement = const_ALittle; //make it so that pressing the right arrow makes you
//move to the right AND up a little
this.HorizontalLeftMovement = -const_ALittle; //make it so that pressing the left arrow makes you
//move to the left AND down a little
//it should be set up so that when it's moved it stays
//within the ramp area
}
I hope I'm making sense, and I hope it works... :P
Well if you created a hollow rectangle GUI which makes the screen smaller, then the viewport would be able to load behind it, which would stop the background from showing you its pink bits.
That would work, except that you'd still get the weird squashing effect whenever you jumped.
I really can't see why this doesnt work.
I paint the background everyframe at the viewport.
The only thing i can think of is that the GetViewPort functions dont return a pixel-perfect result.
EDIT: FIXED!
The following code seems to return the viewport more accurately (if the viewport is following the player)
int BGx = cEgo.x - 160;
if (BGx < 0) BGx = 0;
if (BGx > Room.Width - 320) BGx = Room.Width - 320;
int BGy = cEgo.y - 100;
if (BGy < 0) BGy = 0;
if (BGy > Room.Height - 200) BGy = Room.Height - 200;
So I've done another build to show off the parallaxing a little more but does it hurt your eyes to play?
it seems blurry to me.. is it just my monitor?
http://www.thethoughtradar.com/AGS/Platformer2.zip (http://www.thethoughtradar.com/AGS/Platformer2.zip)
Hm, it's sharp here.
Try putting the filter on '4x nearest-neighbour' in the game options, and don't allow your monitor to manually stretch it (keep the aspect ratio).
It doesn't look blurry to me. Looks pretty awesome, in fact :)
My only (minor) gripe about the way Mario moves is that you can't control the height of the jump by tapping the key instead of holding it down. I don't know how difficult that would be to script, though. If you managed that I think you'd get it feeling close to indistinguishable from the original game.
Quote from: Denzil Quixode on Thu 05/11/2009 11:16:42
you can't control the height of the jump by tapping the key instead of holding it down.
Yeah i'm working on this but havent come up with a decent way of implementing it yet.
Jesarsh!
This is incredible, Calin.
The only thing that I suggest is either blurring the clouds or dropping the lightest shade down a notch. That is the only thing distracting to me when I'm travelling through the castle. But other than that, w00t!
Great! ;D Now to implement a health bar and scores ::)
Bear in mind i'm still using stolen graphics until i get the mechanics sorted :p
speaking of which, I've fixed the jump and added real moving, animated enemies! oh noez!
http://www.thethoughtradar.com/AGS/Platformer3.zip (http://www.thethoughtradar.com/AGS/Platformer3.zip)
That works pretty well, altho he can jump REALLY high :=
Quote from: Arboris on Thu 05/11/2009 15:56:08
That works pretty well, altho he can jump REALLY high :=
he's mario... ::)
Lies! we all know that white men can't jump! (http://www.imdb.com/title/tt0105812/)
Excellent work man! Seriously good stuff.
Write some software (plugin) for AGS to make platformers like this and get it out there so those guys over at Stencyl will be screwed over for never releasing their vapor-ware!
http://www.thethoughtradar.com/AGS/Platformer5.zip (http://www.thethoughtradar.com/AGS/Platformer5.zip)
Now with wall jumps and rubbish particle effects!
(go to the far end of the room for a wall.)
Very impressive. I would love to play arround with a plug-in and try to create a jump'n'run.
Hey, I wanna play the entire game :P Gratz! ;)
;D Wow, nice job man! Do you plan to release this as a plugin or module or whatever?
Im not sure i would know how to kind of 'generalise' it.
Its fairly difficult to decipher game loops since they are always convoluted mess of if statements.
But i'll certainly release the source code 'as is' when ive done it.
Nice. :)
I haven't tried the latest version, as I'm still downloading it and I'm currently in my "No Game" time, but I'll tell you what I think when I'm done.
I must confess, even though I threw the thought of making an AGS platformer out the window(I decided to use XNA instead), I'm still itching to have a look at the source! :D
EDIT: Looks Great!
However, He does jump a tad high, even for Mario.
Quote from: wonkyth on Fri 06/11/2009 05:11:48
However, He does jump a tad high, even for Mario.
Change it to Luigi then. :=
the height of his jump is literally changing one number :p I dont think its really an issue at this point :p
the particle effect does seem to get stuck on his feet. When you jump against the wall, and just let him slide all the way down, and then jump off it the particle effect will remain at his feet until you do a 'correct' wall jump.
already fixed that :p New build coming soon.
http://www.thethoughtradar.com/AGS/Platformer6.zip (http://www.thethoughtradar.com/AGS/Platformer6.zip)
New build.
Ramps now work
Health and score enabled.
Enemies are more generalised now and can be added with a simple function.
Enemies are more automonous too.
You have a goal (get to the top)
you can die.
It is essentially a proper game.. albeit a rubbish one.
had to disable particles though.. the overhead of redrawing the screen was too much.
Yay, I won... absolutely nothing... :=
Nice work!
Yah, I killed Mario. ...Oh wait, that wasn't the goal...
Why are the castlevania backgrounds gone? liked them very much.
Anyway, this goes better each "release"!
castlevania backgrounds went because i needed a bigger area to test stuff
Great tech demo. What's up with the 'buttslide' move tho ;P
Give me a better sprite and i'll make it a super-awesome-slide move :p
Someone start drawing! :D
I'm still downloading(bluddydialup), but when I'm done I'll give it a try.
Also, just out of curiosity, what method did you use for the ramps?
Quote from: wonkyth on Sat 07/11/2009 12:32:00
Also, just out of curiosity, what method did you use for the ramps?
A bit of a hack.
I use region 1 to denote the platforms and check in the game loop to see if there is a pixel of region 1 above the current pixel, if there is then move the character up and check again. so eventually you end up in the top pixel of the region.
So in theory you move faster while going up stairs than on flat ground...?
Speed in the x direction stays constant. only the y position is changed.
but if you want to look at it terms of resultant vectors then technically yes.. though the same could be said of jumping.
Ok, I killed the baddies and got the star, but because I was holding down left at the time, I didn't get to see what it said. :(
One thing, you get weird things when you jump at the ceiling up and to the left of the star.
Either way, this looks great. ;)
Quote from: Calin Leafshade on Fri 06/11/2009 16:45:42
Give me a better sprite and i'll make it a super-awesome-slide move :p
Heh. Do you already have an idea what to create with it? Or is this just for a fun tryout
Im toying with the idea of making it an entry for this months MAGS.
I was thinking like a prison break in the style of Duke Nukem 2.. thats kinda like 'breaking in'.. kinda
The problem is that my graphic skills are poor :p
Quote from: Calin Leafshade on Sat 07/11/2009 17:22:25The problem is that my graphic skills are poor :p
that's what's the critic lounge is for ;). Altho, making all of it will be quite time consuming since you'll need to animate every enemy aswell. So I could help you a bit on the way, because I would love to see a finished AGS platformer.
(http://arboris.hell-on-earth.net/stuff/prison%20break.gif) (http://arboris.hell-on-earth.net/stuff/prison%20break.gif) (http://arboris.hell-on-earth.net/stuff/Prison%20Break.bmp)
I know not the best animator ever, but I tried to keep it as simple as possible for 320x200 resolution in mind.
6 frames in total, and 1 for standing still. (http://arboris.hell-on-earth.net/stuff/Prison%20Break.bmp) Frame 4 can also double for jumping up.
Thats very kind of you.
Would you like to see the latest build for your trouble?
Ofcourse you would
http://www.thethoughtradar.com/AGS/Platformer7.zip (http://www.thethoughtradar.com/AGS/Platformer7.zip)
Space to shoot enemies
or you can jump on enemies
or slide through them
Downloading...
Hmm, I've just been thinking.
It's about the wall sliding: I've always thought it would be neat to make a side-scrolling parkour game...
heh. In the first level i managed to get stuck between that second flying koopa trooper and Goomba. A small invulnerability timer might not be such an bad idea ;)
Quote from: Arboris on Sun 08/11/2009 13:17:10
A small invulnerability timer might not be such an bad idea ;)
Added to my todo list.
Quote from: Arboris on Sun 08/11/2009 13:17:10
In the first level
Is there more than one level?!?
I hadn't realised!
Amazing work you've done there! The second level was really slow on my aspire one so I guess that you would need a really fast computer if the games get more complex.
The second level includes more layers of parallaxing than the first one and a bigger sprite size.
on my machine the 2nd level clocks in at about 30%cpu usage with the effect and about 4% without it :p
so on the final release i will just add a switch to turn it off if needed.
but the game runs full speed on a P4 2.8ghz so it shouldnt be too much of a problem for most people.
Quote from: Calin Leafshade on Sun 08/11/2009 00:34:39
Thats very kind of you.
Would you like to see the latest build for your trouble?
Ofcourse you would
http://www.thethoughtradar.com/AGS/Platformer7.zip (http://www.thethoughtradar.com/AGS/Platformer7.zip)
Space to shoot enemies
or you can jump on enemies
or slide through them
sorry.but I cant download.(I think server is filter for me-I am from Iran).can you give me a mirror link?I need serious.
@MEHRDAD: I uploaded Platformer7.zip on Megaupload.com, download here (http://www.megaupload.com/?d=8XK91NMN).
Quote from: Calin Leafshade on Sat 07/11/2009 17:22:25
Im toying with the idea of making it an entry for this months MAGS.
Heh, good luck with that, you are doing really good progress ;) It would be nice to see something uncommon on MAGS.
(I was thinking about making a turn-based strategy for "Breaking in" MAGS, but then decided to postpone this crazy idea :D)
Quote from: [ Arj0n ] on Tue 10/11/2009 15:16:23
@MEHRDAD: I uploaded Platformer7.zip on Megaupload.com, download here (http://www.megaupload.com/?d=8XK91NMN).
Thanks a lot.download complete.
Can't wait for the source code on this.
Oh yeah!
Sorry, slipped my mind. I'll up it in an hour or soe after cleaning it up.
i release this on the condition that neither Monkey nor Khris download it.. they will shout at me for very very messy coding.
I cant 100% remember how the code works but if there are any parts which you dont quite understand just post and i'll see if i can help.
I wouldnt recommend using this as a base but rather an idea on how platformers work
http://www.thethoughtradar.com/AGS/PlatformerSrc.zip
Okay, quick question: I wanted to put a platforming minigame in my next game, but I can't figure out how to get gravity to work in a room. I think I've taken everything out of the global script that I took out of the room script, and the one with the global script still works. Any ideas?
Im not 100% sure what you mean. Do you mean you only want gravity to work in certain rooms?
The gravity part of the code is very very simple. Movement itself is not difficult. The difficult part in AGS is the damn collision detection.
The gravity literally works like this:
1)set the player acceleration to whatever input is require (jumping, running etc)
2)set the vertical acceleration to the input (jumping usually, which would be a negative force remember) plus the effects of gravity (which would be a positive force).
3)once the player has left the ground the effects of the jumping force would no longer be there so now we just set the vertical acceleration to whatever gravity is and allow that to chip away at the players vertical speed until it becomes positive and then the player will begin to fall.
Quote from: Calin Leafshade on Mon 08/02/2010 01:54:46
Im not 100% sure what you mean. Do you mean you only want gravity to work in certain rooms?
The gravity part of the code is very very simple. Movement itself is not difficult. The difficult part in AGS is the damn collision detection.
The gravity literally works like this:
1)set the player acceleration to whatever input is require (jumping, running etc)
2)set the vertical acceleration to the input (jumping usually, which would be a negative force remember) plus the effects of gravity (which would be a positive force).
3)once the player has left the ground the effects of the jumping force would no longer be there so now we just set the vertical acceleration to whatever gravity is and allow that to chip away at the players vertical speed until it becomes positive and then the player will begin to fall.
Just to clarify: I copied all code from your global script into my room script. There were parts of my room script that didn't apply, so I removed them (I need no enemies, and no particles). Once I got the original script modified to the point so that the game could run it, gravity wasn't working. Any idea as to why?
Only just spotted this thread CALIN LEAFSHADE = force to be reckoned with good job dude ;D