Last & Furious (MAGS Nov 2017 entry)

Started by Crimson Wizard, Fri 01/12/2017 17:38:56

Previous topic - Next topic

Crimson Wizard

Crimson Wizard and Jim Reed present:
(made for MAGS November 2017)

Last & Furious

Download links:
Dropbox: https://www.dropbox.com/s/0u7opdaxku1459c/Last%27n%27Furious.zip?dl=0
Mediafire: http://www.mediafire.com/file/wq8xgjbfyvalq40/Last%27n%27Furious.zip

Project source licensed under Creative Commons: By Attribution 4.0 (except music, which has its own authors and licenses)
https://github.com/ivan-mogilko/ags-lastfurious

Screenshots:
[imgzoom]https://i.imgur.com/YQu5AUR.png[/imgzoom]
[imgzoom]https://i.imgur.com/NhM9RUk.png[/imgzoom]


Description:
'Last & Furious' is a top-down racing game, featuring single track, two physics modes, wonky collision system and hastily set up opponent AI.

Controls: arrow keys.
Car behavior: can thrust forward, steer and brake (no backpedal, sorry).
Physics setup: when starting new race choose between "Safe" and "Wild" physics mode (they will give you two different experiences!). It is also possible to disable car-vs-car collisions (they still collide with the walls though).

Physics model in this game is actually configurable. If you feel adventurous, go to "Data" subdirectory. There you will find "race_safe.ini" and "race_wild.ini" files which contain parameters for related game modes.


Credits:
Code: Crimson Wizard;
Art: Jim Reed (was also generating tech ideas);
Music: "Car Theft 101" by Eric Matyas (www.soundimage.org), "Welcome to the Show" by Kevin MacLeod (incompetech.com).

Game DB page: http://www.adventuregamestudio.co.uk/site/games/game/2216/

Cassiebsg

#1
Congrats on the release!
It's great fun, you should be proud of it. (nod)

I did find a bug (or maybe it's a feature? (laugh))
Spoiler

Windowed mode: With physics and collisions on, I managed twice to get my car spinning out of control to the left! 8-0 Second time I even took my fingers out of the keyboard and the car just continued spinning as if I still pressed the up and left key. All that is missing is the smoke and sniping wheels animations! (laugh) In both cases I collided (1st with a another car, 2nd time with a wall). Bug occurred in opposite sides of the track (lower left corner and finish line corner).

EDIT: Forgot to say that if I click out side the game window and then return I regain control of the car and the keys start working like they should again.

Am I  the only to have stumble into this one?
[close]

Looking forward to the Deluxe version! (nod)
There are those who believe that life here began out there...

Matti

Not bad at all! :)

Great artwork and, while not perfect, very well made controls and physics! The AI works well too.

Had a go in safe mode and made 1st place and another one in wild mode where I made 2nd place. Doesn't seem to be too hard.

I'd love to see more tracks!

CaptainD

Already said I love this game and would love to see it being expanded.  Would be worth considering as a low cost commercial project I think?
 

Creamy

#4
Awesome game!
The feeling is good and Jim Reed nailed the 16-Bit Era graphics once again 8-)

My record time (2:16) for 3 laps on wild mode :
(Sorry for the bad quality - it looks better at a higher speed)
https://www.youtube.com/watch?v=cIuRMBXJlfg

 

Stupot

Almost flawless run, creamy.
You could probably shave a second or two off that if you took the shortcut to the left of the boulder on the dirt track.

Tabata


What a great way to show the possibility of the engine - you got my vote (even racing isn't my cup of tea (wtf) )
and thinking about the limit of time it is done - just "WOW!"


Chicky

This is really fun :) Well done to both of you, I'm amazed you've managed to put this together in a month. I must say, the name really is something special :)

Alan v.Drake

Nice, kudos to you Crimson and Jim!  :-D


- Alan

Crimson Wizard

#10
Thank you for kind words :).
My biggest concern was that game won't be fun enough to play, because we could not make good AI until the last part of the month, and I personally hated an idea to release the game without the "drifting physics" mode.

Original game's working title was "Crashcar", but then Jim wrote a list of titles, "Last & Furious" was in the end and I loved it, so chose that one :).

Stupot

#11
Addictive stuff. Incredible what can be pulled off in a month. What would be amazing would be a custom circuit builder.
But I'd settle for a few more tracks.

Also, as mentioned in the other thread, a multiplayer mode would be awesome, but I'd settle for some kind of web-based scoreboard where an encrypted code is generated based on your performance and you enter the code on a website which adds your time to a ranked scoreboard...

Or something.

Kumpel

The opposite! This game is a whole lot of fun. The track design is awesome and drifting that cars makes so much fun! I am already addicted to it. What's not so funny, is creamy's ridiculousely fast run... I am not even near that lap times.. 47 secs for one lap is a rarity (roll)

??? ??? ???

But I am VERY excited for getting to play the deluxe version in the near future!

selmiak

Wheeeeeee, this game is fun :-D
The smooth scrolling is awesome and the controls with normal physics are great to handle. I still have to get warm with the wild physics... the character portraits are a nice touch and the rest of the graphics are also fantastic. The rocks look so crunchy :)

I recorded my best times up to now in normal physics. Also I got stuck in the wall right at the start of the race and of the video :D

https://www.youtube.com/watch?v=AKzTENe1EwQ

kconan

  Kudos to you guys for making a fun old school racing game with AGS!  Looking forward to Last & Furious updates, deluxe versions, etc...

Two Tales

Impressive. To make a game like this using AGS is beyond my level of knowledge and understanding of scripting. Even more so to pull it off in a month.

ThreeOhFour

This is fun! I especially like it with the wild physics mode enabled and max opponents. Reminds me of playing Death Rally and 240 Racing as a kid, nice work. :smiley:

doctorfargo

Neat! Nice to see this made under the AGS engine! Reminds me of Amiga racers like Super Cars. :)

KyriakosCH

This game has the best name ever, and was a very nice project all-around (nod)
This is the Way - A dark allegory. My Twitter!  My Youtube!

Slasher

I think that given the time restraint (1 month) one can forgive almost any small issues....

Having said that, MAG virgin Crimson (and of course Mr Reed) have done a splendid job producing such a fine game that was Last and Furious without debut... Technical brilliance....

Now, if you two guys could make a snail race I may be in with a chance of winning (laugh)

Well done guys (nod)



Crimson Wizard

Quote from: Slasher on Wed 03/01/2018 09:38:39
Having said that, MAG virgin Crimson

0.o

I did 2 MAGS games before :):
2009 September, called "The Deed": http://www.mags-competition.info/?page=games&start=241
2009 October, called "One of a kind": http://www.mags-competition.info/?page=games&start=237

Creamy

QuoteWhat's not so funny, is creamy's ridiculousely fast run... I am not even near that lap times.. 47 secs for one lap is a rarity (roll)

??? ??? ???

Spoiler
[close]
 

shaun9991

Absolutely incredible AGS wizardry! Looks like a game I would have spent hours playing on the Amiga :)
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Crimson Wizard

#23
I still do not know if I am going to work on "better" version of the game, so decided to publish the game's sources.
It is not in repository anywhere (at least not yet), so simple download link for now:
https://www.dropbox.com/s/xsd49x9i6f7svsg/Last%27n%27Furious-Source.zip?dl=0

Source (script and art) is licensed under Creative Commons: By Attribution 4.0, which basically means you can do anything with the source (even make your own commercial games with it) so long as you credit original authors (me for the code, and Jim Reed for the art).

Game music is not covered by this license, each track has its own author and license, as noted in Music/licenses.txt.

You will also find Readme.txt, with brief instructions on how to build the game and edit game's data.


I believe that the script is in a pretty good shape. But due time constraints some parts were written hastily, have various hacks; the code style is also not always consistent.
Comments were added only during development, when time and mood permitted.
Some of the script modules are not used by the game anymore, namely VehicleSimple is the first variant of car physics, and RotatedView is a module that is used to dynamically create rotated versions of a sprite and assign them to the given view (silly idea when I wanted car to have only 8 or 16 visual directions).
Timer module featured in this source is an early version of this module, and may contain bugs, but I forgot to update it.

Kumpel

Thanks for publishing the source files! 8-0
I tried to get behind the magic al little bit (and how much moddable the design is to f.e. build my own tracks for it), but it seems the version you uploaded is broken. If I am trying to start the game, the cars don't move. Not in the demo mode and not when I am trying to start a game. Could you take another look please?

Crimson Wizard

#25
Quote from: Kumpel on Wed 28/03/2018 00:12:52
Thanks for publishing the source files! 8-0
I tried to get behind the magic al little bit (and how much moddable the design is to f.e. build my own tracks for it), but it seems the version you uploaded is broken. If I am trying to start the game, the cars don't move. Not in the demo mode and not when I am trying to start a game. Could you take another look please?

Did you copy "Data" folder to "Compiled/Windows"?
There is a readme.txt with instructions for setting up and editing the game.

Kumpel

Of course... not. Thanks! Now the game seems to have a problem with saving the checkpoints. It won't find the file. Is it a win10 problem? Do I have to manually create a folder in appdatadir? Where exactly? But why does loading work though?

And do you know how to do another track and let the game use it without editing the original room? Copying the whole room script and changing the Player.changeroom from the game menu script to the new created track room alone doesn't work. Your camera won't move to the start/finish line (which is exactly at the same spot). Found some eRoom305 events but I can't get behind the implementation of these to alter the code. Maybe it is all just too sophisticated for me to fiddle around with it (roll)

Crimson Wizard

#27
Quote from: Kumpel on Thu 29/03/2018 17:45:34
Of course... not. Thanks! Now the game seems to have a problem with saving the checkpoints. It won't find the file. Is it a win10 problem? Do I have to manually create a folder in appdatadir? Where exactly? But why does loading work though?

Does it show any errors? Did you follow instructions in the readme and setup a custom user data path, or just let it save to C:/ProgramData?


Quote from: Kumpel on Thu 29/03/2018 17:45:34
And do you know how to do another track and let the game use it without editing the original room? Copying the whole room script and changing the Player.changeroom from the game menu script to the new created track room alone doesn't work. Your camera won't move to the start/finish line (which is exactly at the same spot).

The game does not necessarily support multiple tracks out of the box. The script was never finished for that. A lot of things need to be redone there.
For example, right now it does not distinguish checkpoints file, ai setup file etc between the tracks - it will always read same ones.
Alot of code is unnecessarily put into room script, for example UI drawing need to be extracted into separate script.

Kumpel

Works now. I didn't know there was a difference beetween ProgramData and Program Files (laugh)

Setting up the AI is crazy though. Do you have any scales for me so that I know what a specific speed, threshold or radius value means? The readme is a little bit unspecific there.

And scrolling inside the editor mode would be cool (shouldn't be too hard to code, right?) although driving through the track to configure the nodes is a fun idea := (But I really had to deactivate obstacles. Ain't nobody got time for that! (laugh) )

Thanks again for the CC licence :)


Crimson Wizard

#29
Quote from: Kumpel on Sat 31/03/2018 01:17:20
Do you have any scales for me so that I know what a specific speed, threshold or radius value means? The readme is a little bit unspecific there.

Threshold and radius are literally in pixels, speed is pixels per second. IIRC the road is about 100 pixels wide, so 50 pixel radius for node put at the middle would cover whole road.
But these values are only meant for the reference, I do not have any formula or a method to predict the suitable ones. The process of setting path nodes is strictly trial and error, and a bit of intuition.
I was making AI part by part, moving starting position of player's car in script to avoid need of driving whole way by myself. I would sit there at some corner, wait for AI cars, check out how they pass it, adjust nodes, restart, adjust, restart, and so on. Took me about half of day (and that was the last day before deadline...).

selmiak

Does this mean there will be a new track to drive on soon?

a Leveleditor would be cool to have. Or even better something like the awards client where you meet up with 4 other drivers in an IRC channel for a chat and then play against the others online... in 10 years :-D 8-)

Crimson Wizard

Sorry for bumping this, there's no actual update, but I wanted to mention that I finally took time to create a proper repository for the game source, instead of dropbox archive

https://github.com/ivan-mogilko/ags-lastfurious

Dualnames

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

eri0o


Retro Wolf


eri0o

QuoteIs this our new local meme?

Yes!

About the actual project, that's a damn good README, I want to dive into the code soon, because I want to understand how the ini options were created. :) Very cool seeing the code!

Crimson Wizard

Quote from: eri0o on Thu 21/03/2019 17:08:16
About the actual project, that's a damn good README, I want to dive into the code soon, because I want to understand how the ini options were created. :)

I should ammend this to the credits, I am using IniFile module by WyZ:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=46631.0

Creamy

#37
Thanks for making the source code available, Crimson Wizard.

I try to use it for my MAGS game. It's working great but I have a problem:  I need to draw some objects behind the characters.
Is there a simpler way to do it than this?
 

Crimson Wizard

Quote from: Creamy on Sun 13/10/2019 20:04:36
I try to use it for my MAGS game. It's working great but I have a problem:  I need to draw some objects behind the characters.
Is there a simpler way to do it than this?

Please elaborate, what behavior do you have in mind?
Is anything prevents you from simply using room objects or other characters for this?

Creamy

#39
The expected behaviour: the player controls a paper plane with an adjective written on it. It passes over pictures. When the player is over the right picture and press the spacebar, the picture changes.

I can't use different backgrounds because I have several pictures that must be changed individually.

I can't use objects because they are always drawn on top of the character's dynamic sprite, notwithstanding the baselines.

The normal characters behave the same way (always drawn on top).
Maybe I could use one of your AI characters. Is there a way to disable the collisions?
 

Crimson Wizard

Quote from: Creamy on Sun 13/10/2019 21:47:53
I can't use objects because they are always drawn on top of the character's dynamic sprite, notwithstanding the baselines.

The normal characters behave the same way (always drawn on top).

This is unexpected. Objects and characters must abide baselines.
There is nothing special in my "AI characters", they are regular characters and will follow same rules.

What baselines do you have set for the paper plane and for objects that must be behind it?

Creamy

#41
It's working.

Stupidly, I had tried to set baselines for the objects but not for the characters.
I had supposed that the baseline of the characters would have been at their feet if they were working (which doesn't seem to be the case).

Thanks for your patience.
 

Creamy

Hi Crimson,

Can you please tell me how to get rid of the opponents? I need them to disappear at a certain point.

I've tried to make them go in another room:
Code: ags
  cAICar1.ChangeRoom(1);
  cAICar2.ChangeRoom(1);
  cAICar3.ChangeRoom(1);
  cAICar4.ChangeRoom(1);
  cAICar5.ChangeRoom(1);


Or to update the race options:
Code: ags
ThisRace.Opponents = 0;


It doesn't crash the game but it doesn't work.
 

Crimson Wizard

ThisRace.Opponents = 0 will do nothing if you set it during the race, it makes sense only before the race began.

And when race updates all participants are forcedly have their room changed to current one:

in VehicleBase.asc
Code: ags

protected void VehicleBase::SyncCharacter()
{
    <...>
    if (this.c.Room != player.Room)
        this.c.ChangeRoom(player.Room);
    <...>
}




I don't remember all details, but quickly scanning through code shows that each struct has a variable that tells that particular racer or car is active and should be updated.
In Vehicle class this is IsInit variable, and in Racer class this is IsActive variable. Setting these to false should stop game from updating them.
For RaceAI class there seem to be vehicleIndex that must be >=0 , so setting it to -1 might disable the AI.


Jack

CW, when are you and JimReed making LnF2?

2 Last
2 Furious
?

Crimson Wizard

Quote from: Jack on Wed 23/10/2019 22:57:17
CW, when are you and JimReed making LnF2?

This was never in plans.


Creamy

#47
Thank you again CW.
Clumsily fiddling with your code, I was able to achieve what I had in mind.

Now, it's hopefully the final stretch. The game works fine when I test it in the editor. However it keeps its old behaviours when I compile it:
- it doesn't start in the right room,
- the AI cars use your old sprites,
- your game menu can be accessed with the escape key (which I had disabled).
- even my airegions are not taken into account.

Any life saving tip?
 

Crimson Wizard

Have you renamed the project directory but did not clean up Compiled folder? That's the only thing that comes to mind.

Creamy

 

SMF spam blocked by CleanTalk