mount & blade & android - en
TRANSCRIPT
Serdar Koçdemir@stromaster
Mount&Blade
&Android
Mustafa Korkmaz@MustafaKorkmazD
Outline● TaleWorlds Entertainment● Mount and Blade: Warband
○ Medieval Action RPG○ Moddable
● Windows-based○ Win32 API, DirectX, HLSL○ Microsoft C++ Compiler○ Multithreaded○ Keyboard&Mouse controls
Videohttps://play.google.com/store/apps/details?id=com.taleworlds.mbwarband
Android
● Growing market● Smart phones● Mobile devices● Microconsoles
○ Shield, OUYA, GameStick, MadCatz MOJO etc.○ Amazon Fire TV
● Increasing performance● Changing the video game industry
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
NVIDIA Shield● Very powerful CPU● PC standard GPU● Video Streaming● Developer friendly
○ nSight Tegra, Visual Studio Edition○ Tegra Profiler○ PerfHUD ES○ NVPACK
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
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
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
Compiler Differences
Compiler Differences
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
XML based FX Framework
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
Nsight Tegra VSE
● Easy to start
Nsight Tegra VSE
Controls● Playing a keyboard&mouse game with a gamepad
● XBOX 360 gamepad used as reference
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
User Interface
User Interface
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
● Multiplayer support○ BSD sockets○ libcurl for http
● Multithreading○ POSIX, wrapper objects
● Sounds○ FMOD
● Physics○ Removed Havok on ragdolls
● Murphy’s Law...
Others
● 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
Thank you