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/AppGameKit Studio Showcase / [WIP] [TIER 1] Top Down Car Game

Author
Message
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 7th Jul 2013 19:23 Edited at: 3rd Aug 2013 18:13
Yes.

Working on getting a car to work in box2d in top-down view. Most projects like these that I have found online use commands in box2d that we do not possess in AGK. But I think I'm getting close.

The graphics are 100% placeholders. The game will probably not even be a racing game but I find it useful testing the car on a road. If anyone is curious how I achieved this I have no problem sharing/helping with box2d fiddling.

This will likely end in a sort of bash-the-zombie-horde-with-vehicles type game (or just a racing game)

Latest Video: Showing the workings of the AI



Update: New controls, car follows cursor/touch



Update: Testing AI - Green car 100% computer controlled.

Settings to the AI car change after about 30 seconds

My hovercraft is full of eels
Lost Dragon
13
Years of Service
User Offline
Joined: 22nd Aug 2010
Location:
Posted: 8th Jul 2013 05:09
Mowing down zombies in a car that you could upgrade with more zombie-mowing devices would be pretty satisfying.
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 8th Jul 2013 13:48
That is the plan. The point would sort of be to maintain speed on a debris-ridden road in the middle of a big city post-zombie-apocalypse and smash into the horde as hard as possible. With upgrades to buy and/or pick up on the way

My hovercraft is full of eels
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 8th Jul 2013 15:50
That handling looks sweet, and the tire tracks are looking awesome.... Make sure you turn em red for a period after mowing down one of the zombies.

Howling did this take roughly?
Pino of DFT Games
10
Years of Service
User Offline
Joined: 8th Jul 2013
Location: Ireland
Posted: 8th Jul 2013 15:59
nice concept
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jul 2013 18:10
Looks nice. The car seems to handle very well!


this.mess = abs(sin(times#))
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 8th Jul 2013 21:13
Thanks for your comments peeps. I'm working on a new way of controlling now that will suit mobiles better - you point at the screen and the car revs depending on how far from the car you point, and the wheels steer towards the pointer.

Quote: "Howling did this take roughly?"


There was howling involved, yes, well spotted.

It took a few hours to hone in the physics.

My hovercraft is full of eels
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Jul 2013 21:21 Edited at: 8th Jul 2013 21:21
Make my day and make an super cars clone
Great work bye the way.



Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 8th Jul 2013 21:40
Nice one Cliff.

There are so many possibilities opening up now that the car runs OK that I'm going to struggle to keep it simple


First post updated with video of new controls

My hovercraft is full of eels
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 02:35


Something like that Cliff? Just a bit of artwork left and a bit of pathfinding AI's

My hovercraft is full of eels
haliop
User Banned
Posted: 9th Jul 2013 05:36
man it looks amazing really sharp!
i just have one question about the Car following the "Pointer" which can be a mouse or a finger..

well.. if its a finger since im assuming you are aiming this awesomeness to Mobile devices... well.. wont the finger hide the zombies?!?!?!?!?!?

just keep that in mind that big fingers may actually ruin parts of the game , where it will hide the entities where it is.. so even if the car is at the middle of the screen and everything will slide towards it (scroll) still when there will be a zombie or a new zombie that just appeared it might hide it , then the player cant really see the new incoming threat.

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 09:24 Edited at: 9th Jul 2013 09:27
This is a good point and something I feared. I don't really like this control system right now and will probably try something else.

Thing is I really dislike virtual joysticks on touchscreens.

Using getDirection() doesn't really work either, never had a game feel right using that.

On PC using joystick it's amazingly fun sliding around the track, I hope I can transfer the fun to mobile.

I'm going to try having a button on each side for steering, and acceleration controlled with tilting. Or just autoacceleration, always on.

My hovercraft is full of eels
haliop
User Banned
Posted: 9th Jul 2013 09:58
no no no
do it the other way around


use a slide bar and a pusher for the Engine Torque and the tilting for the sterring

Slide Bar code:



i think this would fit awesomly while mainting the fun factor.
also in this way you can also create a Gear system for the player if he wants , like Manual Mode in some racing games, only that here you really need to place the right shift. ! cool stuff.
this is not my code btw , its Markus thnx markus.

haliop
User Banned
Posted: 9th Jul 2013 10:00 Edited at: 9th Jul 2013 10:00
haliop
User Banned
Posted: 9th Jul 2013 10:16
also you can hide all the sprites and it will still work...
use collision instead of getSpriteHit(x,y) , for the finger create a dummy sprite and in the loop follow the it by the finger

SetSpritePositionByOffset(dummy,GetPointerX(),GetPointerY())

this will assure that the Slide Bar/ Pusher will work flawlessly even if theres a zombie on it ... and once it is not shown its kind of cool just to slide your mouse on the screen and see whats happening
also about the Gear shift , you can make it without really introducing a gear on screen..

what you can do , is check for a real time automatic gear change then just reset the pusher button all the way down , so now the player needs to push it up again... which will simulate gears really nicely. (hope this helps)

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 10:35 Edited at: 9th Jul 2013 11:32
@haliop

Thanks for all your input.

I don't like tilt-steering on mobiles, it just never feels right.

I've considered a manual gearbox, but only if this project moves from arcade to more of a simulation.

We'll see where this goes Keep the ideas coming

EDIT:

Updated first post with new videos

My hovercraft is full of eels
haliop
User Banned
Posted: 9th Jul 2013 11:40
ok so i think the best solution for the input
is to let the user choose , in options or before starting a session..


1. pointer based.
2. virtual buttons.
3.
4. etc...

cause as i can tell from what i can see now is that it will be awesome no matter what you'll do , i really liked the trails on the grass turning brown. great stuff..mind telling how you do it?

sprites? lines ?

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 9th Jul 2013 11:50
@lilpissywilly
long ago i begin a car game with pre-calculated angle to each track(left/right)
on the route (and for the whole area). this angle i used for help steering and keep on track. also useful for ai cars.
for player steering i divide the input from gamepad with the pre-calculated angle somehow.
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 11:52
Quote: "ok so i think the best solution for the input
is to let the user choose , in options or before starting a session.."


I think you are right about the controls. I'll keep tweaking all options and leave it to the player.


Quote: "sprites? lines ?"


I have a little thing that kind of calculates how much traction the car has, a lot of the physics is based on this. I normalize that value to be 0.0-1.0 and then simply plot sprites (a limited amount) from each back tire based on that value.

My hovercraft is full of eels
haliop
User Banned
Posted: 9th Jul 2013 11:58
and do they dissapear after some time or do they stay?

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 12:02
Quote: "and do they dissapear after some time or do they stay?"


They are kept in two arrays, which rolls around. So what happens when new tracks are made the oldest skid-sprites are just moved and the color changed. No new sprites made, just cycling.

My hovercraft is full of eels
haliop
User Banned
Posted: 9th Jul 2013 12:06
yeah thats about how i do it .. but instead i moved onto placing them in files.. then you dont need arrays at all
and you can devide the files by positions on the map
so file 10x10.dcl ("dcl" = decal) is for 10x10 on the map
file 20x20.dcl is for 20x20 etc... and so on.. this way
you dont use alot of Ram which mobile devices lack of it
and you can create pretty much unlimited decals ...
the trick is , not to overrun it , write a new decal on top of another so it wont draw it again etc...
i have now in my project nano 1.23 about 500 mb of decals and such
so just think this trough if you'll add AI or go Multiplayer Arrays are not good cause of the specs on Mobile Devices and especially if you go multi player and some will play it on Iphone 3 and some on Iphone 4 which have a bit more ram then it.

hope this helps, (i know it is)

haliop
User Banned
Posted: 9th Jul 2013 12:07
btw if you do choose to stick with Arrays then go for Memblocks since they are much faster then arrays.

haliop
User Banned
Posted: 9th Jul 2013 12:14
and one more thing , in my app i use only 1 sprite for all decals draws...
i just change it evertime and draw it ...
therefor the Draw stays and the sprite change this way instead of getting up to 500 sprites (which agk can handle) for lets say 5 cars , 100 per car... you use 5 sprites and you get the same result

and even one more thing i should point you at (i feel like i have to )
when i started using DarkGDK i created an awesome 2D Top Down Shooter and i had plenty of cars in it and all kind of cool Visual Algorithems
the cars i had were from this site:
http://www.the-blueprints.com/blueprints/

this site has it all , and about 99 percent of all vehicles there have a top view , so what you do is , you download the blue prints and you paint inside them the colors you want , it could be easily transformed into AppGameKit to draw them by itself , so you can create a mass array or (files) of blueprints and let the player choose their color , this way you get 10000000000000000 cars without any effort and they are free from that site , Enjoy , please make an awesome Zombie GAME!

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 12:47
Right yes ok thanks Nice input haliop

My hovercraft is full of eels
haliop
User Banned
Posted: 9th Jul 2013 15:26
almost forgot if you are planning on using the file system instead of arrays just know that its better using Big Files rather then small ones...

when i first started i used files up to 100MB each but then it turned out that OpenFile CloseFile commands takes too much time so i moved onto 200 MB files which is smoother on the system

Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 9th Jul 2013 15:28 Edited at: 9th Jul 2013 15:29
This looks excellent, well done!!! I attempted a 'Micro-machines' remake, but was no where near as good as this... Loving the skid marks (it's not often I praise someone for their skid marks )
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 19:29 Edited at: 9th Jul 2013 19:36
@Funnel7: Thanks!

On another note, I think I've thought of another "minigame" to make out of this:

Drift-Racing

Premise being, you score points for drifting, but if any wheel (skid) ends up outside the track that drift is rendered pointless. But lap time also counts so you can't just drift around in circles to win. Hazards will include oil slicks and rain.

The zombie one will also happen, but that will be a bit more involved

My hovercraft is full of eels
haliop
User Banned
Posted: 9th Jul 2013 20:39
MAYBE in Drift - Racing you gain score like this:


use a check point system , a check point can go 2 ways:

1st. you start with an amount of Points , the point decrease in time by a multiple value and you drift your way to the next check point , this means the player will try to do his best to gain extra points from drifting and also to not lose too many points cause once you get to the next check point you gain a decent amount of points and again they decrease in time until the next checkpoint and so on...

2nd. each check point is a multiplayer , so if you drift from 1st checkpoint to 2nd you gain , Drift points * 1
when you pass the 2nd till third you gain drift points * 2 and so on ... this way the player is encouraged just like before to gain more and more points.

and the end point (you can do this on both method) you calculate the amount of time the player took to reach from one check point to another , sum them all and get the average , then you give him a bonus time to drift until the time runs out.

damn that was a good self brain storming.
btw add a zombie or 2 on the way just for extra points.


dude omg... i just thought of something...

Build a racing game
call it
Race Game ... (with zombies)

so the zombies are just an extra visual kick for a nice decent racing game.. just like all other racing games rather then carmageddon style game... good old fashion racing game with some zombies just for the fun of it.

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 22:03
You haven't by any chance burnt and caught wind of any of those plants portrayed in your platformer tutorial haliop?

J/K. Nice ideas H

New video of an AI I was testing:


About 30 seconds in I change the AI's cars traction and control, effects are immediate.

My hovercraft is full of eels
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Jul 2013 23:39
I've included a demo as an APK for anyone who wants to try this on their android device.

Controls are now the two buttons on screen, the right one to turn right, and the left one, well you guessed it. Acceleration is automated. Can you beat the AI fair and square?

My hovercraft is full of eels

Attachments

Login to view attachments
haliop
User Banned
Posted: 10th Jul 2013 07:27
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 10th Jul 2013 19:05 Edited at: 10th Jul 2013 19:06
Nothing really new to show today.

But a decision has been made; three games will be made from this "engine".

First, the drift game. Solo play where you collect point by drifting around a track. New cars unlockable.

Second, Retro Racer, race against the AI and gain money by winning races and upgrade your car in a sort of story mode.

Third is the never ending drive, a post apocalyptic driving game where you mow down zombies and other inconsiderate bastards with your car. Collect upgrades along the way.

My hovercraft is full of eels
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 13th Jul 2013 01:07 Edited at: 13th Jul 2013 01:07
Update:

Made a track editor yesterday. Kind of realized it could be used in any sort of game, but still.. it's a track editor

I'll happily share the code of this simple editor if anyone wants it.

.PNG or .JPG are simply placed in media/editor/ and will automatically pop up in the scrollable bar on the left, ready for placement.

Early look at the editor, couldn't be bothered to upload another video


My hovercraft is full of eels
haliop
User Banned
haliop
User Banned
Posted: 13th Jul 2013 07:58
cool stuff one suggestion!


make a button for "Auto Alignment" "Auto Sizing"

this you can rapidly add stuff for the ones who dont want to mess with it too much.

milhaus
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location:
Posted: 13th Jul 2013 08:01
Looks great!

How about just using the whole left hand side of the screen for left and the whole right hand side for right? I always find my fingers slipping away from button hit areas when things get frantic.
haliop
User Banned
Posted: 13th Jul 2013 08:06 Edited at: 13th Jul 2013 08:07
btw if you remmber the decals we talked about using files
i have just managed to add the same amount of decals with a 90 percent accuracy in file sizes of /10000
so the same decals file that cost earlier about 200 mb
is now about 70 kb

so actually with my Codec
you can have a full hd image of 1920x1080 instead of a few MB when saved it is now about less them 35 KB HIP HIP HORRAY !!!!

so if last week a full game session with 100000000000 decals cost the hardrive about 500 MB / half a Gigabyte
now it cost about 100 KB

damn AppGameKit is awesome.

so if you think of it
i can now create ULTRA DUPRA TUTRA PUTRA KUTRA HD files in less then 1 MB , which means an image res of 100000000x100000000 will cost less then 5 MB ?
should i go to the big companies with that?

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 13th Jul 2013 10:06
Quote: "How about just using the whole left hand side of the screen for left and the whole right hand side for right? I always find my fingers slipping away from button hit areas when things get frantic."


Yeah I implemented this the other day, missing the buttons was driving me (and others) mad.

Quote: "so if you think of it
i can now create ULTRA DUPRA TUTRA PUTRA KUTRA HD files in less then 1 MB , which means an image res of 100000000x100000000 will cost less then 5 MB ?
should i go to the big companies with that?"


Definately! The NSA might be interested. Although, they already know now.

My hovercraft is full of eels
greenlig
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 13th Jul 2013 10:29 Edited at: 13th Jul 2013 10:29
Real quick suggestion with the controls (girlfriend is rushing me out the door), have you played Mini Motor Racing?

https://play.google.com/store/apps/details?id=com.nextgenreality.minimoto&hl=en

Their controls are fantastic on touch devices, and much like you had in some of your earlier videos.

Project looks awesome, btw!!

ZacDuff.com
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 13th Jul 2013 10:44 Edited at: 13th Jul 2013 10:50
Quote: "Real quick suggestion with the controls (girlfriend is rushing me out the door), have you played Mini Motor Racing?

https://play.google.com/store/apps/details?id=com.nextgenreality.minimoto&hl=en

Their controls are fantastic on touch devices, and much like you had in some of your earlier videos.

Project looks awesome, btw!!
"


Thanks! I'll check it out

Edit: They want money, bastards. But, it looks like they use an on-screen steering wheel, correct?

My hovercraft is full of eels
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 13th Jul 2013 11:50
This game looks great, I like the physics and track editor. I am about to start my racing game soon, how do you handle AI?

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 13th Jul 2013 15:38
Quote: "This game looks great, I like the physics and track editor. I am about to start my racing game soon, how do you handle AI?"


At the moment it isn't really an AI. The "AI" follows the central position of the next track-piece, so it's like on rails.

It uses the "follow-the-pointer" controlsystem I set up for the player (not using anymore), but instead of the pointer it gets the coordinates from above mentioned way.


In the editor I'm currently adding a way of setting waypoints for the "AI". And I think I'll set three different point in each spot so that the "AI" can choose a route depending on where other cars are.

Don't think I'll make it more complicated then that, but we'll see.

My hovercraft is full of eels
R1im
10
Years of Service
User Offline
Joined: 13th Jul 2013
Location:
Posted: 13th Jul 2013 15:56
Nice games, physics seems decent but need more improvement if you want to achive something "different". If you get it public i might add it to my online car game list

I love car/racing games
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 13th Jul 2013 16:03
Thanks lilpissywilly, OK just read your name properly for the first time

Your system seems to work well, and it's pretty simple, I will probably do the same. I will maybe add a target speed value to each waypoint so the car knows to speed up or slow down at any given time.

Good luck with this.

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 13th Jul 2013 16:43
I have a normalized value for that, 0.0 - 1.0 which I multiply with the AI's top speed. It does work in all its simplicity yes

My hovercraft is full of eels
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 13th Jul 2013 18:53 Edited at: 14th Jul 2013 00:26
New video of the editor, now with waypointsystem for fake AI




All graphics is placeholder

Edit:

Maps and waypoints now load into the game and the "AI" works just fine. Hooray


Edit #2:

Quote: "Nice games, physics seems decent but need more improvement if you want to achive something "different". If you get it public i might add it to my online car game list"


Thanks. The physics are under constant tweaking and I have four cars now that all behave slightly different. Adding this game to your list when it's done sounds just fine to me

My hovercraft is full of eels
haliop
User Banned
Posted: 14th Jul 2013 02:13 Edited at: 14th Jul 2013 02:13
that could be cool for someone who really wants to create his own AI movement.. but it wont talk to the modern casual user.. you should really get that automated.

Edit: like ppl just dont really like the hard work.. they just want to build tracks and see how it goes..

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 14th Jul 2013 09:35 Edited at: 14th Jul 2013 09:43
And the user will know how the AI operates.. how?

It's just one way of solving it. Who's to say having some sort of pathfinder using raycast would work better.

Besides to which, maybe the AI will be a combination of the two.. it's hardly the finished article

My hovercraft is full of eels
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 14th Jul 2013 11:47
Will the editor be available to the user?

I am under the impression it's just for lilpissywilly, to automate development.

Login to post a reply

Server time is: 2024-04-19 23:35:50
Your offset time is: 2024-04-19 23:35:50