dashdan / freerct

Automatically exported from code.google.com/p/freerct
0 stars 0 forks source link

Coasters Obey Gravity and Hill Lifts #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What are the major things which your patch changes / adds?
- Coaster accelerates downhill. 
- Coaster decelerates uphill (and reverses if speed goes negative)
- Coaster will be pulled up a hill lift if speed is too low
- A small amount of speed is lost every frame to simulate "friction"

Against what version did you make your patch?
- SVN revision 1097

Please provide any additional information below.
- The speed is increased/decreased using zdif variable and only.  True gravity 
acceleration is not used yet as getting the trains current angle compared to 
horizon is proving to be a challenge.

Original issue reported on code.google.com by Crof2...@yahoo.com on 6 Apr 2014 at 12:56

Attachments:

GoogleCodeExporter commented 9 years ago
I put the diff in a nicer format

Original comment by CharlesP...@googlemail.com on 8 Apr 2014 at 2:20

Attachments:

GoogleCodeExporter commented 9 years ago
It looks like a work in progress rather than a finished feature.

Lines with just comment use C-style commenting, with a "*" at the start of 
every line in case of multi-line comments.
Also, watch out for the empty lines that are not really empty, but have just 
white space on them.

Finally, single statement "if" conditions that span more than one line have 
curly brackets in the code style.

Original comment by Alberth2...@gmail.com on 9 Apr 2014 at 7:27

GoogleCodeExporter commented 9 years ago
It absolutely is a work in progress, I'd guess it's about 1/4th the way to 
being an acceptable "feature".  Should I not submit "incremental" changes such 
as these?  

What needs fixed:
-It needs to truly calculate gravity and for that I need a way to get the 
current angle +/- the horizon, but I was has having trouble finding the proper 
way to get this.  
-Coaster cars need to know when the next track segment is powered, currently 
they will stall and reverse direction when approaching a hill lift at low speed 
(aka the first time)
-Remove the need for "max_speed": it was only used to keep the coasters from 
'stalling' as described above.

So where does this go from here then?  Do I put more work into it, try to make 
it closer to the complete feature with correct style and re-comment to this 
path thread with the new .diff file?

Original comment by Crof2...@yahoo.com on 9 Apr 2014 at 11:16

GoogleCodeExporter commented 9 years ago
Preferably, I don't think a issue should be made here - I suspect a better 
place for this would be on the google group - discussion is much easier there

Original comment by CharlesP...@googlemail.com on 10 Apr 2014 at 10:31

GoogleCodeExporter commented 9 years ago
Added gravity in r1185. Still no friction though (you can make a new issue for 
that, i think)

Original comment by CharlesP...@googlemail.com on 25 May 2014 at 10:53