GLBasic forum

Main forum => Off Topic => Topic started by: Schranz0r on 2013-Mar-31

Title: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Schranz0r on 2013-Mar-31
Hi freakz :)

I have a gameidea, not realy new, but i think it's a cool gamemode:



This kind of game in GLBasic with maybe NewtonSDK would be cool!
You welcome to help!

A little community game?!
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Mar-31
Love it...reminds me of  xtreme racer on the amiga....add a pinch of stunt car racer.
I have read a bit of race code like lotus these days and the excellent snippet mr.T did.

But on this case...would code 3d be better? Or to try out a 2d technik would be easier? Just some thoughts
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Schranz0r on 2013-Mar-31
3D and Newton :)
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: mentalthink on 2013-Mar-31
I think better use Box2d and 3D, really you can make a fake physics whit this kind of game...
i want help, in fact I'm thinking doing something similar from a long time ago, but always the time...
But whit 2D Box runs in all platforms...

and about Bullet?¿ The engine it's wrapped, only need some little touch for working in mobile devices... I try a couple of time to make a port, but really sometimes C++ makefiles and all this things are really confuse.

Comment me, for 3D graphics I can help you (in weekends)
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-01
Nice. So we have some approaches to the thing...what abou a track editor and the AI?
Would it be plain 2d on ground or some 3d going on height...bullet is nice :)
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: matchy on 2013-Apr-01
Great idea. What do you need?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-01
Great queztion... I can help too...what is needed.?
Pz. Damn mobile tapping..
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Marmor on 2013-Apr-01
we need mode 7 .
3d with texturefiltering is possible and imho the fastet solution.
:whistle:

Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Schranz0r on 2013-Apr-01
I think 3D is the coolest solution! ( lowpoly?! )

I realy like the N64 Version of Mariokart the battlemode is so fun  :good:
Bullet is wrapped ? i miss something?


Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: mentalthink on 2013-Apr-01
Yes Schranz0r, bullet it's wrapped but don't works on mobile devices... (but it's possible use box2D, I don't try yet  but not i's complex... really it's make the "real game" collisions and all this things in a 2d World, after you only have to do the translation at 3D world... sometime ago, I did a car racing game whit this technic but don't was finished beacuse I don¡t know how make the AI of the enemies...)

About low-Poly yes, but the graphics appears nice... I make a lot of test and GLbasic can move a very good number of polys, make a game like this it's very very factible...

I find a very very very previous stage of the code... I did the cars nice and some Scenarios, but I forget this files... But you can see the idea about using box2D and 3D... for add the 3rd Axis, it's possible use getpixel in example or measuring some points of the scenarios... I think not it's too  much hardest make a fkae 3d Physics... really don't works exactly 3D but works...

Put the screen to 1600x1200, else you can see the 3D viewport coplete...

PS: In the forum I think in 2d Snippets, a example for a car whit physics it's do it... works very very fine, I think can be very intersting look this.

Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Marmor on 2013-Apr-01
entitydistance is faster and will work also on mobiles because its only some math .
the level - car collision needs a proper solution .
for car- car / car-bullet / and level-shoot collison  a distance math is better as a lib which not working on all targets

car-level collisions testing is a bit complex because the level isnt flat and have some extras (tunnel etc.) onboard.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: matchy on 2013-Apr-01
It seems it would be easy to use box2d as long as the playing field is leveled. So side slanted roads, bridges and tunnels are okay but not bumps and some exceptions to ramps and hills.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: mentalthink on 2013-Apr-01
No Matchy I think make some jumps and ramps not it's complex... if you make the game in 2D, like I did, imagine you put a box in some part of the circuit, when the car 2D collides, you say... I have speed X then the jump it's X*2, or the equation needed...

Another way it's put all the circuit in a only way straigth line, when you pass in the 2D world, you go drawing in real time in this line what appends whit the altitudes in the circuit...

For draw altitudes in 2D it's easy , you can dram a ramp, whit a degradate...

All this ideas I don't test yet, but have to works... really not are 3D physics, but the player don't think if this movement it's real... it's nice then it's ok... at least I think at this manner...

ps: @Matchy , I'm waiting you send me the drawing for your game  ;), I don't send nothing yet for this.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: matchy on 2013-Apr-02
Astro GoGo on the SNES is a favorite game and I'd like to start off like that.

mentalthink, I would like to think about his game more but after I finish my current game now that you mention it. You probably didn't hear from me as I had a break over the Easter holidays break but I suppose I'd better start an update blog for that now.  :whistle:
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Wampus on 2013-Apr-10
Oh, had an idea similar to this and ran into trouble with it. Click here to see the thread (http://www.glbasic.com/forum/index.php?topic=6337) ( TLDR Drawing so many tiles was very slow )

While writing Porcupop I found a way to fix the slowness issue. If you need a routine to draw the tiled map very fast I could write something to do that and others could dissect and use it how ever they want.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Wampus on 2013-Apr-13
I've been playing and with some help from Kanonet with OpenGL, came up with this...



It has no physics except the bare minimum for kart movement. I want to make a small battle-mode game for 1GAM (http://www.onegameamonth.com/). It won't be very ambitious and won't use a fancy physics library. However, if its useful at all I can post the source code of the final game.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: bigsofty on 2013-Apr-13
Now, that's cool!  :D
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-13
Great! Really smooth.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: matchy on 2013-Apr-13
Very good and I couldn't have done better regarding the 3D so you win this challenge lol. Ambitiously it would be nice with box2d and net multiplayer.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Schranz0r on 2013-Apr-13
WOW, how you make the "Mode7"?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Marmor on 2013-Apr-13
its usefull ! send the code !  :D

looks great !,
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Ian Price on 2013-Apr-13
Looks awesome. That's proper 3D though, not Mode7, isn't it?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Wampus on 2013-Apr-13
I don't know if its due to childhood nostalgia goggles but I liked the battle mode on the first SNES Mario Kart more than the later games. I'll be happy if I can capture some of how much fun that was while also adding a few extra things that hopefully don't break the gameplay.

And yah, not mode 7. Only made to look like it. :)

Because its real 3D its expensive. The track map is comprised of 16,384 tiles (128 by 128 map size). Drawing all that brings the framerate down from the optimum on older PCs. The area outside the track also has to be drawn for a large distance too, otherwise empty spaces show up near the horizon. I'm using Kanonet's libSPRITE routines for the billboard sprites and the track map itself. Its very handy.

Quote from: matchy on 2013-Apr-13
Ambitiously it would be nice with box2d and net multiplayer.

I would love to make use of networked multiplayer. Box2D too. The trouble, as it usually is for all of us, is about the amount of time I can give this. It would take me too long to put together a decent routine for lag compensation. With the physics it will be faster to write a simple simulation myself rather than tweak Box2D, though I have a nice physics editor that can export to Box2D. Hmm.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: mentalthink on 2013-Apr-14
It's really nice, and it's good idea only paint over a plane the circuit... really looks very fine...
Title: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Kitty Hello on 2013-Apr-14
Why not use real mode 7? Just polyvector a 4 noded surface and calculate the u,v positions by a moving, rotated parallelepipe on the texture?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Schranz0r on 2013-Apr-14
Quote from: Kitty Hello on 2013-Apr-14
Why not use real mode 7? Just polyvector a 4 noded surface and calculate the u,v positions by a moving, rotated parallelepipe on the texture?
heee?  :blink:
Title: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Kitty Hello on 2013-Apr-14
On a texture that has the complete map, draw your player as a tiny line. That line is the bottom of the screen. Then, in the direction of view, draw a rectangle, that goes wider with more distance. That goes to the center line of the screen. Know what i nean?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-15
I think I get it...something like drawing on a single texture like a 2d game but then use polivector to plot the world on perspective? Sounds great :)
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Wampus on 2013-Apr-15
A huge 2048x2048 texture with changing texture co-ords would work and almost certainly be faster, only I like the idea of having tiles in order to animate water, lava or anything that could be animated on a tile by tile basis.

The other thing is, if the large texture was done using a 4 noded polyvector I think it would have affine texture mapping. This is what I mean:-

(http://upload.wikimedia.org/wikipedia/commons/thumb/5/57/Perspective_correct_texture_mapping.jpg/400px-Perspective_correct_texture_mapping.jpg)

The middle example shows what I think would happen.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Moru on 2013-Apr-15
This was exactly what happened when I tried this but that was version 7 of GLBasic, haven't tried it since then.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Slydog on 2013-Apr-15
Quote from: Wampus on 2013-Apr-13
The track map is comprised of 16,384 tiles (128 by 128 map size). Drawing all that brings the framerate down from the optimum on older PCs.

Are all textures on the same texture atlas / sprite sheet?  Instead of drawing 128x128 tiles, you could group them into 'chunks' (MineCraft style) of say 8x8 tiles.  That would then be only 16x16 chunks (of 8x8 tiles).  Each chunk would be 128 triangles (8x8x2), so should be handled quickly.

But looking very cool so far!  :good:
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: siatek on 2013-Apr-15
Why don't create a 3d model of the track and textured it with tiled textures ?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-15
on the affline subject, if the quad has 2 extra points on each side, would that fix it?
Something similar to 9 quads together forming a big quad, but a single polygon.

3d tracks would come cool too.

One idea:
I once thought of a top down racer and went around trying to design a free-draw -> title map utility.
Like you would draw white over black and the computer would analyse the image and transform it into a tiled track. :good:
Never came around to code it though :(
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: siatek on 2013-Apr-16
Like this one ?? ;)

It's really speed modeling but tommorow i can add more details ...
Textures are taken from: http://www.textures-resource.com/wii_gamecube/MarioKartWii/moonview.png

So what you think guys ?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-16
I think my chin just dropped :o

It looks awesome! What if the road blocks are 3d tillable?
Damn, such a nice example gives me the urges to try one too :|

I love it! :-*
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: siatek on 2013-Apr-16
Thanks Erico im glad you like it :)
All textures all tileable ...
I rip them of from the link above and put to separate files ...

Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-16
I meant the objects, like road blocks (lego, so to make it easier to build tracks).
Like those old TCRs (Total Control Racing)... a pic appended.

Textures are nice. I like the way you UVmapped them along the roads! :good:
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: mentalthink on 2013-Apr-16
Very nice siatek the Circuit model... very good textures and colors!!!  :good: :-*

If anyone need my models for something comment me , and I leave here, I do this today, because I want do a car game or something like FZero of PS1..

You can see the track have a lot of subdivions, this it's because I want try to make the curves whit Heigth, looking the normals, can be more easy apply the physic forces when the car get the curves...

Basically it's for use doing a editor whit Glbasic... if it's needed comment me.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-16
I get the idea on the height collision.

I think I would not know how to do them on 3d.
On my mind, I would do the engine 2d top down, and then display it 3d.

I would try to calculate everything on 2d. Should work, for some ramps and jumps and rivers, but I´m not sure it would work if the world plane and roads itselves were to go up and down.

Nice models! Graphic wise I see there would not be any problem doing such a game! :good:
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: mentalthink on 2013-Apr-16
YES Erico thinking in 2D it's very easy, in 3D really it's only an idea, but i think can works...

Only you have to think in the normals of the polygons.. whit the Normal and a fix position you can calculate a triangle whit 90 degrees , after a bit of Maths you can do things...

Thanks for your comment about my GFX.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Wampus on 2013-Apr-17
Oooh, those 3D tracks look great. Also, drawing so many tiles in 3D is bound to be slower than drawing a nicely crafted track like in the posts by siatek and mentalthink. The polygon count would be so much lower.

Slydog, reducing the triangles drawn by splitting the map into trunks would be much quicker. I still want to animated tiles though, which would be a pain if I had to store so much in memory. For example, lava that has 6 frames of animation would require just 6 16x16 tiles if I stick to a 128x128 tile map. If I drew the map in chunks then I would still need to keep each chunk stored 6 times for the overall lava effect, which amounts to 6 2048x2048 textures.

I am probably going to be lame and stick to the 128x128 tiles thing, without 3D track drawing or stuff like that. I would make things look that much nicer, if I wasn't in such a rush.  :'(
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Slydog on 2013-Apr-17
Could you just chunk the non-animated tiles?  And leave holes where the animated tiles are?
Then just draw the animated tiles individually.

It may save a few fps.
Just a thought.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Slydog on 2013-Apr-17
Or better yet, separately create one big model (or even sub-chunk it) of ALL the same animated tiles together.
(All the lava would be one model, water another, etc).
Then draw the entire lava model (at location 0,0 if that's where your world is), which would fill in the holes.

If each animated tile quad was uv mapped to an animation frame inside a texture map, then you could texture shift the entire lava model (by one frame) with a simple command, to get the animation.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2013-Apr-17
I see the way you think Slydog, and I kind of almost see the way Wampus think....

Heck. You both guys must be right? It is the kind of stuff I would have to give a go before opinioning further (can I use opinion as a verb?).
Damn I wish I could :(

I´m still willing to help out any action into this idea. :good:
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Schranz0r on 2013-Apr-17
 :good: I like how you guys think about the idea itself!

How about this:

Collision in a 2D-Array, Drawing in 3D.
If you drive up a ramp, the array(2D) switches to the floor you drive at.

Think its easy to do, and we can use the 2D-Array for a Minimap :)
Maybe Box2D for better collisionhandling?!
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Ian Price on 2013-Apr-17
I had the same PolyVector Affline issues with something I was working on a long while back too. I can't remember what it was now, but it wasn't Mario Kart related though.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: kanonet on 2013-Apr-17
Btw an idea how i would do it:
1. Create the track in one mesh like mental did it
2. pack all possible tile textures into one single sprite
3. load the mesh ina way that you can draw it with gldrawarrays
4. if you want to animate one tile, just update its texture coordinates on the mesh
5. draw the track with gldrawarrays ;)
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: matchy on 2014-May-21
The idea of a Mario Kart clone has got me experimenting with a 3D tiled racing track recently. Here's a quick test with bots opponents that only go in four directions. All sprites textures are created internally!
:good:

Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: erico on 2014-May-21
Gee, super!
The fact that the other cars are going on the track is already ace to me! :good:
Do you have plans for that? or was it just a test?
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Schranz0r on 2014-May-21
 :O  NICE !!!
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: matchy on 2014-May-21
:) No big plans although maybe a track editor tool. The were/can be set to free moving but I need working on cars getting back on track on some turns, so that's why they just act like on rails in the test.
Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: Ian Price on 2014-May-21
 That's lovely and smooth.   :good:

Are you currently painting a track sprite (or individual images) onto a 3D plane and then displaying that or is it just one big texture?

Title: Re: [Game Idea] Game like Super Mario Kart : Battlemode
Post by: matchy on 2014-May-22
They are individual sprites mapped on a 3d tile-map, unlike one big texture like snes game Astro Go-Go of FZero.