Outrace

Creations

geed

2 weeks ago

Hello world


A small port of a lesson by javidx9, a youtuber who speak of programmation !

https://www.youtube.com/watch?v=KkMZI5Jbf18&t=728s

it was very interesting foor a noob like me :)


Try it on real hardware, it's far better than the emulator.

I think i will "polish" it to create a real small "time-attack" game.


Some links on the subject :

http://www.extentofthejam.com/pseudo/

https://codeincomplete.com/posts/javascript-racer/




View full creation

Sutchig

NEW 2 weeks ago

Looks good!

I found this link very helpful: http://www.extentofthejam.com/pseudo/

geed

2 weeks ago

Yes, it was very few sites who explain "how to" old race game work. I will add some link i've found !

jicehel

NEW 2 weeks ago

Great new, i hope that your game will be cool. I'll have a look on it tonight. Race ame was one of the thing missin i had listed on the Meta. Happy what you make one and i hope that later we'll be able to play linked with another console by bluetook, wifi or other possibility.

geed

NEW 2 weeks ago

Sutchig Sutchig

Yes, it was very few sites who explain "how to" old race game work. I will add some link i've found !

SiegfriedCroes

NEW 2 weeks ago

Really nice! One of my first experiments with the Gamebuino META was a fake 3D race track just like this. I was quite proud to figure it all out on my own :)

jicehel

NEW 2 weeks ago

Alot to read but very interesting. I have read quickly, it's alot of thing to unerstand all. You may maybe compile all these informations and your code to explain to all with illustrations and code parts ? and how to customize. I think that with your  game motor,we could have cool games mods.

geed

2 weeks ago

Look the video ! He explains everything !

But his code use many "float" and complex math formula. I think i can simplify this, but how ?


I'm ask "reals" programmers, if i use only bytes, simple formula (addition/soustraction) and array instead of sin(x) function, do you think it will improve gamespeed ?



PS : i add some sprites and modify some physics.




geed

NEW 2 weeks ago

jicehel jicehel

Look the video ! He explains everything !

But his code use many "float" and complex math formula. I think i can simplify this, but how ?


I'm ask "reals" programmers, if i use only bytes, simple formula (addition/soustraction) and array instead of sin(x) function, do you think it will improve gamespeed ?



PS : i add some sprites and modify some physics.




Sutchig

NEW 2 weeks ago

for instance, in the video he's using car position from 0.0 to 1.0 as float. you can use -40 to 40 (-screenWidth()/2 ... screenWidth()/2) that can fit within a int_8t. And drawing your sprite is drawCar(position, fixedY). You have to modify the formulas for calculating the car position depending of curvature. ;)

Same goes for curvature, maybe hills etc.

for sin etc.:

You can calculate your sin() into an arSin[] in the game (will land in RAM), or precalculate into an const int_8t arSin[0,3,5,6,7,8,7....]; that will be stored in Flash. (dont know about amount of cpu cycles loading from different locations, on atmel328 loading from RAM is faster (1cycle vs 2 cycles) as far as i remember)

If you store <256 values of sin(), your index will be uint_8t, that should be enough. Same goes for the values itself, they can be 0...255 instead of f0.0...f1.0. Multiplication of two int8_t will result in an int16t.


geed

2 weeks ago

ok ! Thanks :)

Mission of the day : Remove float !

Aurélien Rodot

2 weeks ago

Using int8t will save RAM which should not be an issue here. It won't be faster than int32 as it's a 32-bit CPU.

That's why we advise to use just "int" types when possible which makes the code easier to read for newbies :)

geed

NEW 2 weeks ago

Sutchig Sutchig

ok ! Thanks :)

Mission of the day : Remove float !

jicehel

NEW 2 weeks ago

Yes you can keep oriinals formulas in comment to adapt it. You can add a licence choice too to determine what others can do in your program but we should have someone who know how it's works who explain us about all of that.

Pharap recommand MIT, Apache 2.0 or BSD-3 because they are simple and you can have details here: https://choosealicense.com/licenses

Of course, you can choose the Unlicense too. I profit of your works to speak about that because i think what your motor wiill or could be used for alot of games with other gameplay / graphics. To know: Graphics (or part of them) can be licensed by another licence. For example CC BY_NC-SA would allow anyone to reuse your graphics and modify them, but they wouldn't allowed to profit from the raphics, they have to credit you as the oriinal author and have to release their graphics under same license (Thanks Pharap for these infos).
Note:  If you add a CC BY_NC-SA, your works is no more considered as open-source and 'free' (in term of freedom), so you may use CC BY-SA 3.0v(see https://creativecommons.org/licenses/by-sa/3.0). or CC BY only credits are required, CC BY-ND don't permit modification, CC BY-NC don't permit commercial use, so CC BY-NC-ND don't allow modification our commercial use...  (have more info about them on: https://freedomdefined.org/Licenses/NC)


Maybe it's could be another(s) field(s) in the creation page to let people choose their licenses and be able to find it easy (Mainly with the depot of zip in creation, else it's mean we have to add these informations into a text file in the zip). 

Aurélien Rodot

NEW 2 weeks ago

Sutchig Sutchig

Using int8t will save RAM which should not be an issue here. It won't be faster than int32 as it's a 32-bit CPU.

That's why we advise to use just "int" types when possible which makes the code easier to read for newbies :)

Sutchig

2 weeks ago

Ah, thanks for clarification. I really should read the specs ;)

Sutchig

NEW 2 weeks ago

Aurélien Rodot Aurélien Rodot

Ah, thanks for clarification. I really should read the specs ;)

geed

NEW 2 weeks ago

Small update.

Remove sin function for background considerably increase performance, bizarre ....
I try a version without using float, it was same, more bizarre :p

Sorunome

2 weeks ago

Remove sin function for background considerably increase performance, bizarre ....

Not that bizarre, trig functions tend to use a lot of computation, so something like a LUT or some cheating with simpler, approximated math, usually does the trick well

Sorunome

NEW 2 weeks ago

geed geed

Remove sin function for background considerably increase performance, bizarre ....

Not that bizarre, trig functions tend to use a lot of computation, so something like a LUT or some cheating with simpler, approximated math, usually does the trick well

jicehel

NEW 2 weeks ago

He was jocking  :D

You must be logged in in order to post a message on the forum

Log in