background preloader

Habrahabr.ru

Facebook Twitter

Растим жемчужные деревья с Pearltrees! [TUTORIAL] Unity 4 APK splitting & Google Play OBB hosting and download. Here is a quick step guide about how to use the Google Play OBB hosting feature for apk files larger than 50Mb, and how to use them in your game !

[TUTORIAL] Unity 4 APK splitting & Google Play OBB hosting and download

Why this guide ? If you’re there, that’s probably because, like me, you are bored about the lake of informations on this ! That’s right, you have scoured the forums to find how to use this huge feature, and you’re now probably disapointed. I hope my post will be helpfull for you ! Before continuing reading, if you’re on a MAC (arggh), there is another solution for you here this one is not yet compatible with Google Play OBB, but the main thing is that it enable you to not touch your code at all, and forget about all those shitty obb and assetbundle files. Requirements : - Unity 4, for the splitting feature. Creating the project If you already have a Unity project, and I’m sure you have one, just open it. Now that you have the Google OBB Downloader plugin imported, just put the DownloadObbExample script on your controller GameObject. Unity Pro Tip: Use custom made assets as configuration files : Jacob Pennock.

Often times throughout the course of developing a game you end up building some components that need to take in some data through some sort of a configuration file. This could be some parameters for your procedural level generation system, maybe a gesture set for your gesture recognition system, or really any number of things. If you’re developing inside of Unity you probably start this task off by creating a serializable class that is designed as a simple container to hold all the configuration data you are going to need.

But then what? How are you actually going to get your data into that class? Do you create a bunch of XML or JSON files and load them in when the game starts? Well in this post I’m going to show you a simple way to turn those serializable data container classes into custom asset files. I think this sort of thing is best explained through an example. Unity Pro Tip: Use custom made assets as configuration files : Jacob Pennock. Finite State Machines #2 – Delegates, Reflection & Closures. Ah so you are back for round #2?

Finite State Machines #2 – Delegates, Reflection & Closures

The first part of this tutorial was actually pretty straightforward stuff - in this section we are going to start to build our FSM framework so that we can write performant, neat code. This part of the tutorial shows you how to build an FSM framework, if it gets too much don't worry, future sections will be less advanced and will cover how to design a game using FSMs. It's a bit like you decided to by a new laptop and the salesman says, "Great let me explain the silicon etching process used to build the processor! Don't worry it only takes about an hour. " After the first section this tutorial gets pretty advanced.

Video Tutorial Project You can download the tutorial project from here. Motivation Our motivation for this part of the tutorial is to create something really powerful, a new way of writing code when you are implementing states that keeps everything clean. State Setup & Tear Down. Scriptable Objects in Unity3D - Creating a holder for game level for simple board tile based game.

In this tutorial we will create a simple level holder for a board tile based game and construct a level from the holder object.

Scriptable Objects in Unity3D - Creating a holder for game level for simple board tile based game.

Suppose we have a game that consists of a square board (like Flow) and multiple different elements. In our case elements will be small and large cubes and spheres. Before starting this tutorial you might want to look at the following articles: (In this article file and directory names from Unity are formatted like this - MainGameScene, class and method names are formatted like this - GameLevelHolder) When editing the particular level all the information about the level will be immediately stored into .asset file.

Let's assume our level will be a square board consisting of different elements of different colors. Create new Unity project. We will have board tiles of different types and colors, so lets create folder called Enums inside Scripts folder and create two enums representing tile type and tile color. Now we can test our game level creation menu item. Простой конечный автомат на Unity. При разработке нам понадобился простой конечный автомат, желательно уже реализованный.

Простой конечный автомат на Unity

Из списка реализаций, который предложил гугл, выбрали этот, за простоту и компактность. Используем у себя, в целом FSM неплох. Далее под катом перевод оригинальной статьи автора из Греции Tasos Giannakopoulos. Я не переводчик, поэтому я старался передать смысл, иногда объясняя суть своими словами, за что извиняюсь перед перфекционистами. Что такое Конечный автомат? Конечный автомат является популярным шаблоном проектирования, который используются разработчиками игр для реализации поведения, к примеру поведения юнитов или каких-то сложных объектов.

Я не буду вдаваться в теорию конечных автоматов, кому надо — есть интернет с кучей подробных статей, а так же есть несколько ссылок в конце статьи. Зачем всё это? Чтобы реализовать поведение главного героя, в проекте над которым я сейчас работаю, я использовал FSM. Проектирование и реализация.

Unity3D