Jibble

Author Topic: AGS Kart  (Read 32615 times)

Jonathan Wedge

  • It's the time of ICEY!!!
    • Jonathan Wedge worked on one or more games that was nominated for an AGS Award!
Because from the way I'm thinking of it and what calin is saying. I thought it would be to much work but still possible. The main thing I was thinking of was can ags run it all in one game? Will it run to slow or make a computer run to slow. I honestly don't know how it all would work out but I was just sharing maybe it would be best to divide the work up and focus 2 games. The menu and stuff won't take that long(btw the menu game is nothing more than just a launcher) and the 2nd game will be the race game. Sorry if I'm explaning it confusingly but really I'm just stating the same thing over and over so no says that I'm not making any sense. Need more of an example? I'l draw one up for you but not now cause I busy. :D

Because from the way I'm thinking of it and what calin is saying.
I haven't seen Calin saying anything that would suggest that there's a problem of fitting everything in one game.
What he said is that AGS script is too slow to program quality rendering in the race game.
Game speed does not depend on how much levels and menus you put into a game, because engine does not update all levels at once, naturally, only current room.

Jonathan Wedge

  • It's the time of ICEY!!!
    • Jonathan Wedge worked on one or more games that was nominated for an AGS Award!
That's what I mean, the menu would be a launcher to launch a individual game instead of just sending the player to the next room. It seems to be for AGS to do, it's a smart engine but not a genius. Not saying you guys can't figure out another way or dig more into the source code of AGS itself. I don't know if coding the a race room is that easy for who's doing it but if it is then all they have to do is do a bit of copy and paste and if you 4 tracks then you can have 4 individual games, 1 track per game. Also if done this way even after it's finished let's say we wanted to make a extra track the source was released and someone wanted to make their own track then that all can be done so easily.

Eici pls
There's no reason AT ALL to split up the game into several exe files. (roll)
Let's move on.

I decided to give this another shot, and started over from scratch.
Here's a preliminary demo: download

It's runs at a pretty decent framerate on my PC, and even on my old-ass laptop. It's still jittery but I have one or two ideas that might further reduce that.
(Also, no driving physics or other fancy stuff yet, this is all about the feasibility of mode7.)
Fail at Floaty Rog' now!  still having to deal with what games are going through

DoorKnobHandle

  • Mittens Serf
    • DoorKnobHandle worked on one or more games that won an AGS Award!
    •  
    • DoorKnobHandle worked on one or more games that was nominated for an AGS Award!
That runs really, really well on my system. Excellent work, Khris!

selmiak

  • ǝsıɔɹǝxǝ ʞɔǝu puɐ uıɐɹq
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
    • selmiak worked on one or more games that won an AGS Award!
    •  
    • selmiak worked on one or more games that was nominated for an AGS Award!
wow running really smooth. But the map felt small, do you think it will still run that smooth with bigger maps?

Also would a mapdesigner have to draw in boundaries and powerups 360 times per map? Sounds like this would become a cool engine without maps ;)

if AGS could render these maps from a base map on first access and also rotate all the hotspots and walking areas which are like boundaries and powerups I want a mapeditor now ;)
even when AGS renders these maps from 1 file the filesize on hdd could explode, this is 64mb now, bigger maps mean more filesize (in exponential growth? dunno about relation of canvas size to filesize in pcx) and even triple doubling for rendered hotspot and walkable area maps. Not that hdd space is a problem nowadays but suddenly having 1GB occupied by a kartracergamelevel seems funny.
Can AGS created and later access zip files? Could be a solution. Or reduce the size of the kart and decrease movement speed so the world feels bigger.

I decided to give this another shot, and started over from scratch.
Here's a preliminary demo: download

That's just cool :).
Just a small suggestion: set Multitasking Mode while level is loading so that the loading won't freeze if user switches to other window (may be annoying for long load times).

miguel

  • Onions? Give me back my onions!
    • miguel worked on one or more games that was nominated for an AGS Award!
38fps nearly all the time. Great job!
Working on a RON game!!!!!

Thanks guys!

What's still the biggest problem is the rotation of the map sprite. If I do it in real time, the game slows to a crawl for big maps, and it jumps like crazy (because of rounding errors in the way AGS rotates a sprite, I assume). I coded my own nearest neighbor sprite rotation, and since rotating a 512x512 sprite 359 times took around ten minutes, I decided to save them as files, hence the big download. The result is what you saw, it's still kinda jumpy, but that's in part because ints and shortcuts in the rendering loop. The rotation itself is actually really smooth.

I'm going to try and use my rotation for a 1024x1024 map, but it's going to take really long (thanks CW for the multi-tasking tip, I totally missed that!)
Let's see how that goes; once the rotated sprites are available, track size shouldn't matter except for Out of Memory errors (which I actually got when I tried a 1024 sprite...)

But, regarding map size: if you can live with the track being a bit pixelated, 512x512 isn't actually that small, as long as you "zoom in" on the track. I've changed the factor so that Mario is smaller in relation to the track, and also a bit slower, and it suddenly seems much wider.
Fail at Floaty Rog' now!  still having to deal with what games are going through

Well, 1024 x 1024 x 360 = 377.487.360.
8-bit sprites: ~400 MB
16-bit sprites: 750+ MB
32-bit sprites: 1.5+ GB

This will make it perhaps the most memory consuming AGS game ever...

But I still don't understand, I remember there was an 3d engine plugin by DKH, why could not you use that for instance? Surely rotating camera over texture would be far less hassle.

Sure, one could write a plugin, or use an existing one. But I mostly see this as a challenge, like, can we get this to work with "just" AGS.

Regarding a track designer; imagine you'd have to redraw boundaries for every sprite or place every object 360 times, pure madness. And of course this isn't necessary at all, the game can easily calculate the position based on a level design for the angle 0-map.

I've switched to an 800x800 sprite. Works fine so far, but generating the rotated versions took ages, and the sprite folder takes up 360MB.
Switching to 8bit will quarter that size, so that's the next step. I've experimented with this but the colors ended up all wrong. I'll continue working on this tomorrow, for now: TGIF.
Fail at Floaty Rog' now!  still having to deal with what games are going through

Calin Leafshade

  • Long live King Cat!
    • I can help with making music
    • I can help with voice acting
    • Calin Leafshade worked on one or more games that won an AGS Award!
    •  
    • Calin Leafshade worked on one or more games that was nominated for an AGS Award!
My attempt:

https://dl.dropboxusercontent.com/u/27247158/agskart.zip

That's about the best that is possible in the AGS engine as far as i can tell. It *might* be possible to do some filtering with some more precomputation but I'm sceptical.



Cursor keys to move the camera.

selmiak

  • ǝsıɔɹǝxǝ ʞɔǝu puɐ uıɐɹq
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
    • selmiak worked on one or more games that won an AGS Award!
    •  
    • selmiak worked on one or more games that was nominated for an AGS Award!
That's cool!
The size feels right. The turning is slow, but you probably know that.

I remember there was other way to make racing games in pseudo-3d style; don't know how it is called properly.
The track is stored as polygons in 3d, but in game it is drawn by horizontal lines.
Hopefully what I say make sense, cause I can't figure how to explain this better.

Maybe this: http://en.wikipedia.org/wiki/Scanline_rendering
« Last Edit: 26 Apr 2013, 19:59 by Crimson Wizard »

Latest version:
https://www.dropbox.com/s/udlvs98kdea6gzr/AGSKart_v3.rar

The proportions should make more sense now.

Warning, the download is a ridiculous 100MB! :D

Edit: Screenshots

   

Steady 40 FPS with an 800x800 map
« Last Edit: 26 Apr 2013, 21:32 by Khris »
Fail at Floaty Rog' now!  still having to deal with what games are going through

I can't download your version at the moment, Khris (lazy and my hard drives are full as all hell - I might have to start deleting some movies before I order a new HD). Is there any chance you could post a screenshot?

Edit: Nevermind. I managed to find some space and downloaded it. Looks really nice buddy.
« Last Edit: 26 Apr 2013, 21:32 by Ryan Timothy »

selmiak

  • ǝsıɔɹǝxǝ ʞɔǝu puɐ uıɐɹq
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
    • selmiak worked on one or more games that won an AGS Award!
    •  
    • selmiak worked on one or more games that was nominated for an AGS Award!
Vroooom Vroooom!!!
You guys are great.
@khris: Would it be possible to cut down filesize by only using 180 rotations and calculating or otherwise overlaying the images for the 1° in between?

@Ryan:
big screenshot in spoiler
Spoiler: ShowHide

I did try using just 180 frames. That way the kart can only go in the direction of 2°, 4°, 6° etc. but it doesn't look much different to what I'm currently using so yeah, that would cut the file size in half.
Still, going the 8-bit route is probably unavoidable in the long run.

Using both methods combined, an 800x800 track would use up 45MB. That's pretty reasonable I guess.
Fail at Floaty Rog' now!  still having to deal with what games are going through

I may or may not be working on something. There's a chance it could look better than Calin's, but I'm not guaranteeing anything, or even if it's going to get finished and all the issues worked out.

(But I believe it may end up being too laggy to not actually be feasible.. I'll find out very shortly)
« Last Edit: 28 Apr 2013, 15:22 by Ryan Timothy »

Just in case you're trying a raytracing approach: even if you draw 3x1 or 2x2 pixels, it's going to lag unless you reduce the width and height of the area.
Not sure how it could look better than Calin's though, unless you're actually incuding anti-aliasing in the process. Disregarding AA, Calin's looks like a 100% pixel-true transformation already.
Fail at Floaty Rog' now!  still having to deal with what games are going through