Comments (5)
pixelwheels/core/src/com/agateau/pixelwheels/racer/Vehicle.java
Lines 364 to 366 in 0cbca1a
Also confused here why groundSpeed < 1f
? I'd perceive 1
as a very small speed, is that the case? So the drag force only applies when it nearly stopped, so as to get it to completely still?
from pixelwheels.
Seems there will always be some force applied to the wheel, then how it actually get max speed limited?
That's a good question indeed. It's been a long time since I wrote this code, but playing with it a bit, if I remove the "0.2" factor the vehicles are very slow. I guess given a long enough straight road they would accelerate indefinitely. Or maybe there is a cap in Box2D. This game is the first time I use a physics engine, and I sometimes don't fully understand what's happening under the hood (or I dive in to understand, manage to understand, then a few weeks later I have forgotten about it...)
Also confused here why groundSpeed < 1f? I'd perceive 1 as a very small speed, is that the case?
No, groundSpeed is a "normalized" speed, where 1 means normal, no change, <1 means slow down (sand, grass, water tiles), >1 means speed up (turbo tiles). See Material.getSpeed()
for the actual values. The material of a tile is defined in the .tsx files defining the tiles (in android/assets/maps). You can look at them using Tiled.
from pixelwheels.
Forgot to add: there already is a catch up mode. AI players ahead of the player are slowed down if they are better ranked, see AIPilot.updateAcceleration()
.
from pixelwheels.
I created #437 to experiment with the idea, shall we move the discussion to there and close this issue?
from pixelwheels.
I created #437 to experiment with the idea, shall we move the discussion to there and close this issue?
Sure.
from pixelwheels.
Related Issues (20)
- Update libgdx
- Night time HOT 2
- [F.Req] police cars HOT 2
- [F.Req] map maker HOT 1
- Music should be controlled by a slider 0%-100%, not on or off
- Esperanto text off-screen when points are given after tournament race
- Can't play the game on Android in 0.25.0 HOT 4
- Smoke trails for missiles HOT 1
- Allow resetting championship HOT 2
- [F. Req.] hunt game mode HOT 1
- Time trials? HOT 2
- Stuck in a tree HOT 1
- Change lap numbers
- Fails to install from itch.io client on Linux
- reset all dev options HOT 1
- tires shpuld leave tracks in snow HOT 1
- Linux arm64 build
- Possible to build it for Android 4.0? HOT 1
- Keyboard mapping config not persisted over restart?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixelwheels.