Archive of the Gamebuino Classic forum (2014-2018), rebuilt from the pages kept by the Wayback Machine: only part of the topics and pages were captured. Read-only. Removal on request: hi@gamebuino.com.
Forum › Project Guidance & Game development
[RELEASED]Untitled Little Racing Game aka B-Rally
Sutchig Tue Mar 08, 2016 4:26 pm
after waiting some time, i made a little racing game (started around Christmas)...
Status is not nearly alpha... its more like a PoC :), as i have only half a hour per day.
But: its playable, has opponents and has a gameover-screen :P
HEX-File is attached, Screenshot too.
Usage:
A - accelerate
B - brake
Left/right - left/right
ToDo:
-Track is only a MockUp, want to use PetitFatFS to stream the track on-the-fly from SD-Card.
-more Signs
-collision detection
-simple AI for opponents
-tuning of driving parameters (lower the increase of speed at higher speeds for instance)
-....
Idea of Pseudo3D-Road is from http://www.extentofthejam.com/pseudo/
Idea of grey floor is from IsleOfManiax :)
Edit:
ForumThread: viewtopic.php?f=17&t=3407
Status is not nearly alpha... its more like a PoC :), as i have only half a hour per day.
But: its playable, has opponents and has a gameover-screen :P
HEX-File is attached, Screenshot too.
Usage:
A - accelerate
B - brake
Left/right - left/right
ToDo:
-Track is only a MockUp, want to use PetitFatFS to stream the track on-the-fly from SD-Card.
-more Signs
-collision detection
-simple AI for opponents
-tuning of driving parameters (lower the increase of speed at higher speeds for instance)
-....
Idea of Pseudo3D-Road is from http://www.extentofthejam.com/pseudo/
Idea of grey floor is from IsleOfManiax :)
Edit:
ForumThread: viewtopic.php?f=17&t=3407
Attachments: R_PROTO4.zip RPROTO4.gif
clement Wed Mar 09, 2016 7:53 am Re: [WIP]Untitled Little Racing Game
Very nice POC.
:geek:
:geek:
clement Thu Mar 10, 2016 9:05 am Re: [WIP]Untitled Little Racing Game
some return :
The game is too fast, I cant anticipate the turn, and I cant see other cars.
In my gamebuino the road and gray floors are not so differente. Maiby the constrast in my gamebuino is not good?
otherwise good work man!
+++
The game is too fast, I cant anticipate the turn, and I cant see other cars.
In my gamebuino the road and gray floors are not so differente. Maiby the constrast in my gamebuino is not good?
otherwise good work man!
+++
Sutchig Thu Mar 10, 2016 8:19 pm Re: [WIP]Untitled Little Racing Game
Many thanks for your feedback :)
following things are changed (i edited the first post and uploaded a new zip file):
-game speed is slower (est. 2/3 of original speed)
-opponents are slower, too - but not 2/3 ;)
-decreased acceleration (it takes longer to reach max speed)
-changed track mock-up: curves are not that "curvy" anymore, sign slightly ahead of curves
Hope, this is better :)
I forgot: added cpu usage
And contrast (grey) is fine with my gamebuino
following things are changed (i edited the first post and uploaded a new zip file):
-game speed is slower (est. 2/3 of original speed)
-opponents are slower, too - but not 2/3 ;)
-decreased acceleration (it takes longer to reach max speed)
-changed track mock-up: curves are not that "curvy" anymore, sign slightly ahead of curves
Hope, this is better :)
I forgot: added cpu usage
And contrast (grey) is fine with my gamebuino
clement Sat Mar 12, 2016 7:13 am Re: [WIP]Untitled Little Racing Game
It very good.
I can see opponent, and I finish 6!
The gameover screen is prety good ;) !
I change the contrast on my gamebuino and the grey is Good.
I can t wait to see next step.
You plan to share source-code?
++
I can see opponent, and I finish 6!
The gameover screen is prety good ;) !
I change the contrast on my gamebuino and the grey is Good.
I can t wait to see next step.
You plan to share source-code?
++
Sutchig Sat Mar 12, 2016 8:36 pm Re: [WIP]Untitled Little Racing Game
only "little" changes...
Switched the background-routine from drawBitmap() to a selfmade routine, which just copies the sprite in the screenbuffer (basically)
gained 10% CPU usage :)
Now each opponent has its own sprite. I used this for a little number above the car - its like to display the place of the car in front of you.
Background should shake, if you're offroad- in Simbuino it doesnt look nice :( but i have right now not the possibility to test this on real GB.
(My son is sleeping now, and therefore the time is over ;) )
I dont know about the very next steps. Maybe petitfatfs (hard to test) or adding gamestates and maybe an ingame menu (thats why i startet V5)
Ingame-Menu and petitfatfs (with seperate tracks) would give the possibility to use dedicated test tracks - curves, hills, sprites etc...
of course, source will uploaded to github :)
//Edit: Background-shake should work now :)
Switched the background-routine from drawBitmap() to a selfmade routine, which just copies the sprite in the screenbuffer (basically)
gained 10% CPU usage :)
Now each opponent has its own sprite. I used this for a little number above the car - its like to display the place of the car in front of you.
Background should shake, if you're offroad- in Simbuino it doesnt look nice :( but i have right now not the possibility to test this on real GB.
(My son is sleeping now, and therefore the time is over ;) )
I dont know about the very next steps. Maybe petitfatfs (hard to test) or adding gamestates and maybe an ingame menu (thats why i startet V5)
Ingame-Menu and petitfatfs (with seperate tracks) would give the possibility to use dedicated test tracks - curves, hills, sprites etc...
of course, source will uploaded to github :)
//Edit: Background-shake should work now :)
Attachments: RPROTO5.zip
clement Tue Mar 15, 2016 11:52 am Re: [WIP]Untitled Little Racing Game
I finish 2 :).
The game need à timer for start race (3,... 2,... 1,.... Gooooo)
The game need à timer for start race (3,... 2,... 1,.... Gooooo)
Sutchig Tue Mar 15, 2016 8:09 pm Re: [WIP]Untitled Little Racing Game
Great idea!!!! :)
Something like in attachment?
Something like in attachment?
Attachments: RPROTO5.zip
Sutchig Sun Mar 20, 2016 8:39 pm Re: [WIP]Untitled Little Racing Game
update:
-petitfatfs (you should extract the .DAT-Files at the root of your SD-Card - be sure, its UPPERCASE, i dont know, how petitfatfs handles lowercase)
-collision detection with opponents
-ingame menu with track-selection ;)
tested with Simbuino (again: great tool :)), and Gamebuino with original SD-Card
Straight and Hills are for testing mostly. Lanes, Curves and Mockup are playable (sort of). "Mockup" (TRACK.DAT) has to be unlocked by getting at least 3rd place at Curves. :)
Data format of the dat-files is:
at least 10070 segments (10000 for travel-distance and 70 for lookahead)
each segment contains of 4 bytes (chars): curvature height lanes signs
where
curvature: something between -8..8 should work
height: -3 .. 3 or so
lanes: 0..2 (will become 1..3 ingame)
signs:
1: sign_right
2: sign_left
3: lane getting smaller
its getting closer to finish, but it still has no name :(
Should i keep "little racer" ?
todo: at least eeprom & some tracks.
//edit: attached a zip of a SD-Card image to test with Simbuino
-petitfatfs (you should extract the .DAT-Files at the root of your SD-Card - be sure, its UPPERCASE, i dont know, how petitfatfs handles lowercase)
-collision detection with opponents
-ingame menu with track-selection ;)
tested with Simbuino (again: great tool :)), and Gamebuino with original SD-Card
Straight and Hills are for testing mostly. Lanes, Curves and Mockup are playable (sort of). "Mockup" (TRACK.DAT) has to be unlocked by getting at least 3rd place at Curves. :)
Data format of the dat-files is:
at least 10070 segments (10000 for travel-distance and 70 for lookahead)
each segment contains of 4 bytes (chars): curvature height lanes signs
where
curvature: something between -8..8 should work
height: -3 .. 3 or so
lanes: 0..2 (will become 1..3 ingame)
signs:
1: sign_right
2: sign_left
3: lane getting smaller
its getting closer to finish, but it still has no name :(
Should i keep "little racer" ?
todo: at least eeprom & some tracks.
//edit: attached a zip of a SD-Card image to test with Simbuino
Attachments: SDCard2.zip rproto6.zip
superfreaky Sun Mar 20, 2016 9:39 pm Re: [WIP]Untitled Little Racing Game
Buino Rally (sorry, the best I could come up with)
clement Wed Mar 30, 2016 6:43 pm Re: [WIP]Untitled Little Racing Game
yop,
I play the last version.
It s a good evolution.
My remark :
The two first track are useless , press A and keep to the left, for win....
Collide with other conccurent is extremely punitive. This is accentuated by the fact that we're very fast compared to them and I do not see them come.
otherwise I love your games :)
I play the last version.
It s a good evolution.
My remark :
The two first track are useless , press A and keep to the left, for win....
Collide with other conccurent is extremely punitive. This is accentuated by the fact that we're very fast compared to them and I do not see them come.
otherwise I love your games :)
Sutchig Fri Apr 01, 2016 7:03 pm Re: [WIP]Untitled Little Racing Game
hi, thanks for feedback :)
the first 3 tracks are for testing (collision etc). Because of that, track "lanes" is already unlocked ;)
Track "lanes" may be called "full featured"
i updated the opponents, so they drive more "naturally". In curves they get slower. Additionally they are not longer at the middle of the road. (alternating left/right - this may change in future)
A collision no longer takes simply half of the speed - now you get 80% of the opponents speed.
Player sprite is now with grey + white, but still looks like drawn by a 3year-old. :(
i am thinking of making the lane smaller, and the road 2 lanes wide by default. Now it is 42px * 1 lane. it could be 30px wide with 2 lanes - this gives the possibility of making very small parts of a track where overtaking is nearly impossible ;) this change needs new tracks, so expect nothing before next week...
appended HEX-File contains only of uppercase-Letters ;)
@"Buino Rally": im getting warm with this idea :)
P.S.: for the stats:
the first 3 tracks are for testing (collision etc). Because of that, track "lanes" is already unlocked ;)
Track "lanes" may be called "full featured"
i updated the opponents, so they drive more "naturally". In curves they get slower. Additionally they are not longer at the middle of the road. (alternating left/right - this may change in future)
A collision no longer takes simply half of the speed - now you get 80% of the opponents speed.
Player sprite is now with grey + white, but still looks like drawn by a 3year-old. :(
i am thinking of making the lane smaller, and the road 2 lanes wide by default. Now it is 42px * 1 lane. it could be 30px wide with 2 lanes - this gives the possibility of making very small parts of a track where overtaking is nearly impossible ;) this change needs new tracks, so expect nothing before next week...
appended HEX-File contains only of uppercase-Letters ;)
@"Buino Rally": im getting warm with this idea :)
P.S.: for the stats:
Der Sketch verwendet 26.510 Bytes (86%) des Programmspeicherplatzes. Das Maximum sind 30.592 Bytes.
Globale Variablen verwenden 1.791 Bytes des dynamischen Speichers.
Attachments: RPROTO6.zip (not archived)
deeph Fri Apr 01, 2016 7:16 pm Re: [WIP]Untitled Little Racing Game
Sutchig wrote:Player sprite is now with grey + white, but still looks like drawn by a 3year-old. :(
Lol :lol:
If you need inspiration for you sprites, here are some from various TI racing game :
http://www.ticalc.org/archives/files/fi ... 12365.html
https://www.omnimaga.org/other-calculat ... #msg286309
Sutchig Fri Apr 15, 2016 6:28 pm Re: [WIP]Untitled Little Racing Game
so...its been a while since i last posted something :(
changed some things that work, tried many things that don't work...
Changes:
1. Sprites: thanks for the suggestions. Found some cars at various sites too (mentioned in this links provided by you). First thing i got: car sprites should be at least 11px height. But i didnt want to "steal" the sprites, so i took some photos of my car and modified them heavily - guess what manufacturer :P
2. i probably stick with "Buino Racer"... but Rally would make sense too ;)
3. as is don't want to spam your sd cards with many files, i put them all together in 1 file: BRACER.DAT (attached as zip) it contains at moment 10 tracks from easy to hard...
my Gamebuino loses sometimes the track file (the whole PFFS file object is gone) It will be called ("reinstance"??) again, but there will be an short delay. It happens only sometimes. I think if the battery is not fully loaded.
4. new track selection with results. press B several seconds to clear results.
5. results are stored in eeprom. but only if you are better than the last time - to save eeprom writes
6. made a test with accelerometer ADXL345. dont know if this works on Gambuinos without any attached I2C device. Simbuino dont.
Calibration data is hard coded - so see this more as a tech demo ;)
wire.h uses a lot flash and ram:
I'll try to upload a screenie :)

7. this could be the the final version... :)
changed some things that work, tried many things that don't work...
Changes:
1. Sprites: thanks for the suggestions. Found some cars at various sites too (mentioned in this links provided by you). First thing i got: car sprites should be at least 11px height. But i didnt want to "steal" the sprites, so i took some photos of my car and modified them heavily - guess what manufacturer :P
2. i probably stick with "Buino Racer"... but Rally would make sense too ;)
3. as is don't want to spam your sd cards with many files, i put them all together in 1 file: BRACER.DAT (attached as zip) it contains at moment 10 tracks from easy to hard...
my Gamebuino loses sometimes the track file (the whole PFFS file object is gone) It will be called ("reinstance"??) again, but there will be an short delay. It happens only sometimes. I think if the battery is not fully loaded.
4. new track selection with results. press B several seconds to clear results.
5. results are stored in eeprom. but only if you are better than the last time - to save eeprom writes
6. made a test with accelerometer ADXL345. dont know if this works on Gambuinos without any attached I2C device. Simbuino dont.
Calibration data is hard coded - so see this more as a tech demo ;)
wire.h uses a lot flash and ram:
Der Sketch verwendet 30.314 Bytes (99%) des Programmspeicherplatzes. Das Maximum sind 30.592 Bytes.
Globale Variablen verwenden 1.841 Bytes des dynamischen Speichers.
I'll try to upload a screenie :)

7. this could be the the final version... :)
Attachments: RPROTO7_Accel.zip (not archived) RPROTO7.zip (not archived) BRACER.zip (not archived)
frakasss Tue Apr 19, 2016 9:16 am Re: [WIP]Untitled Little Racing Game
Why not B-Rally, like a reference to V-Rally :-)
By the way, excellent game! Contrats!
By the way, excellent game! Contrats!
Sutchig Sat Apr 23, 2016 7:39 pm Re: [WIP]Untitled Little Racing Game
its done. (for now.... *g*)
viewtopic.php?f=17&t=3407
viewtopic.php?f=17&t=3407
alexder Sat May 21, 2016 8:56 am
Very nice.
superfreaky Sat May 21, 2016 3:34 pm
Is the car a Volkswagen Golf?
Sutchig Tue May 24, 2016 6:54 pm
No, its not a german car ;)
erico Wed May 25, 2016 12:00 am
Nice work with the accelerometer!
superfreaky Thu Jul 07, 2016 4:38 am
I came here for a real reason, but is that car just a minivan? I actually do have something to report about your game. First off, it's fantastic! Second off, I'm getting some weird lag on the last track. Not only when you run a hot lap, and it saves the time at the end, but at random, it will lock up for a couple seconds. This only happens with the last track, is it because it's so big?
Sutchig Thu Jul 07, 2016 6:44 pm
Hi superfreaky,
first: its a renault scenic :) In my family called "white angel" (there is a "black devil" too (twingo), but the sprites of it looked not so good, because they where all black)
second: it doesnt happen in simbuino, but on my gamebuino with sd-card too. i believe, sometimes at one point the card refuses to work and petitfatfs looses connection. I tested several things, for instance reformatting, or put only this game on sd-card. the lag sometimes occurs then on other tracks. and its not always. i had no idea to avoid this, except to reinitialize. Maybe another card works better, but i'm not sure.
first: its a renault scenic :) In my family called "white angel" (there is a "black devil" too (twingo), but the sprites of it looked not so good, because they where all black)
second: it doesnt happen in simbuino, but on my gamebuino with sd-card too. i believe, sometimes at one point the card refuses to work and petitfatfs looses connection. I tested several things, for instance reformatting, or put only this game on sd-card. the lag sometimes occurs then on other tracks. and its not always. i had no idea to avoid this, except to reinitialize. Maybe another card works better, but i'm not sure.
Sorunome Thu Jul 07, 2016 6:51 pm
due to how the FAT filesystem is working reading from the end of a file takes longer, maybe that is the issue?
superfreaky Fri Jul 08, 2016 4:28 am
Sutchig wrote:Hi superfreaky,
It doesnt happen in simbuino, but on my gamebuino with sd-card too. i believe, sometimes at one point the card refuses to work and petitfatfs looses connection. I tested several things, for instance reformatting, or put only this game on sd-card. the lag sometimes occurs then on other tracks. and its not always. i had no idea to avoid this, except to reinitialize. Maybe another card works better, but i'm not sure.
Yes, that's probably it because when you physically remove the sd card in-game, it freezes the same way for a few seconds before giving the error message. I kind of thought the freezing was intentional before I unlocked the last track, because it was always at the end of a lap, leading me to believe it was just freezing and saving a particularly fast lap time. But in the last map, it freezes much more often, usually when you cut off the road.
Sutchig Mon Jul 11, 2016 12:21 pm
I will try to avoid this by using some sort of packing (aka nibble-packing ;) ). That way there is less streaming from sd card, but more usage of cpu - which can make the problem even worse :/
This will take a while...
This will take a while...
Sutchig Thu Nov 17, 2016 2:18 pm
may someone try the attached version please?
Attachments: B-RALLY2.zip (not archived)
frakasss Fri Nov 18, 2016 2:50 pm
Hey!
I just tried it few minutes ago on my Gamebuino. Really nice, again! (Especially the "Game Over" animation ;-) )
Few remarks:
- is it expected to be able to go right/left when the car is not moving forward?
- our car is moving very very fast compared to oponnents... It's even difficult to see them (and change direction to avoid collision...)
That said, everything else looks really good!
I just tried it few minutes ago on my Gamebuino. Really nice, again! (Especially the "Game Over" animation ;-) )
Few remarks:
- is it expected to be able to go right/left when the car is not moving forward?
- our car is moving very very fast compared to oponnents... It's even difficult to see them (and change direction to avoid collision...)
That said, everything else looks really good!
Sutchig Tue Dec 20, 2016 6:30 am
First: sry for the late reply :(
the right/left-movement is intentionally, as it allows to move if you get stuck by an obstacle. (there is no backward gear)
For speed: i will try to make all a bit slower. (hopefully smoother, too)
The lag, that sometimes occur: with the new version of file format of dat file it seems better, but not gone. I guess, its because sector boundaries of fat file format. petitfatfs "streams" the content from sd, so it needs less ram (other Fat-libraries reads sector wise). If a sector ends, petitfatfs needs to find the starting point of the following sector. (only guesses ;))
the right/left-movement is intentionally, as it allows to move if you get stuck by an obstacle. (there is no backward gear)
For speed: i will try to make all a bit slower. (hopefully smoother, too)
The lag, that sometimes occur: with the new version of file format of dat file it seems better, but not gone. I guess, its because sector boundaries of fat file format. petitfatfs "streams" the content from sd, so it needs less ram (other Fat-libraries reads sector wise). If a sector ends, petitfatfs needs to find the starting point of the following sector. (only guesses ;))
Sutchig Tue Apr 25, 2017 5:29 pm
I need some help with new car sprites because im trying to change the behavior when steering. It should be more "smooth".
Therefore i need an animation of 5..7 frames from center position to one side. Ingame it will be mirrored if necessary.
Size can be max 24x16px. I guess 11..12px height is best.
Grey is supported ;)
I tried hard the last Days but with no efford :(
Can someone plz help?
Therefore i need an animation of 5..7 frames from center position to one side. Ingame it will be mirrored if necessary.
Size can be max 24x16px. I guess 11..12px height is best.
Grey is supported ;)
I tried hard the last Days but with no efford :(
Can someone plz help?
