Mount & Blade & Android - En

24
Serdar Koçdemir @stromaster Mount&Blade & Android Mustafa Korkmaz @MustafaKorkmazD

Transcript of Mount & Blade & Android - En

Page 1: Mount & Blade & Android - En

Serdar Koçdemir@stromaster

Mount&Blade

&Android

Mustafa Korkmaz@MustafaKorkmazD

Page 2: Mount & Blade & Android - En

Outline● TaleWorlds Entertainment● Mount and Blade: Warband

○ Medieval Action RPG○ Moddable

● Windows-based○ Win32 API, DirectX, HLSL○ Microsoft C++ Compiler○ Multithreaded○ Keyboard&Mouse controls

Page 4: Mount & Blade & Android - En

Android

● Growing market● Smart phones● Mobile devices● Microconsoles

○ Shield, OUYA, GameStick, MadCatz MOJO etc.○ Amazon Fire TV

● Increasing performance● Changing the video game industry

Page 5: Mount & Blade & Android - En

NVIDIA Shield● Pure Android, no crapware● Full Gamepad!● Tegra 4

○ 1.9 GHz ARM Cortex A15 x 4○ 2 GB RAM○ GeForce ULP GPU

● 5” touchscreen● Long battery life

Page 6: Mount & Blade & Android - En

NVIDIA Shield● Very powerful CPU● PC standard GPU● Video Streaming● Developer friendly

○ nSight Tegra, Visual Studio Edition○ Tegra Profiler○ PerfHUD ES○ NVPACK

Page 7: Mount & Blade & Android - En

Porting Steps● DirectX port; OpenGL Rendering on Windows with SDL● MSVC port; MinGW on Windows● WinAPI port; GCC compile on Linux● Android port started after functional Linux version completed● #ifdef is your friend!

○ First goal: get it compiling○ You can disable features until big issues are solved○ NotImplementedYet() messages

Page 8: Mount & Blade & Android - En

Porting Process● Operating system differences● Filesystem differences

○ Case sensitivity on Unix○ Backslash-Forwardslash○ Virtual drives

● Compiler differences○ GCC is closer to the standard○ MSVC is more tolerable (Problem for porting)○ CLANG is a good alternative

■ Shorter compile times○ Runtime differences on multithreading

Page 9: Mount & Blade & Android - En

Compiler Differences● -fms-extensions

○ MSVC compiler compatibility○ Can work well for the beginning

● Removed inline assembly ● C++ non-standard issues

○ rand() implementations differ○ Function argument initialization order

Page 10: Mount & Blade & Android - En

Compiler Differences

Page 11: Mount & Blade & Android - En

Compiler Differences

Page 12: Mount & Blade & Android - En

D3D vs OpenGL● Visual debugging is crucial● Differences in resource processing logic

○ OpenGL: bind-to-edit● GLSL-HLSL differences

○ FX Framework○ XML based shader definition system○ Preprocessor definitions (eg. lerp -> mix)○ GLSL Optimizer

● Multithreaded renderer○ Single thread for all GL Context operations

Page 13: Mount & Blade & Android - En

XML based FX Framework

Page 14: Mount & Blade & Android - En

Android Development ● Eclipse ☹● Tegra Visual Studio Edition

○ Fully configured environment ○ C++ and Java Debugging support

● NativeActivity ‘Subclassing’● OBB system● License Control

○ Managed policy at launch○ Strict policy for multiplayer○ Extra game server based user ID control

● Video player

Page 15: Mount & Blade & Android - En

Nsight Tegra VSE

● Easy to start

Page 16: Mount & Blade & Android - En

Nsight Tegra VSE

Page 17: Mount & Blade & Android - En

Controls● Playing a keyboard&mouse game with a gamepad

● XBOX 360 gamepad used as reference

Page 18: Mount & Blade & Android - En

User Interface● Resizing text ● Coloring and better highlighting● Widget positions● Helper icons● Cursor control system on campaign map● Neighbor user interface element system● Moddable interfaces

○ Automatic neighbor mapping system● Touchscreen support

○ Multiple, floating mouse areas

Page 19: Mount & Blade & Android - En

User Interface

Page 20: Mount & Blade & Android - En

User Interface

Page 21: Mount & Blade & Android - En

Optimization● Reduced texture detail● Simplified shaders

○ Gamma 2.0 ○ Lighting optimizations

● Removed real time full-render reflections● glGet… avoidance● Multithreaded rendering system● Removed graphics options

Page 22: Mount & Blade & Android - En

● Multiplayer support○ BSD sockets○ libcurl for http

● Multithreading○ POSIX, wrapper objects

● Sounds○ FMOD

● Physics○ Removed Havok on ragdolls

● Murphy’s Law...

Others

Page 23: Mount & Blade & Android - En

● First full Windows game port on Android● Cross platform multiplayer● NDK works (most of the time)● nVidia investing in Android

○ Good developer tools○ Microconsoles are becoming widespread○ China opened up video game console market

● Linux/Mac port of Warband will be released soon

Summary

Page 24: Mount & Blade & Android - En

Thank you