Add air slowdown

This commit is contained in:
Miloslav Ciz 2025-04-20 21:51:11 +02:00
parent d905718bab
commit 76cc3227bb
3 changed files with 41 additions and 24 deletions

View file

@ -19,7 +19,6 @@
data file, try to somehow hack around it (maybe just convert it to an array in data file, try to somehow hack around it (maybe just convert it to an array in
the end?) Maybe this: make a standalone C file with the string in it that the end?) Maybe this: make a standalone C file with the string in it that
when compiled and run outputs the array. when compiled and run outputs the array.
- some kinda easteregg in menu or smt
- culling is very slow now, it showed that distance bailout can accelerate it - culling is very slow now, it showed that distance bailout can accelerate it
a lot, try to make a more accurate bailaout and see if it's faster (watch a lot, try to make a more accurate bailaout and see if it's faster (watch
out for bugs due to false positives) out for bugs due to false positives)
@ -56,11 +55,6 @@
- replay stretching works - replay stretching works
- replay with input not occuring for more that LCR_SETTING_GHOST_STEP - replay with input not occuring for more that LCR_SETTING_GHOST_STEP
- replay validation - replay validation
- make the racing module usable by itself, e.g. to allow making tools for
verifying replays etc., i.e. make the module measure time, count checkpoints
etc. DONE?
- allow slowing down in air like in TM?
lower memory)
- at the end check error handling, make sure the game handles garbage data in - at the end check error handling, make sure the game handles garbage data in
resource file etc. resource file etc.
@ -76,6 +70,11 @@
=========== HANDLED ============== =========== HANDLED ==============
- MAP4: one triangle in top section is missing! - MAP4: one triangle in top section is missing!
- allow slowing down in air like in TM?
- some kinda easteregg in menu or smt
- make the racing module usable by itself, e.g. to allow making tools for
verifying replays etc., i.e. make the module measure time, count checkpoints
etc. DONE?
- add simple particle effects for grass/dirt/drift? Can be just a few squares - add simple particle effects for grass/dirt/drift? Can be just a few squares
animated from the projected backwheels. animated from the projected backwheels.
- FPS logging for optim - FPS logging for optim

View file

@ -8,15 +8,17 @@ WORK IN PROGRESS
~~~~~ GENERAL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ GENERAL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Licar is a relatively simple 3D stunt racing game inspired by other popular Licar is a relatively simple 3D stunt racing game inspired by other popular
games of the genre such as Trackmania and Stunts. Unlike mainstream video games, games of the genre, such as Trackmania and Stunts. Unlike mainstream video
Licar is completely libre, i.e. free as in freedom (meaning its source code is games, Licar is completely libre, i.e. free as in freedom (meaning its source
available for any use whatsoever), gratis (free of cost) and its focus lies on code and art assets are available for any use whatsoever), gratis (free of cost)
being well programmed by utilizing minimalism and rejecting harmful "modern" and its focus lies in being well programmed by adhering to minimalism and
programming practice. The game aims to seflessly bring joy and entertainment to rejecting harmful "modern" programming practices. The game aims to seflessly
all people who might enjoy it, even those who have no money, own only very old bring joy and entertainment to all the people that might enjoy it, even those
and weak computers and so on. It is not a commercial product and has been made who aren't able or willing to pay and/or watch ads, those owning very old and
purely out of love by a single man. Licar is also more than a game, for example weak computers and so on. It was made in whole by a single man as a completely
it can be used for educational purposes or as a basis for new projects. non-commercial product, the development was driven purely by love of the craft
and other living beings. Licar is also more than a game, for example it may
serve educational purposes or become a basis for new projects.
The game runs on many platforms and comes in different versions depending on The game runs on many platforms and comes in different versions depending on
what the platforms allow. Some versions may have more features or visual what the platforms allow. Some versions may have more features or visual
@ -71,13 +73,20 @@ speed, times at checkpoints etc.
~~~~~ CONTROLS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ CONTROLS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Controls are extremely simple. The car is only controlled by 4 directional Controls are more than simple: the car is driven with only 4 directional keys:
keys: up (accelerate), down (deccelerate, reverse), left (steer left) and up (accelerate), down (brake, reverse), left (steer left) and right (steer
right (steer right). There are two additional keys, A and B (depending on your right). There are two additional keys, A and B (depending on your platform these
platform these may be e.g. the K and L letter or RETURN and ESCAPE keys), for may be e.g. K and L keys, RETURN and ESCAPE etc.), for restarting runs and
restarting runs and handling menu. handling menu.
PRO TIP: pressing brake while in air stops the car's horizontal rotation! Here are some driving tips:
- Tapping brake while steering triggers drifting (if this doesn't work, you may
be experiencing keyboard ghosting: the inability of some keyboards to detect
certain simultaneous key presses).
- It's possible to stop the car from rotating mid-air by pressing brake.
- Similarly, holding down brake in air will slow down the car's horizontal
velocity.
~~~~~ DATA FILE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ DATA FILE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -275,9 +284,10 @@ that's meant to help the people.
Q: Can I still voluntarily donate money? Q: Can I still voluntarily donate money?
A: Currently it is possible, donation info is on my website (www.tastyfish.cz), A: Currently it is possible, donation info is somewhere on my website, but I am
but I am not dependant on donations and don't even encourage them too much, but not dependant on donations and am sometimes doubting if it's a good thing to
if you still insist, I'll be very grateful, thank you very much. accept them, but if you still insist, I'll be very grateful, thank you very
much.
Q: Why is the physics so buggy? Q: Why is the physics so buggy?

View file

@ -1279,6 +1279,14 @@ uint32_t LCR_racingStep(unsigned int input)
for (int j = 0; j < 3; ++j) for (int j = 0; j < 3; ++j)
LCR_racing.carBody.joints[i].velocity[j] = LCR_racing.carBody.joints[i].velocity[j] =
LCR_racing.carBody.joints[LCR_CAR_JOINTS - 1].velocity[j]; LCR_racing.carBody.joints[LCR_CAR_JOINTS - 1].velocity[j];
// gradual slowing down mid-air:
LCR_racing.carBody.joints[4].velocity[0] =
15 * (LCR_racing.carBody.joints[4].velocity[0] / 16);
LCR_racing.carBody.joints[4].velocity[2] =
15 * (LCR_racing.carBody.joints[4].velocity[2] / 16);
} }
if (input & (LCR_RACING_INPUT_FORW | LCR_RACING_INPUT_BACK)) if (input & (LCR_RACING_INPUT_FORW | LCR_RACING_INPUT_BACK))