Commit Graph

231 Commits

Author SHA1 Message Date
Deve
65363a2fa0 Move multitouch race gui creation.
It's to avoid duplicated buttons because result gui uses gui_base too.
2017-08-29 22:00:45 +02:00
Deve
2a64ce94c8 Some fixes for scale rtts.
- Don't force using rtts when advanced lighting is disabled because it actually makes the game slower
- Keep the minimap and kart selection screen in high quality
2017-03-18 22:26:35 +01:00
Benau
21cbcd9185 Load speedmeter texture before rendering the first frame 2017-03-18 08:30:50 +08:00
auria.mg
eb9f656b44 Add config flag to persist GUI visibility state at samuncle's request 2017-02-20 19:16:49 -05:00
deve
cdd96f67dd Draw powerup icon on a button when touch steering is enabled 2017-02-06 06:26:11 +01:00
Deve
49a77a8f48 Add a possibility to disable touch steering in options.
It may be useful if someone wants to play with external keyboard.
The multitouch_mode parameter will be also used to choose between steering with buttons and using accelerometer.
2017-01-25 21:50:11 +01:00
Benau
ffe4dd88b4 Apply mask directly on texture
Avoiding the ref counting issues
2016-12-28 15:32:27 +08:00
Deve
f314c1ff2a Some improvements for multitouch steering GUI
- move it to separate class, so that it can be displayed in Overworld too
- add a possibility to scale the interface (atm. only in config.xml)
- touch steering buttons are created only for single player races

I removed unused drawEnergyMeter function from Overworld GUI. The reason was that I use this function from race_gui.cpp for nitro button and this function in overworld breaks it. And still the proper drawEnergyMeter function is available in race_gui.cpp and can be moved to RaceGuiBase if it will be needed in Overworld in future.

I moved the font size computation to the top of constructor because I use it to check available space for minimap.
2016-12-17 23:28:22 +01:00
hiker
cd149ab5d7 Moved m_track out of World into a static m_track in Track. Makes
world smaller and removes a few dependencies on World.
2016-12-13 07:53:33 +11:00
hiker
1939075a1b Merge remote-tracking branch 'origin/master' into nw 2016-12-06 18:45:17 +11:00
hiker
aa36f7856f Fixed compiler warnings. 2016-11-28 09:03:56 +11:00
hiker
73182863df Fixed linking problems - will probably not run ;) 2016-11-14 09:59: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
8b069df97f Merge remote-tracking branch 'origin/renderer_refactoring' 2016-11-11 08:43:42 +08:00
deve
4bb0405a32 Added support for multitouch steering.
It will be used for steering on Android.

There are some limitations:
- currently it works only in single player mode (but I don't see any reason to make it working for multiplayer)
- speedometer is not available in race GUI because there is no place for it

TODO:
- add DPI support (race GUI should have probably different proportions on smaller devices for comfortable playing)
- make nice button images
- make nitro button that changes its look depending on collected nitro (a kind of nitro bar)

Touch input events must be handled in android device to make use of it. It can be simulated for debugging on non-android devices using standard mouse.
2016-11-10 02:42:56 +01:00
Benau
7da108c8b1 Header clean up
Also move getUnicolorTexture to a better location
2016-11-04 20:30:08 +08:00
Benau
2f0252be98 Merge remote-tracking branch 'origin/master' into renderer_refactoring 2016-10-28 21:41:49 +08:00
deve
8d270e5ff3 Fixed nitro bar for non-HD textures 2016-10-26 13:51:17 +02:00
Benau
fb0f4fca3c Allow BattleAI to collect lives 2016-10-09 13:24:00 +08:00
Benau
71359a087d Add heart billboard with red kart for spare tire karts 2016-10-08 14:29:28 +08:00
Benau
91af45337f Pre-add spare tire karts probably 2016-10-07 14:39:39 +08:00
hiker
9cf88ef874 Merge remote-tracking branch 'origin/master' into rewind.
Fixed conflicts.
2016-10-04 08:15:40 +11:00
Elderme
41cd1e0364 merged with master 2016-08-18 22:36:19 +02:00
Deve
489c34edbf Fixed minimap with scale_rtts_factor parameter 2016-08-16 23:59:36 +02:00
hiker
7c899c943c Refactored KartControl to use setters/getters instead of
just public variables.
2016-08-15 17:26:07 +10:00
Elderme
cd1b9a66a0 Merged master in branch 2016-07-26 21:31:52 +02:00
Benau
7f1e776bf6 Fix digit font drawing 2016-07-19 16:47:39 +08:00
Elderme
b359e8f9fd Merged with master, solved conflicts 2016-06-18 19:28:54 +02:00
Benau
de8d172c07 Improvements in soccer mode with minimap
1. Larger ball

2. Draw goal line of two teams in minimap
2016-05-17 16:01:27 +08:00
hiker
b83246aac2 Revert "Do not compute the battle graph in case of a single kart in debug"
since Benau has suggested a better approach.
This reverts commit c9c37fb400.
2016-04-28 16:58:37 +10:00
hiker
c9c37fb400 Do not compute the battle graph in case of a single kart in debug
mode in an arena: in debug mode computing the distance matrix
takes a LONG time (approximately 12 minutes on my machine). In
release mode it's fast enough for now.
2016-04-28 11:17:20 +10:00
Benau
3f89512b34 Remove most isGhostKart() hack when avoidable 2016-02-11 09:01:09 +08:00
Benau
c3f589561c Initial work on supporting real race with ghost karts
To test, you need to pass --ghost to supertuxkart with choosing a
track that has replay recorded, you can record one with artist
debug mode.

TODO: correct position handling
2016-02-06 14:52:50 +08:00
Elderme
1e7e126b55 merged with master 2016-01-30 15:00:22 +01:00
Benau
5c81a2a3e7 Seperate red and blue balls a bit in race gui
This make score like 10:10 a bit clearer
2016-01-25 12:51:43 +08:00
Elderme
e9087a7dd6 Merged with master 2016-01-17 14:42:11 +01:00
Benau
ab61e55a6d Fix bugs in Race GUI 2016-01-17 12:11:09 +08:00
Benau
b45d926a00 Clean up and bug fixes 2016-01-16 09:14:19 +08:00
Benau
e296ebe4af Use white-black ball in minimap 2016-01-15 19:52:49 +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
Elderme
c14ce23e66 Merged with master and solved conflict with the new graph structure 2016-01-07 14:56:09 +01:00
Elderme
a257acfd4b Fixed memory leak and improved interfaces for rendering to texture 2016-01-04 21:36:00 +01:00
hiker
68e37c902f Merge remote-tracking branch 'origin/master' into refactor_networking 2015-12-15 22:52:55 +11:00
Benau
12e4c76a6f Add minimap for battle mode when it has a navigation mesh
TODO: update battle island arena to use only 4 vertices per poly
2015-12-15 02:32:01 +08: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
Deve
6318e8c8f8 Fixed compiler warnings 2015-10-04 16:54:14 +02:00
hiker
8d07d26c25 Updated (c) year to include 2015. 2015-03-30 11:42:50 +11:00
hiker
02d5b43d86 Replaced all texture->getOriginalSize() with texture->getSize()
to take potentially resized textures properly into account.
2015-03-26 17:12:51 +11:00
Marianne Gagnon
d5736f3a5e Fix #1954, part 1 2015-03-01 22:04:20 -05:00
Marianne Gagnon
3a06962ec8 Don't use the digits font to render text, fixes #1864 2015-01-05 20:05:31 -05:00