I was following this game for a really long time (I think since 2008), and I dare to say this is one of the most fun and chilling driving games out there. Big kudos to you for that!
This month I had a bit of spare time and I've decided to "have fun" in another way.
I performed a rewrite of the rendering engine from the "legacy" fixed-pipeline OpenGL to a "modern" one with VBOs and shaders.
I've tried to make as few modifications as possible, and I deliberately limited myself to using only a common subset of OpenGL 2.x, OpenGL 3.x+ and OpenGL ES 2.0.
The lowest-tier device I have at my disposal is an old netbook with GMA 950 and a limited OpenGL 2.1 support, and the rewritten renderer works correct on it (thou performance-wise it's really bad, but with the "old" renderer the game is equally unplayable on that machine).
With only a few extra lines of code I was able to run the game not only on my PCs, but also on a few Android devices (featuring both Adreno and Mali). Touchscreen support is lacking (SDL emulates mouse via it), so the only way to control the car in-game is via an external joystick or gyro.
Keep in mind that I've based my work off the official 0.6.6.1 codebase (which corresponds to r942, if I'm not mistaken) as I wasn't aware of the semi-active community here at the time I've decided to perform the port.
Also, I haven't touched most of #if 0 or #ifdef INDEVEL code, as some of it seems rotten beyond repair.
IDK if you'll be interested in that, but decided to share my work nonetheless.
Last edit: Ivan 2024-05-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Ivan, thank you for sharing your code. It is really a shame that I wasn't capable of creating a new release a while ago since most people wanting to contribute seem to start with the last stable release and forego the advanced development version. This leads to the situation that such exciting experiments usually miss the newest features and it doesn't seem to be an easy task to merge those attempts without losing relevant capabilities. At least I don't know enough to attempt something like this.
When I try to build your version from GitHub I get the following output/error:
I guess I miss some vital component. But since I did only follow the old README which it seems you didn't adapt for your contribution I am not really surprised. What else do I need to add so that I can test your version?
Last edit: Onsemeliot 2024-05-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you did it via Git, I think it would be sufficient to run
git submodule update --init
in the source directory.
If not, you can either install glm library from your distro's package manager (beware of old versions tho) or download it from Github as a zip archive and put all relevant files into glm directory of the source tree.
Also note that the build defaults to OpenGL 3.x+, so if you want to build for OpenGL 2.1 / ES 2.0 you need to do extra steps. For OpenGL 2.1 you need to comment out #define MODERN_GL in PEngine/app.cpp, and for OpenGL ES 2.0 you need to run make as make GLES2=1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just wanted to note that I've updated the code to r1007, adapting and rewriting some pieces in the process.
I've decided to take a break at r1007 because options menu (r1008..r1012) and brake lights (r1014) will most likely have to be (almost) completely rewritten due to different rendering method.
Other revisions (r1013, r1015-r1019) should be fairly straightforward to merge.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the late reply, Ivan. Does this mean we lost the features you mentioned if we want to actually include your optimisations? Would you be able and willing to incorporate the later features into your rewritten code?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don't worry, I already know this project is relatively slow-paced :)
Does this mean we lost the features you mentioned if we want to actually include your optimisations?
If you want to do it ASAP, then yes. But I don't think it's at the stage you should consider it.
From my POV it would make more sense to do a 0.6.7 release featuring everything that is accumulated up until now. After that you can bump development branch to 0.7.0 and work on integrating new renderer into the game may begin. There're a lot of tinkering, optimizations and testing to be done before this can be made available to the general public.
Would you be able and willing to incorporate the later features into your rewritten code?
Yes, but as with all the hobby projects the limiting factor is the time. I've stopped at r1007 because I think it would take a couple of days to rewrite r1008..r1012 and r1014, and I don't have those few days free right now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On SD860 I've controlled the car using SDL2's joystick emulation via gyro, and it was kinda flunky. RP4 Pro has a proper joystick, so it was much more pleasant :)
Last edit: Ivan 2024-07-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there, folks!
I was following this game for a really long time (I think since 2008), and I dare to say this is one of the most fun and chilling driving games out there. Big kudos to you for that!
This month I had a bit of spare time and I've decided to "have fun" in another way.
I performed a rewrite of the rendering engine from the "legacy" fixed-pipeline OpenGL to a "modern" one with VBOs and shaders.
Here it is: https://github.com/Barracuda72/Trigger-NG
I've tried to make as few modifications as possible, and I deliberately limited myself to using only a common subset of OpenGL 2.x, OpenGL 3.x+ and OpenGL ES 2.0.
The lowest-tier device I have at my disposal is an old netbook with GMA 950 and a limited OpenGL 2.1 support, and the rewritten renderer works correct on it (thou performance-wise it's really bad, but with the "old" renderer the game is equally unplayable on that machine).
With only a few extra lines of code I was able to run the game not only on my PCs, but also on a few Android devices (featuring both Adreno and Mali). Touchscreen support is lacking (SDL emulates mouse via it), so the only way to control the car in-game is via an external joystick or gyro.
Keep in mind that I've based my work off the official 0.6.6.1 codebase (which corresponds to r942, if I'm not mistaken) as I wasn't aware of the semi-active community here at the time I've decided to perform the port.
Also, I haven't touched most of
#if 0
or#ifdef INDEVEL
code, as some of it seems rotten beyond repair.IDK if you'll be interested in that, but decided to share my work nonetheless.
Last edit: Ivan 2024-05-09
Hi Ivan, thank you for sharing your code. It is really a shame that I wasn't capable of creating a new release a while ago since most people wanting to contribute seem to start with the last stable release and forego the advanced development version. This leads to the situation that such exciting experiments usually miss the newest features and it doesn't seem to be an easy task to merge those attempts without losing relevant capabilities. At least I don't know enough to attempt something like this.
When I try to build your version from GitHub I get the following output/error:
I guess I miss some vital component. But since I did only follow the old README which it seems you didn't adapt for your contribution I am not really surprised. What else do I need to add so that I can test your version?
Last edit: Onsemeliot 2024-05-11
That depends on how you downloaded the code.
If you did it via Git, I think it would be sufficient to run
git submodule update --init
in the source directory.
If not, you can either install glm library from your distro's package manager (beware of old versions tho) or download it from Github as a zip archive and put all relevant files into
glm
directory of the source tree.Also note that the build defaults to OpenGL 3.x+, so if you want to build for OpenGL 2.1 / ES 2.0 you need to do extra steps. For OpenGL 2.1 you need to comment out
#define MODERN_GL
in PEngine/app.cpp, and for OpenGL ES 2.0 you need to run make asmake GLES2=1
.Just wanted to note that I've updated the code to r1007, adapting and rewriting some pieces in the process.
I've decided to take a break at r1007 because options menu (r1008..r1012) and brake lights (r1014) will most likely have to be (almost) completely rewritten due to different rendering method.
Other revisions (r1013, r1015-r1019) should be fairly straightforward to merge.
Sorry for the late reply, Ivan. Does this mean we lost the features you mentioned if we want to actually include your optimisations? Would you be able and willing to incorporate the later features into your rewritten code?
Don't worry, I already know this project is relatively slow-paced :)
If you want to do it ASAP, then yes. But I don't think it's at the stage you should consider it.
From my POV it would make more sense to do a 0.6.7 release featuring everything that is accumulated up until now. After that you can bump development branch to 0.7.0 and work on integrating new renderer into the game may begin. There're a lot of tinkering, optimizations and testing to be done before this can be made available to the general public.
Yes, but as with all the hobby projects the limiting factor is the time. I've stopped at r1007 because I think it would take a couple of days to rewrite r1008..r1012 and r1014, and I don't have those few days free right now.
Also, here're two videos featuring my GLES-powered port of Trigger Rally on an Android devices:
SD860: https://www.youtube.com/watch?v=ger6-D2XC2I
RP4 Pro: https://www.youtube.com/watch?v=Smw5c0vHRas
On SD860 I've controlled the car using SDL2's joystick emulation via gyro, and it was kinda flunky. RP4 Pro has a proper joystick, so it was much more pleasant :)
Last edit: Ivan 2024-07-12
Sorry, and how to compile android app with your code?