How long will it take you to climb a pass in the Pyrenees (France) by car? Here is this little program that will test your reflexes.
In my car, from my windshield, I filmed the climb of the col de Saint-Ignace, near my home, in France, I accelerated the video X2 with video editing software and I wrote this little game.
The program automatically detects the AZERTY or QWERTY keyboard and loads the language in French or English. I adapted the Mijikai code published on this forum.
When the game launches, after the home menu and the 3 second countdown is over, the road will scroll past you. In the banner at the bottom, the words "BRAKE" or "ACCELERATE" will appear randomly. It will be necessary as quickly as possible to press the corresponding button to accelerate or brake. The faster you react, the less time you will waste.
Be careful, if you enter the wrong key or press keys when nothing is written in the banner, neither BRAKE nor ACCELERATE, you will suffer penalties which will be added to your total time. The record is saved in the records.txt file (which can be reset in the home menu).
I tested the program and it works from 800X600 up to 1920X1080 resolutions with DPI factors of 100,125,150 and even 175%. It should also work for resolutions above 1920X1080.
You can also put a video of your own, video.avi or video.mp4 (preferably a video filmed from a windshield) in the "resources" directory. The program will automatically generate BRAKE or ACCELERATE actions. The number of actions will depend on the length of the video.
I wrote this program with the Purebasic version v5.73, the executable (top_chrono.exe) is in 64 bits Windows. The zipped file (top_chrono.7z) weighs 127 MB because it contains the video, the source code has 749 lines.
It's unpretentious, just to spend a few minutes and test your reaction times...
Some pictures of the game and the link to download everything below.
Thank you for your comments.
Link to download the program :
https://u.pcloud.link/publink/show?code ... EnN7VUBbyV
TOP CHRONO
Re: TOP CHRONO
It looks great!
Even if the game encourages me to accelerate on a dangerous curve!
Even if the game encourages me to accelerate on a dangerous curve!
PB 6.0x, PureVision User.
Re: TOP CHRONO
Why nobody ever commented this Topic?
It's a wonderful job, an original idea of using PureBasic to create something different. It allows you to play with your own footage and, besides being a not too develloped idea, it works nice.
This is not exactly a game, much more like a time killer, and of course it will get un-replayable, because it gets annoying to keep doing always the same thing.
But the idea is wonderful. Program could use some AI to read the video for straight lines, curves, transit signs, etc. Working on the AI routines to insert the accelerate, break or even stop/drive actions is a very nice exercise and could make it more fun.
You could film your holidays, your favorites places, and let your friends "drive" a bit through them, using a program like this. You may also insert flags for turning lights, load and save results for every circuit, etc...
This idea has a Lot of potential and, at least for me, it looks a perfect example to illustrate the versatility of this prohgramming language.
Congrats for your work.
It's a wonderful job, an original idea of using PureBasic to create something different. It allows you to play with your own footage and, besides being a not too develloped idea, it works nice.
This is not exactly a game, much more like a time killer, and of course it will get un-replayable, because it gets annoying to keep doing always the same thing.
But the idea is wonderful. Program could use some AI to read the video for straight lines, curves, transit signs, etc. Working on the AI routines to insert the accelerate, break or even stop/drive actions is a very nice exercise and could make it more fun.
You could film your holidays, your favorites places, and let your friends "drive" a bit through them, using a program like this. You may also insert flags for turning lights, load and save results for every circuit, etc...
This idea has a Lot of potential and, at least for me, it looks a perfect example to illustrate the versatility of this prohgramming language.
Congrats for your work.
Re: TOP CHRONO
Thank you Kamaro for your post.
This is just a small program that could be improved, of course.
For the A.I., I'm not competent enough to integrate this into a program.
Have a nice weekend from France
This is just a small program that could be improved, of course.
For the A.I., I'm not competent enough to integrate this into a program.
Have a nice weekend from France
Re: TOP CHRONO
@Kamarro thanks for bumping this. I was completely unaware of it (real life kept me busy the past couple of years). Nice game and very nice to see somebody doing something different. Kudos to @jak64 for a job well done!
Best wishes to the PB community. Thank you for the memories.
Re: TOP CHRONO
Hello everyone,
Your thanks and encouragement made me very happy...
See you soon, perhaps with another “original” program
Your thanks and encouragement made me very happy...
See you soon, perhaps with another “original” program