AGS Kart

Started by SinSin, Sun 22/04/2012 21:33:22

Previous topic - Next topic

Icey

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

Crimson Wizard

Quote from: icey games on Thu 25/04/2013 19:54:45
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.

Icey

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.

Khris

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.)

DoorKnobHandle

That runs really, really well on my system. Excellent work, Khris!

selmiak

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.

Crimson Wizard

Quote from: Khris on Fri 26/04/2013 05:33:44
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

Working on a RON game!!!!!

Khris

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.

Crimson Wizard

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.

Khris

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.

Calin Leafshade

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

That's cool!
The size feels right. The turning is slow, but you probably know that.

Crimson Wizard

#193
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

Khris

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

[imgzoom]http://i.imgur.com/vLGqOoe.png[/imgzoom]   [imgzoom]http://i.imgur.com/opP5JNB.png[/imgzoom]

Steady 40 FPS with an 800x800 map

Ryan Timothy B

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.

selmiak

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
[imgzoom]http://i.imgur.com/fPIwRUU.png[/imgzoom]
[close]

Khris

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.

Ryan Timothy B

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)

Khris

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.

SMF spam blocked by CleanTalk