Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into game_protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
hiker committed Apr 19, 2018
2 parents 95bba52 + be8ae4d commit 98555a8
Show file tree
Hide file tree
Showing 130 changed files with 3,411 additions and 1,693 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8.4)
# root CMakeLists for the SuperTuxKart project
project(SuperTuxKart)
set(PROJECT_VERSION "git")
add_definitions( -DSUPERTUXKART_VERSION="${PROJECT_VERSION}" )

if(NOT (CMAKE_MAJOR_VERSION VERSION_LESS 3))
cmake_policy(SET CMP0043 OLD)
Expand Down
21 changes: 18 additions & 3 deletions README.md
Expand Up @@ -64,13 +64,13 @@ mesa-common-dev pkg-config zlib1g-dev
```
### In-game recorder

In order to build the in-game recorder for STK, you have to install
To build the in-game recorder for STK, you have to install
libopenglrecorder from your distribution, or compile it yourself from [here](https://github.com/Benau/libopenglrecorder).
Compilation instruction is explained there. If you don't need this feature, pass `-DBUILD_RECORDER=off` to cmake.

### Compiling

Run the following commands inside `stk-code` directory to compile SuperTuxKart:
To compile SuperTuxKart, run the following commands inside `stk-code` directory:

```bash
mkdir cmake_build
Expand All @@ -80,6 +80,21 @@ make -j4
```
STK can then be run from the build directory with `bin/supertuxkart`

#### Keeping your build up to date

To recompile the latest code without redownloading the entire source, first run the ```svn up``` command inside the 'stk-assets' directory, then run the following commands inside the 'stk-code' directory:

```bash
git pull
cd cmake_build
cmake ..
make -j4
```

##### Build Speed Optimization

"-j4" is an example, for a faster build, use "-jx" instead, where "x" is the amount of CPU threads you have, minus one.

### Further options

To create a debug version of STK, run:
Expand All @@ -106,7 +121,7 @@ location, specify `CMAKE_INSTALL_PREFIX` when running cmake, e.g.:
To Build SuperTuxKart on Windows, follow these instructions:

1. Download and install Visual Studio from here: [Visual Studio - Download](https://www.visualstudio.com/downloads/). The free Visual Studio Community edition works fine.
2. Download the SuperTuxKart source package from either [SuperTuxKart download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/0.9.2) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control), and unpack it.
2. Download the SuperTuxKart source package from either [SuperTuxKart download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control), and unpack it.
*Note: If you downloaded the source package from here: [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control), then both `stk-code` and `stk-assets` **must** be in the same directory, otherwise the build can result in failure*
3. Download the Windows dependencies package from either [SuperTuxKart download area: Dependencies - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/)
or [SuperTuxKart on GitHub - Dependencies](https://github.com/supertuxkart/dependencies), and unpack it; then, copy the `dependencies` directory from either the `windows` or the `windows_64bit` directories into the `stk-code` directory, rename it to `dependencies-64bit` if you want to compile a 64bit build.
Expand Down
7 changes: 4 additions & 3 deletions android/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.supertuxkart.stk"
package="org.supertuxkart.stk_dbg"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
Expand All @@ -12,7 +12,8 @@
android:hasCode="false"
android:isGame="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true">
android:hardwareAccelerated="true"
android:resizeableActivity="false">

<activity android:name="android.app.NativeActivity"
android:label="@string/app_name"
Expand All @@ -32,7 +33,7 @@
</application>

<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="21" />
android:targetSdkVersion="26" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
Expand Down
3 changes: 3 additions & 0 deletions android/generate_assets.sh
Expand Up @@ -180,6 +180,9 @@ convert_image()
echo "Couldn't convert $FILE file"
return
fi

SCALE_CMD=""
QUALITY_CMD=""

if [ $W -gt $TEXTURE_SIZE ] || [ $H -gt $TEXTURE_SIZE ]; then
if [ $W -gt $H ]; then
Expand Down
16 changes: 8 additions & 8 deletions android/make.sh
Expand Up @@ -23,32 +23,32 @@ export ARCH_ARMV7=arm
export HOST_ARMV7=arm-linux-androideabi
export NDK_PLATFORM_ARMV7=android-19
export MIN_SDK_VERSION_ARMV7=19
export TARGET_SDK_VERSION_ARMV7=21
export COMPILE_SDK_VERSION_ARMV7=21
export TARGET_SDK_VERSION_ARMV7=26
export COMPILE_SDK_VERSION_ARMV7=26

export NDK_ABI_AARCH64=arm64-v8a
export ARCH_AARCH64=arm64
export HOST_AARCH64=aarch64-linux-android
export NDK_PLATFORM_AARCH64=android-21
export MIN_SDK_VERSION_AARCH64=21
export TARGET_SDK_VERSION_AARCH64=21
export COMPILE_SDK_VERSION_AARCH64=21
export TARGET_SDK_VERSION_AARCH64=26
export COMPILE_SDK_VERSION_AARCH64=26

export NDK_ABI_X86=x86
export ARCH_X86=x86
export HOST_X86=i686-linux-android
export NDK_PLATFORM_X86=android-19
export MIN_SDK_VERSION_X86=19
export TARGET_SDK_VERSION_X86=21
export COMPILE_SDK_VERSION_X86=21
export TARGET_SDK_VERSION_X86=26
export COMPILE_SDK_VERSION_X86=26

export NDK_ABI_X86_64=x86_64
export ARCH_X86_64=x86_64
export HOST_X86_64=x86_64-linux-android
export NDK_PLATFORM_X86_64=android-21
export MIN_SDK_VERSION_X86_64=21
export TARGET_SDK_VERSION_X86_64=21
export COMPILE_SDK_VERSION_X86_64=21
export TARGET_SDK_VERSION_X86_64=26
export COMPILE_SDK_VERSION_X86_64=26

export APP_NAME_RELEASE="SuperTuxKart"
export PACKAGE_NAME_RELEASE="org.supertuxkart.stk"
Expand Down
2 changes: 1 addition & 1 deletion data/CREDITS
@@ -1,6 +1,6 @@
= SuperTuxKart =
A Kart Racing Game Featuring Tux & Friends
- Version git
- Version $STKVERSION$
- Visit us at supertuxkart.net
- SuperTuxKart is released under GPL 3.0
- Assets are released under Creative Commons and other licenses
Expand Down
2 changes: 1 addition & 1 deletion data/challenges/startrack.challenge
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="stk_enterprise" laps="3"/>
<mode major="single" minor="followtheleader"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="110"/>

<hard>
Expand Down
6 changes: 5 additions & 1 deletion data/gui/License.txt
Expand Up @@ -24,7 +24,11 @@ title_font, by Marianne Gagnon (Auria), released under CC-BY-SA 3+

screen*.png, by Marianne Gagnon (Auria), including elements from the public domain Tango icon set

Gauge and bar by Totoplus62, released under CC-BY-SA 3
speed.png by Alayan, with elements by Totoplus62, released under CC-BY-SA 3

speed*.png by Alayan, released under CC-0

gauge*.png by Alayan, released under CC-0

menu_story by tavariz91, released under CC-0

Expand Down
2 changes: 1 addition & 1 deletion data/gui/android/license.txt
Expand Up @@ -2,7 +2,7 @@

Icons firstly made for SuperTuxKart UI on Android.

Files: blur_bg_button ; blur_bg_button_focus ; directionnal_wheel ; drift ; nitro ; nitro_empty ; pause ; thunderbird_reset ; wing_mirror
Files: blur_bg_button ; blur_bg_button_focus ; steering_wheel ; drift ; nitro ; nitro_empty ; pause ; thunderbird_reset ; wing_mirror
- CC BY-SA 4.0 / author: Néd J. Édoire

# License information:
Expand Down
File renamed without changes
Binary file added data/gui/android/up_down.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/gui/gauge_empty.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/gui/gauge_full.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/gui/gauge_full_bright.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/gui/gauge_goal.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions data/gui/init_android.stkgui
Expand Up @@ -2,18 +2,21 @@
<stkgui>
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row" >

<spacer height="2%" width="25"/>
<box width="100%" height="75%" padding="10" layout="vertical-row">
<bright width="100%" text="Select a type of control that you prefer" align="center" text_align="left" />
<box width="100%" height="80%" padding="10" layout="vertical-row">
<bright width="100%" text="Select a type of control that you prefer" align="center" text_align="left" word_wrap="true"/>

<spacer height="15%" width="10"/>
<spacer height="7%" width="10"/>

<ribbon id="control_type" height="60%" width="100%" align="center">
<ribbon id="control_type" proportion="1" width="100%" align="center">
<icon-button id="accelerometer" width="fit" height="fit" icon="gui/difficulty_medium.png"
I18N="Control type" text="Accelerometer"/>
<icon-button id="steering_wheel" width="fit" height="fit" icon="gui/difficulty_hard.png"
I18N="Control type" text="Steering wheel"/>
</ribbon>

<spacer height="12%" width="10"/>

<label width="100%" text="You can change it later in touch device settings." text_align="left" word_wrap="true"/>
</box>

<spacer height="7%" width="10"/>
Expand Down
Binary file modified data/gui/speed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/gui/speedback.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/gui/speedfore.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 19 additions & 15 deletions data/kart_characteristics.xml
Expand Up @@ -312,21 +312,27 @@
max-speed-increase="5" duration="1" fade-out-time="2" max="20" />

<!-- Slipstream
base-speed: the speed for which length and width are valid.
They are upscaled when faster and downscaled when slower.
length: How far behind a kart slipstream works
(note : this helps OTHER karts)
width: how wide slipstream works furthest away from the kart.
collect-time: How many seconds of sstream give maximum benefit
use-time: How long the benefit will last.
add-power: Additional power due to sstreaming. 1 = +100%
inner-factor: The proportion of the slipstreaming area with
twice faster slipstream "credits" collection.
min-collect-time: How many seconds of sstream are needed to get a bonus
it can be accumulated faster if in the inner quad)
max-collect-time: How many seconds of sstream bonus can be accumulated at most
add-power: Additional power due to sstreaming.
min-speed: Minimum speed necessary for slipstream to take effect.
max-speed-increase: How much the speed of the kart might exceed
its normal maximum speed.
duration: How long the higher speed lasts after slipstream stopped
working.
duration-factor: A multiplicator to how long the higher speed lasts
1 means it last as long the total time collected
fade-out-time: How long the slip stream speed increase will
gradually be reduced. -->
<slipstream length="10" width="2" collect-time="2" use-time="5"
add-power="3" min-speed="10" max-speed-increase="5"
duration="1" fade-out-time="2" />
<slipstream base-speed="20" length="8" width="4" inner-factor="0.5"
min-collect-time="3" max-collect-time="8" add-power="300" min-speed="8"
max-speed-increase="5" duration-factor="1" fade-out-time="2" />
</characteristic>

<!-- The different difficulties (like easy, medium, hard) -->
Expand Down Expand Up @@ -360,9 +366,8 @@
invulnerability-time="7" />
<nitro engine-force="350" max-speed-increase="4.5" duration="1.5"
fade-out-time="2.5" />
<slipstream length="11" collect-time="1.5" use-time="2.5" add-power="3.2"
min-speed="9" max-speed-increase="4" duration="1.2"
fade-out-time="2.3" />
<slipstream length="*0.9" collect-time="*0.9"
duration-factor="*1" fade-out-time="*1" />
</characteristic>
<characteristic name="medium">
<engine power="*0.63" max-speed="*1" brake-factor="*0.73"
Expand All @@ -374,8 +379,7 @@
<explosion time="1.8" radius="5"
invulnerability-time="6" />
<nitro engine-force="425" consumption="1.4" duration="1" />
<slipstream use-time="3.3" add-power="2.8" duration="0.9"
fade-out-time="1.6" />
<slipstream duration-factor="*0.8" fade-out-time="*1" />
</characteristic>
<characteristic name="heavy">
<engine power="*1" max-speed="*1" brake-factor="*0.66"
Expand All @@ -390,8 +394,8 @@
invulnerability-time="6" />
<nitro engine-force="600" consumption="2" max-speed-increase="8"
duration="0.7" fade-out-time="1.3" />
<slipstream length="8.5" use-time="4" add-power="2.7" min-speed="10.5"
max-speed-increase="8" duration="0.7" fade-out-time="1" />
<slipstream length="*1.1" collect-time="*1.1"
duration-factor="*0.6" fade-out-time="*1" />
</characteristic>
</kart-types>

Expand Down

0 comments on commit 98555a8

Please sign in to comment.