flash games development with unity3d - the biggest game ...devgamm.com/moscow2012/files/valentin...

13
Flash games development with Unity3D Valentin “valyard” Simonov Interactive Lab [email protected] / va.lent.in / onenterframe.ru / @valyard

Upload: others

Post on 30-Apr-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Flash games development with Unity3D

Valentin “valyard” SimonovInteractive Lab

[email protected] / va.lent.in / onenterframe.ru / @valyard

Page 2: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Почему Unity3D?Why Unity3D?

3D Отличный IDE Быстрое прототипирование C#, .NET Расширяемость Экспорт под iOS и Android

••••••

3D Great IDE Fast prototyping C#, .NET Extensibility Publishing to iOS and Android

••••••

Page 3: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Flash как платформаFlash as a platform

Распространенность плагина Stage3D, Domain Memory Интерес “взрослых” игровыхдвижков UDK, Unity3D...

•••

Flash Plugin penetration Stage3D, Domain Memory Interest from “big” game engines UDK, Unity3D

••••

Page 4: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Tail DriftUnity3D Flash in a Flash contest winner

Page 5: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Текущее состояниеCurrent state of Flash exporter

3.5 — preview Можно скачать c unity3d.com Не все фичи Unity3d API будет меняться Сложность отладки Нужно думать о Flashэкспорте с самого началапроекта

Будут продавать как аддонза 400$ / 1500$

••••••

3.5 — preview Download at unity3d.com Not all Unity3d features work API will change Hard to debug Have to keep in mind Flash

export from the start of a project

Will be sold as an add-on for400$ / 1500$

••••••

Page 6: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Что работаетStuff that works

Почти все кроме: Некоторые фулскрин эффекты Часть .NET API системы частиц Shuriken Профайлер Загрузка ассетов через

bundles и WWW Raknet Terrain, Cloth Deffered Rendering Аудио эффекты

•••••

••••

Almost everything except: Some fullscreen effects Subset of .NET Shuriken particle system API Profiler Assets loading via bundles and

WWW Raknet networking Terrain, Cloth Deffered Rendering Audio effects

•••••

••••

Page 7: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

С чем можно столкнутьсяWhat problems you can face

Не работают некоторыепопулярные скрипты Нельзя получить stage Не работают неожиданныечасти .NET, например:Convert.ToInt32, Regex, generics. Странные ошибки JavaScript < версия шейдеров 2.0 SWC вкомпиливаютсяполностью — не находитклассы

••

•••

Some popular scripts don’t work Can’t get reference to stage Some unexpected parts of .NET

don’t work: Convert.ToInt32, Regex,generics. Weird JavaScript errors < Shader Model 2.0 SWCs a fully compiled in —

classes not found errors

•••

•••

Page 8: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Алгоритм экспортаPublishing algorithm

1. Исправить ошибки C#2. Выпилить что неподдерживается3. Отследить ошибки слишкомсложного C# кода4. Сломать голову надошибками генерации AS3

/Temp/StagingArea/Data

1. Get rid of C# errors2. Cut everything which is notsupported3. Track down complicated C#code errors4. Fix weird AS3 generationerrors

/Temp/StagingArea/Data

Page 9: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

ОтладкаDebugging

Debug Player / flashlog.txt mm.cfg

ErrorReportingEnable=1 TraceOutputFileEnable=1 Кастомная консоль Внешняя консоль

••

••

Debug Player / flashlog.txt mm.cfg

ErrorReportingEnable=1 TraceOutputFileEnable=1 Custom console External console

••

••

Page 10: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Интеграция с AS3AS3 integration

UnityEngine.Flash.ActionScriptActionScript.Import("com.Bla");ActionScript.Statement("trace({0})", “hi"); AS3 код в папке ActionScript .NET класс -> AS3 класс

[NotRenamed], [NotConverted] Условная компиляция

#if UNITY_FLASH ActionScript.Import("flash.ui.Mouse"); ActionScript.Statement("Mouse.hide();", "");#else Screen.showCursor = false;#endif

••

UnityEngine.Flash.ActionScript ActionScript.Import("com.Bla");ActionScript.Statement("trace({0})", “hi"); AS3 code in ActionScript folder .NET class -> AS3 class

[NotRenamed], [NotConverted] Conditional compilation

••

Page 11: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Загрузка извнеExternal preloader

Flex SDK 4.6 Target Flash Player 11.1.0 wmode=direct UnityShared.swc Общение с Unity3D

loader.unityContent.sendMessage("Player", "OnMessage", new ASMessage("click!"));

Свой прелоадер Переопределение классов-пустышек в прелоадере

•••••

••

Flex SDK 4.6 Target Flash Player 11.1.0 wmode=direct UnityShared.swc Communication with Unity3D

Custom preloader Overriding dummy classes from

C#

•••••

••

Page 12: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Налог на скоростьSpeed tax

Premium features: Stage3D + domainMemory

Page 13: Flash games development with Unity3D - The biggest game ...devgamm.com/moscow2012/files/Valentin Simonov (InteractiveLab) … · Interest from “big” game engines UDK, Unity3D

Целевая аудиторияTarget audience

ExperimentsIndie games

Browser games

Simple 3D* Simple 3D*

* speed tax effect

MMOsExperiments