108 Commits

Author SHA1 Message Date
Alayan-stk-2
a27dd674a0 Change camera view in debug to the previous/next kart (#3158)
* Change camera view from one kart to the previous/next with F5-6 keys or with menu buttons

* Simplify code

The kart_num/real_num distinction was part of the base code Benau did ; but it is completely redundant after the changes I did to the way kart_num is calculated (it was previously a static int, it's now an unsigned int).
2018-03-20 19:39:18 -04:00
hiker
95f0bf9e3b Used functions in stk_config to convert between ticks and times. 2018-02-23 23:22:49 +11:00
hiker
cb712411e0 Converte some pararchute values to use ticks. 2018-02-23 10:01:22 +11:00
hiker
81342ddd00 Fixed several mixups of ticks and time. 2018-02-22 19:25:11 +11:00
Benau
ac8294abdb Clean up debug visualization
Allow toggle (triangle) normal / (bi)tangent / wireframe separately
2018-02-03 13:14:15 +08:00
Benau
c85425c473 Only try to clean stuff if kart model is unique 2018-01-22 00:13:27 +08:00
Benau
390554eca1 Add xml shader and the loader 2018-01-21 13:19:00 +08:00
Benau
0f95d36dbc Add proper sharing and deletion of shader files 2018-01-19 14:41:33 +08:00
Benau
18fd12652d Fix server build 2018-01-18 16:18:19 +08:00
Benau
0d74b1739b Allow mesh textures to be reloaded 2018-01-18 12:35:41 +08:00
Benau
4252895d8b Remove old unused glsl code 2018-01-12 01:18:07 +08:00
Benau
f4fb2cb41c Fix no graphics and server only run 2018-01-10 11:35:02 +08:00
Benau
7797115867 Add SP for correct normal and easier shader system 2017-12-25 14:00:10 +08:00
hiker
6783ab26f8 Keep a list of all event names in the order in which they first
appear. This list allows the proper ordering of events when drawing
the bar chart to show nesting. Make sure that enabling the profiler
starts at the next synch point (to avoid incomplete event pairs).
Create a seprate output file for each thread.
2017-08-07 17:53:15 +10:00
hiker
ea12c8f494 Very first version of profiler that supports multiple threads
and handles events in branches better.
2017-07-31 22:56:47 +10:00
Deve
0dba3c8f67 Add a prefix to irrlicht key codes 2017-07-20 22:58:11 +02:00
Marianne Gagnon
b85d84c9dd Remove outdated Apple-specific code 2017-03-23 21:02:16 -04:00
Benau
78dcabb143 Try to maintain a better synchronization with game framerate 2017-03-20 16:16:26 +08:00
Benau
8259026ac1 Make AVIWriter threaded and get pixel with 3 async PBOs
Also try to record at a fixed 24fps
2017-03-18 15:50:18 +08:00
Benau
65da13fc52 Merge remote-tracking branch 'origin/threaded_tex_loader' into avi_writer 2017-03-17 16:31:32 +08:00
Deve
b8e3de0161 Allow to use debug menu on android 2017-03-12 11:42:21 +01:00
Benau
5d30393641 Allow reload texture with control+f3 for sam in game 2017-02-05 14:10:26 +08:00
Benau
ec0ff7e984 Fix possible crash when dump the glyph pages 2017-01-12 13:22:41 +08:00
Benau
4bcf03e296 Port reload texture to use new STKTexManager 2017-01-06 15:47:54 +08:00
Benau
bc2fb1da76 Fix server build 2016-12-29 15:46:00 +08:00
Benau
67b6c3bf05 Allow to reload textures on the fly
Enter texture filename(s) (full path is optional) separating by
";" in the artist debug mode "Reload texture" dialog

Notice: premultiplied alpha texture reloading is not supported,
because it was done on STK side.
2016-12-29 14:56:18 +08:00
Benau
c2d9f91c62 Allow to run cutscene(s) in artist debug menu 2016-12-26 13:51:40 +08:00
Benau
ebef08c3d8 Try to combine all text field dialogs 2016-12-26 10:53:14 +08:00
Benau
3c9174d278 Add a general debug dialog
To be used later
2016-12-25 16:41:55 +08:00
Benau
2a9656bfdc Allow all shader files to be loaded only once
Todo: preload
2016-12-18 10:51:05 +08:00
Benau
7894e5c864 Try to use a smarter approach 2016-12-18 09:27:50 +08:00
Benau
90a556fe9c Try to share shaders across different programs
Todo: non-instanced version
2016-12-17 15:59:40 +08:00
hiker
b12453e9ca Made Physics a singleton, removing the accessor functions from World.
Removes dependency on World for a few files.
2016-12-13 08:31:08 +11:00
hiker
ddcddf4a0a Compile SERVER_ONLY (by #ifdef'ing out all graphics related code).
Does not link yet!!
2016-11-11 23:46:22 +11:00
Benau
3e70fa27d9 Add doxygen for Font modules
Plus some coding-style cleanup
2016-10-22 00:01:48 +08:00
Benau
a91af96637 Initial work on spare tire kart in battle mode
Some values are hard-coded for now
2016-10-05 16:18:39 +08:00
hiker
6ca0eed28f Added debug option to trigger a kart explosion in debug mode. 2016-07-27 17:34:59 +10:00
Benau
6a319cbed2 Clean up old font code 2016-07-18 23:00:40 +08:00
hiker
434a00640b Use switch instead of if. 2016-04-19 17:08:53 +10:00
hiker
d1f611197f Fixed reset of cameras, and switching to debug views. 2016-04-19 09:40:14 +10:00
hiker
d65dd6c199 Started to refactor the camera into different classes. Normal
camera is working atm. but not much more.
2016-04-18 23:29:10 +10:00
hiker
f59ea0f258 Moved the camera debug parameter from UserConfig to a static value
in camera. Added proper names for the debug modes instead of int.
2016-04-14 09:30:26 +10:00
Benau
bb88a0f0ec Allow auto-save replay when specified in time trial mode.
It will disable AI when recording, also it will only save if the
race is completed, ie no one gave up or all events fit in max frame recorded.
2016-02-11 00:42:33 +08:00
Benau
d14a39e0f7 Initial work on soccer AI, plus lots of code re-factor/clean up.
To test, you need to update stk-assets with the dummy soccer field.
In single player, you are limited to be in red team for now, so just
shoot the ball into the blue goal. Also max-goal is limited to 4.

Regarding AIs, the steering with ball logic is handled in
SoccerAI::correctBallPosition, max AI supported in single player
is limited to 5 by now.

The AI is not as good as Zidane or Ronaldo, but steering with ball
for human is not as easy as not normal driving anyway, so don't
laugh at the AIs. :)

TODO: Friendly-team firing, polish the soccer field.
2016-01-15 18:25:52 +08:00
hiker
68e37c902f Merge remote-tracking branch 'origin/master' into refactor_networking 2015-12-15 22:52:55 +11:00
hiker
e0b3de17f6 Added new isLocalPlayerKart() function to controller, which is used
to detect when sfx and graphical effects should be shown. The isPlayerKart
funtion is used to detect a (local or remote) player, e.g. for rubber-banding
the AI, or finding the Xth player kart.
2015-12-10 17:35:31 +11:00
Benau
2644b0458b Merge remote-tracking branch 'origin/master' into battleAI 2015-12-08 10:09:35 +08:00
Benau
ba706f4476 Make swatter works better 2015-12-07 02:27:21 +08:00
Flakebi
aea68a2c14
Remove characteristics from kart 2015-11-29 04:08:12 +01:00
Deve
3144cd1595 Implement recording video to avi file.
It allows to easily record a video, which can be then for example attached to a bug report. It also allows to record promotion videos (eg. trailers), which should be more smooth than recorded using external application.

Main disadventages are:
- Constant fps in avi file
- Atm. it's not possible to record sounds. I even don't know if it's possible at all (if we can easily get access to the sound buffer).

I see about 20-25% fps drop during recording. I think that it's acceptable. But if needed, the fps can be increased by using separated thread for recording.

Currently it uses jpeg compression with 70 quality. It can be easily tweaked to use higher/lower compression or even just uncompressed bitmaps.
2015-11-28 16:42:48 +01:00