|
Post by matthew on Dec 6, 2006 7:38:09 GMT -5
I thought that some of you might have been getting bored with my excellent Fractal Programmes. So I've decided to start work on a platform game. ;D At the moment the game is just a single screen with two small platforms and a Red-Square. You can move the square using the Left and Right Cursor Keys and Jump using the Space-Bar. I hope to make the playing area larger and improve the graphics and Collision Detection. If you want to try out this version then get it here.
|
|
|
Post by hartnell on Dec 6, 2006 9:05:15 GMT -5
Great job. Brutus2D gets it's first platformer. A small step for a programmer, a huge leap forward for Brutus2D. I get errors if I move off screen though. -hartnell
|
|
|
Post by matthew on Dec 6, 2006 9:56:46 GMT -5
Thanx for the comment... I should have said that if you moved off screen an error would occur. I was working on a short routine to limit the sprite so it couldn't move off the screen but I didn't have time to get it finished. I'm currently working on a new version with a larger playing area. Update... Just made a new version, it looks the same as the first one but it's now got collision Detection so you don't fall off the side of the Screen. Get it here. ;D
|
|
|
Post by Guilect on Dec 6, 2006 17:17:37 GMT -5
A Red Hero Square platformer oh boy. I hope he doesn't run into any of those blue meany circles.
Very nice start.
The check for being on a platform currently is only looking at the left side of the red square. Use the following to also look at the right side.
' If he's stepped off a Platform... IF Graphics.MapGetAtt(X,Y+31) <> 1 And Graphics.MapGetAtt(X+32,Y+31) <> 1 And Key.Pressed(VK_SPACE) = FALSE THEN
|
|
|
Post by matthew on Dec 6, 2006 19:20:34 GMT -5
^^ Ha, don't worry about the Red Hero Square. He definitely won't be in the final version of the game, I'm just using him until I'm sure that the programme works. Then I'm going to go to one of those free Sprite sites and download a new set of 'hero' sprites from there. Well done for noticing that the platform collision detection code needed updating. I could never understand why the Red Hero Square kept falling off the Left-Hand side of the platforms. I just thought he was suicidal. ;D
|
|
|
Post by hartnell on Dec 6, 2006 23:20:54 GMT -5
It's coming along nicely. Mark Overmars has had a basic platformer tutorial for Game Maker for awhile. It lays out the foundations of making a platformer and is a good read for anyone starting a platformer, even though it is for Game Maker. You can find it here : gamemaker.nl/tutorial.htmlLook for : Tutorial: Platform Games (zip file, 1.6 MB) -hartnell
|
|
|
Post by u9 on Dec 7, 2006 0:16:42 GMT -5
A Red Hero Square platformer oh boy. I hope he doesn't run into any of those blue meany circles [...] This reminds me of a story by Edwin Abbott Abbott, Flatland 1,2, A Romance of Many Dimensions. It's a story about squares and circles, and how a higher dimensional being would have God-like powers over lower dimensional beings. Quite interesting reading actually.
|
|
|
Post by matthew on Dec 7, 2006 4:48:33 GMT -5
^^ Never heard of him before but his stories sound interesting. Mark Overmars has had a basic platformer tutorial for Game Maker for awhile. I've just downloaded it, found it very useful and it's given me some ideas. Update...Made a new version with a scrolling screen, the scrolling isn't perfect yet though, if you wander off the side of the screen you'll get an error warning. But I'm working on this. You'll also notice that the platforms have got a black outline so they stand out from the background. Get the new version here.
|
|
|
Post by hartnell on Dec 7, 2006 15:21:25 GMT -5
Looking good. Just a tip: NOW is the time to start commenting your code. Extensively. -hartnell
|
|
|
Post by OddChild on Dec 7, 2006 17:07:45 GMT -5
This will keep you from wandering off the screen when scrolling. IF Key.Pressed(VK_LEFT) THEN IF Falling = FALSE THEN Jumping = FALSE End IF IF Graphics.MapGetAtt(X-1, Y) <> 2 and x > 320 THEN X = X - 1 else if viewx = 0 then X = X - 1 else if x > 0 then ViewX = ViewX - 1 end if end if Graphics.SetX MySprite, X Graphics.SetY MySprite, Y End IF ' Moving Right IF Key.Pressed(VK_RIGHT) THEN IF Falling = FALSE THEN Jumping = TRUE End IF IF Graphics.MapGetAtt(X+32, Y) <> 2 and X < 320 THEN X = X + 1 else if viewx < mapwidth then x = x + 1 else if x < 800 then ViewX = ViewX + 1 end if end if Graphics.SetX MySprite, X Graphics.SetY MySprite, Y End IF
Going to be out in Jordan for 3 wks... might not be here... so no worries if i dont respond.
|
|
|
Post by Guilect on Dec 8, 2006 7:12:42 GMT -5
^^ Don't worry we'll be here when you get back. Say hello to the King for us.
|
|
|
Post by matthew on Dec 8, 2006 7:24:09 GMT -5
Just a tip: NOW is the time to start commenting your code. Extensively. ^^ Message understood. ;D OddChild, I added your scroll-code to my game and made a few modifications to it. Now my game scrolls just like a professional platformer. Get the new version here. I'm now going to spend some time redesigning the background graphics.
|
|
|
Post by hartnell on Dec 9, 2006 0:15:05 GMT -5
It scrolls well now. The gravity is kind of iffy. You float down like a feather. -hartnell
|
|
|
Post by matthew on Dec 9, 2006 5:28:42 GMT -5
Small update, for hartnell. I've altered the rate at which the 'Red Hero Square' falls at. Get it here.
|
|
|
Post by robylu on Dec 12, 2006 5:00:04 GMT -5
Finally i got time to try it: it's really a good start for a game i like it very much. Keep on working on it!
|
|