Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / WIP - Hot Lap

Author
Message
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 11th Sep 2011 18:57 Edited at: 11th Sep 2011 19:25
Who says AppGameKit can't do 3D? I present my current WIP, Hot Lap.





Video of it in action (no sound):

The capturing makes it look a bit jerky, but it's silky smooth when you see it live.

It will be a driving game in a similar vein to Pole Position. I've got the road snaking left and right, and the road offsets as the car turns.

Next on the list is tidying up the steering code and how the mountains in the background scroll.

Then it's onto track side objects, and actually creating a track. Currently it randomly chooses between a straight, left curve or right curve.

I also want to get hills/valleys as well, but that bit of code isn't working proerply yet.

Once that's all done, I'll move onto part 2, which will hopefully include split screen racing

Edit -> Video embedded. Thanks conjured.
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Sep 2011 19:09 Edited at: 11th Sep 2011 19:20
OMG!
Pole Position!!!

That looks sweet.
I'm gonna love playing that one!

Quote: "What's the code for embedding a YouTube video rather than linking it? "






DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 11th Sep 2011 20:02
Wow! I tried to do this effect in DB awhile back and found it very difficult. Nice one! I was hoping to do something like this but couldn't think of a way to get the track data in. Maths is not my strong point

I take it you use a lot of sprites to achieve this effect and offset them as the track twists. I could simulate the 3D effect, but couldn't work out a nice formula to move it as and when needed, so ended up with no way to get smooth corners in.

Nice work, any suggestions as to how you got the corners to work would be great.

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 11th Sep 2011 21:04
Quote: "Who says AppGameKit can't do 3D? I present my current WIP, Hot Lap."

No its 2.5

I heard that alot when writing my raycast engine

Cool stuff!

Have you planned for how you are going to do the track editor?
Its probably the hardest part?

Keep us updated!!
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 11th Sep 2011 21:17
Quote: "I take it you use a lot of sprites to achieve this effect "

Well, there are two images for the road, one with the red border, and one with the with border. They're stuffed into an animated sprite, cloned into an array of 150 objects and then scaled.

Corners are made my offsetting the x position of each line.

Quote: "No its 2.5"

I know, but it's the closest we're likely to get for some time.

Quote: "Have you planned for how you are going to do the track editor?"


There won't be an editor as such. I'll just make the tracks out of the stock pieces. For instance, straight, straight, right curve, straight, right curve, straight, straight, right curve, stright, right curve would make a sort of oval track.

If the track 'sections' are listed in an array I can loop it round to the beginning again to make the track repeat. In real life, the ends of the track might not meet up, but it would be a good enough approximation for the game.

I do have control over the tightness of the corners, so I could make long lazy bends or really sharp chicanes.
Once I get the hills and valleys sorted, I can add elevation changes to the individual track sections.
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Sep 2011 22:06 Edited at: 11th Sep 2011 22:11
Quote: "I also want to get hills/valleys as well, but that bit of code isn't working proerply yet."

The original didn't have them anyway.
If I remember right though, the car graphic turns as it makes a turn.
For me, that steering code you mentioned would be more important than hills right now.
The screeching of the tires affected the score too, so it was important not to loose traction on the curves.

Keep us posted on the progress!

Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 11th Sep 2011 22:31
I know there were no hills in Pole Position, but I want to end up with a 2.5D racer engine. But you're right, no point having lots of bells and whistles if the basics aren't in place.

I just grabbed a couple of Pole Position car sprites to get them on the screen, so there isn't any turning animations for them yet. I've only really been working on it for a couple days, so I haven't really spent any time on the graphics.
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 11th Sep 2011 22:41
Quote: "Once I get the hills and valleys sorted, I can add elevation changes to the individual track sections. "

Shouldt it simply be somekind of cos sin routine that simply changes the parts for the road in the distance on its y cordinates?

Simply so do i mean an array with y cordinates that you scroll thru towards the car,or simply se the y cordinate as an depth cordinate for the road ( Z in an 3d program ).

The parts close to the car will always be at the same level as the car drives up that hill.

Its an illusion to the eye the same way as with raycasting.

Raycasting is simply screen columns that change there height scale to give the illusion of distance.

If you make the slices for the road close to the car larger and change there size according to there distance so will you get an good feel of distance to.

And also makes its simplier to make the illusion of hills.

I just want to tell you to not give up how hard this project may seam some times ?

Its the people that not give upp that gets there

Sorry if my post seams confusing as my english is bad
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 12th Sep 2011 02:11
This is some kul stuff. We had this in the arcade when I was young. There was also a bike version and the controller was a life size bike that you tilted with your body to turn(just like a real bike). It always had a line...

If you need any custom graphics, shoot me an email.

Neuro
20
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 12th Sep 2011 07:30
This is fricken awesome ! Would like to see more of this !
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 12th Sep 2011 15:45
Quote: "Shouldt it simply be somekind of cos sin routine "

I don't think it even needs to be that complicated. Hopefully I'll get a chance to have a play about with some new ideas tonight.

Quote: "Sorry if my post seams confusing as my english is bad"

It's fine. I understood what you were trying to say. You're English is better than my Sedish!

Quote: "There was also a bike version and the controller was a life size bike that you tilted with your body to turn"

If it was a sports bike, then it was probably Hang On or Super Hang On. Enduro Racer was a similar game (that featured hills) but was set off road on a trials bike.

Quote: "If you need any custom graphics, shoot me an email."

Thanks. I have an idea for the car graphics which I want to try out at some point, but in the short term, Pole Position sprites will do the trick

Quote: "This is fricken awesome"

Thanks!

Quote: "Would like to see more of this"

Don't worry, I'll update the thread as I make progress.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 12th Sep 2011 17:07
Yes, I know the corners are made by offseting the sprites, I just struggled to work out a formula to create nice corners. Taking a wild stab, made corners, just very odd looking ones. At the minute my 2.5D skills are limited to the Streetfighter II floor effect.
See, now if my maths teachers had said "This stuff will help you make games" at school, I would have paid way more attention!

Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 12th Sep 2011 17:22
I hope my explanation doesn't confuse, but here we go..

For a corner, you offset the road sprite at the horizon by (for example) 1 pixel to the right. That scrolls down, and you offset the sprite that's now at the horizon by 2 pixels to right, keep doing this so each sprite on the horizon is more offset than the last. When you come out of the corner, you just do it in reverse, slowly reducing the offset until the road is straight again.

The thing is that some of the numbers in the calculations are very, very small, and making random adjustments to them can have some quite dramatic effects.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 12th Sep 2011 23:44
Looking good Bursar! I was thinking about making a 2.5D game like that just to see if it could be done, now you did it, so I don't have to, haha thanks Now I'm off to my egg dropping chicken physics game project...

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 13th Sep 2011 01:43
The week before AppGameKit came out I wanted to prototype a future AppGameKit game of mine which would look 3D but actually be 2D.

I came up with this in DBPro



Just in case anyone was wondering, the enemy's sprite sheet was made using SpriteMe: http://forum.thegamecreators.com/?m=forum_view&t=189201&b=5

Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 13th Sep 2011 03:14
Quote: "Now I'm off to my egg dropping chicken physics game project..."

mwuhahahahaha

Quote: "The week before AppGameKit came out I wanted to prototype a future AppGameKit game of mine which would look 3D but actually be 2D....Just in case anyone was wondering, the enemy's sprite sheet was made using SpriteMe: "

lol
Nice plug
Nice looking sprite tool too. (the work on the fpsc model example is awesome)
Good luck hockeykid

Login to post a reply

Server time is: 2024-03-28 20:05:59
Your offset time is: 2024-03-28 20:05:59