Saturday 27 February 2016

Week 2

Week 2 Objectives:

Find out how unity actually interfaces/integrates with android. Does it:
  1. Handle all splash screen, activities & intents etc, all within Unity (in C#) and then package a ready to go APK for android devices?
  2. Does Unity handle the game aspect and pass over a package code base that then must be completed in Android studio for all menus, activity starting etc...
  3. Is there no passing from one to the other at all. I.e do both code bases operate independently and they must interact with each other.
  4. If coding in c# via unity.. to deploy on android will i have to work in Java at some point? At what point?
Once the above is figured out, then determine how this will interact with my intended architecture.
  • Architecture: App sends requests (json) to hosted database which will be handled by a middleman API. This will allow data persistence and allow cross platform compatibility.
    • Is this feasible with any of the above ways.
    • How much of this proposed architecture can be completed via Unity?
    • With my online server, is there a limit to data that can be stored? Limit to data types?
    • How data persistence will work with this app.
Gather a list of apps that might reflect how my app could operate. (then maybe find out how they did what they did) See if android apps of a similar nature exists that were created via unity.
Illustrate architecture.

is it activities or intents... in unity?


Will go with Single-page application using the ES6 ECMAScript 6 features now and understanding the syntax around modules and classes. It seems we are heading in the direction of SPA frameworks using ES6/ES7 features instead of writing their own complicated abstractions and polyfills

For front end framework/library I have decided to use Aurelia (possibly using react.js in conjunction where needed), three.js for the 

Wednesday 24 February 2016

Engine technology comparisons

 OpenGL:
OpenGL is an Operating System interface (API) that operates on a low level. This allows you to write code and determine the best way to control the hardware, such as the sound card or video card.
(OpenGL + OpenCL  can be a full alternative to Unity for creating your own games.)
This can be considered a more complex approach.
ü  More control (particularly over hardware)
ü  OpenGL’s libraries can be good for figuring out  good ways to do what you are asking the hardware to do.
ü  Free.
-      Does not do as much as Unity.
-      Less productive.
-      Higher learning curve

Unity (AKA UDK)
Game engine. It lays on top of libraries like OpenGL or DirectX.
If you are working in Unity, you should know C# or JavaScript, too.
ü  All in one tool
ü  Rapid prototyping. (drag & drop editing etc)
ü  A whole development suite, not just a library of parts to put together or a framework to help make sure they all fit. You can create the whole game in Unity.
ü  Helps simplify as possible to create games. (easy for beginners)
ü  Better geared for beginners (good starting point for game development)
ü  Unity does far more than OpenGL. For example, it can handle game levels and inputs in addition to figuring out how to render your backgrounds and play music.
ü  Large amounts of documentation and tutorials available.
ü  Free version if earning less than $100,000
ü  Personal version allows distribution to multiple platforms.
-      Less control or specifics.
-      Runs on it’s own VM
-      Large game file sizes. (A minimum of 9mb due to bundling Mono with every build)
-      Shaders not great in free version
C# or JS in Unity –
js in unity is unique (unityscrpt) – more flexible but potentially slower
slightly more common in forums
can be slow!

C# - less flexible, strictly typed.
but always runs at JavaScript’s top speed. (fast)
More access to tools and advanced techniques.
Other programs use c# - good for learning overall.

Monkey X PRO
ü  Programming language for easily creating multi platform apps . It translates “Monkey code” to other languages at compile time – (C++, C#, Java, JS and Actionscript).
ü  Has a number of built in modules
ü  Doesn’t run on its own VM (unlike unity / corona)
ü  Rapid prototyping
ü  Easy to learn object oriented language.
-      Not well documented
-      Limited asset store
-      Learn a new language, that is somewhat limited

libGDX
ü  Fast development via desktop deployment (no need to deploy to android every time.. test straight from desktop)
ü  Free and open-source (open source under apache 2.0 license)
ü  Doesn't force a specific design (design any way you wish.. customisable)
ü  Interfacing with platform specific code
-      Java dependency leading to performance issues.
-      Low level engine difficult for inexperienced programmers
-      Limited documentation

 -------------------------------------------------------------------------------------------------------------------------------------------

Given all of the above, Unity3d appears to be the most appropriate in terms of effort required to get started, stability and available information.

Wednesday 17 February 2016

First Meeting

For this meeting, my intent was to discuss my ideas and how realistic some of my expectations were. Given my limited experience in this area and my ambitious nature, I felt it would be immensely valuable to have someone with more experience let me know what aspects would take more time than expected and what would be outside of my abilities in the timeframe we have.

So far the most difficult part is knowing what technologies out of the all the possible ones i have seen would be best to choose and use for this project. Some guidance in this area was something i was hoping for and ultimately received.

Covered in this meeting:

I explained:
  • The mechanics of the application and my vision of how it would operate / the style of presentation of information within the app.
  • The distinction i see for this app between "game" and "simulation".
  • Core features to be included. 
  • Potential additional features.
  • Technologies researched and my current limitations in them understanding of them.

We discussed that for this project it would be best to:
  • Keep scope reasonable for now. 
  • Get the basics working and expand accordingly. 

  • Have communications between the web server to update game information (require wifi?) if to be on webserver, maybe use php to communicate with database to get/set information/stats within the simulation. 

For the following week we concluded it best to:
  • Research and compare technologies, such as Unity, openGL along with researching new alternative game engines. {}This included reporting on the pros and cons of all and how they might/might not work for my project. 
  • Use the above findings to decide on a game engine to use. 
  • Additional to the apps previously researched that served to inform users on various plants and vegetables, to find and install games of a that deliver information/ do what I am trying to do in a similar way. I will report on similarities/differences, how they chose to do things, my findings and opinions on their relevance to my project. 
  • I will focus some effort on getting accustomed to intents and screen changing in the Android SDK.
  • Decide on screens, splash screens, where to load into etc. 
  • Decide if it is to be an android app or a web application: Choosing android app means i am bound to Java via the Android Studio, where as a web application allows me to use more versatile languages, but will be more limited.
  • Local or hosted database: This will determine if a server required to host online services, or if the app can operate completely local to the device.


Random findings post meeting.
localisation - stripping out code base to allow expansion to multiple countires/languages etc

raindrops, to reduce power, have each rain drop linked to x amount of ther raindrops, dividing down total amount to be calculated

Have each tile is a GameObject; read the map data from an array, using two nested loops for x & z (y is up). When instantiating them, store a reference to the tile in a simple array. Store the number of the index on the tile itself, along with the X & Z from loops. The tiles move themselves into place.

blender 3d tool

Resources

Unity

3d HEX tile map
Asset available through unity. Seems over complex and resource heavy for what i need. although if it could be scaled down for performacne, maybe it could be used. If not, maybe it could provide insight if no other suitable alternative is found.

ProTileMap Home page
ProTile mpa editor 1
top view from 4.38seconds, could be useful, if this option only could be "picked" from the rest, resources could be spared. Size and android adaptability to be investigated.

ProTile Map Editor 2
from 3.10seconds, very interesting application of this technology on a tablet. Seems quick and efficient. has Runtime Support / API
work with custom meshes/prefabs? Can I use my own tile assets?
possible to make a simplified version in game that only allows certain shapes. There is whole API exposed for any kind of configurations. Investigate, are tiles "dynamic" will veg tiles "grow"

Cartoon Town and Farm.   Asset link .   Might be just art pack and provide object interaction.UniTile 3d

Tutorial series on 2D Map Editor in Unity [C#]
Includes how to Create a Scriptable Object(TileSet)

Tutorial series Unity 3d: TileMaps:
from scratch approach. Comprehensive. Good resource. 

unity tile map editor

list of free assets:
http://cinema-suite.com/5-best-free-unity-assets-dont-know/#.Vs3IR5yLRQA



GameSalad
A game builder that aims to simplify. 
Grid based movement - sample video. set grid size and can move about. might be easy to allow user to input variables that will define the grid layout.
gamesalad tutorial for simple ball game -


Visual Studio
Unite 2014 - Editor Scripting from the real world
core concepts of Unity Editor scripting. Visual Studio. Potentially over kill for what i am doing. but a resource for the future non the less




000webhost

ORIANART - How to make 2D Game Tilesets

-------------------------
Turn Based Strategy (TBS) Framework - free. 
Both square & hex files.  Modular components. Map generation can be used while editing or in runtime. Creates a series of "Tile" objects with properties. 
Has a grid generator that  places chosen gameobjects to a grid.
Questions:Turn based... can this be disabled? or possibly used to my advantage? a turn is a "day", player has unlimited "actions" in his turn. 

Flood fill
frontier expansion, or "flood-fill" which will take initial point (a tile whos type you know) then it will expand out, into neighbouring cells of the same type, and in doing so, generates a list of connected tiles of the same type.


 grid with blocks  Use raycasting to select each block that you want to be destroyed then move the creatures to the location to destroy the blocks after a set amount of time. You could also using raycasting for the AI pathing as well to make sure they follow the correct path.


---------
weather api


----
Best practices in Android development - detailed guide on some pitfalls in android development. No mention of unity, but still some useful information.

about implementing the MVC pattern in Android. here

Ground Work


Prior to meeting with my assigned supervisor there was a number of topics researched:

Began familiarising  myself with the android SDK and getting simple projects working it and displaying them on my phone. 

Began looking at possibilities for the GUI elements, such as Unity or OpenGl.

Collected some apps that had a similar style GUI i could reference.

Looked for some guids on building a tile based applciation for android.

Looked into hosting my own server at home, which could host a database that my app could connect to. Another conclusion was that SQLlite that comes with Android could be a suitable option depending on the size of the app.

Discussed with a lecturer web applications vs android apps, how i could implement most of the business logic via a web service using PHP to update/retrieve information from an database, improving data persistence and allowing up to date information be accessed via multiple outlets (app, webpage etc).

Began research on hiring someone to develop sprite images for my growth cycles as a side option. Also looked if these may be available for free online.

Concluded that an object oriented model for populating my crop classes/objects from a database seems like the best way to go 

Outlined the potential need to scrape some websites to populate my own database. This may only be necessary for when i plan to expand my choice of available vegetables for use.

Before all of the above, i tried to think through how the application could be delivered and what the most essential features would be. Additionally i tried to think through additional features that could be added over time in the event that there was time to include before the projects deadline.


I have decided on an iterative approach for two reasons.

1) it will be to experience this software development approach considering it is so widely used in the industry. Being able to talk about this approach in interview will be valuable and i can "hit the ground running"

2) As i have chosen a project with quite a large scope for the time frame we have, it will be best to first identify core features and functionality, and get them working and get feedback on performance and feel of the product. I can then use what i have learned and try implement the next layer of features/functionality, always ensuring that the application is in working "submittable" condition at the end of each "sprint" so that if any feature i try implement appears to not be worth the time it is taking, or that it will not be achievable, i can leave drop it from the project and start on another feature without having disturbed the previous completed phase.



Introduction - crop planner

My idea is to build a crop simulator that will accurately represent the growing of vegetables for hobbyists and enthusiasts with a strong emphasis on encouraging children to be involved.

To appeal to children there will be game like GUI  to simulate a real garden with a virtual garden.

This will enable a virtual model to be created inside the program by the user. This virtual garden can then be used to plan a real garden and help advise what can be grown at what times and what your space will allow. 

This project scope will initially cover the "square foot growing" method, where by there are specific numbers of plants that can fit into an area of 1 square foot. To begin a limited amount of vegetables will be implemented, but the architecture and design principles will allow further additions of potentially a limitless amount of new vegetables.

Ideally the interactions between plants/vegetables will increase in complexity over time, accounting for synergistic growing suggestions, and combinations to avoid.

The main challenge will be learning how to build a game like environment on my own while handling all other projects and studies as this aspect is not covered in my current course.