Model Driven Architecture

model driven architecture in unity

Every application is processing data. It is inevitable that data is structured well. In functional programming you pass data (or handles) from one function to another. In object-oriented programming data is owned from classes and we provide interfaces to read or manipulate it. In all cases you have a model, even when its not declared or explicitly implemented. In the worst-case you model is implicit and distributed over your application. This will make it difficult, if not impossible, to handle the data in an optimal way.

Model driven architectures organizes the modules into a pipeline (see pipeline design pattern). The data is encapsulated and organized into a module or class. Manipulations (removing, changing or adding) will be done on top of this model, via a proxy or decorator model. If you want persistency of course, you can also modify the original. But in case you need only filtering or ordering you don’t want to change the original. Also if you want to revert changes or are only interested in the results a proxy or decorator will do the job. For instance, you can have a filter proxy, an ordering proxy or manipulating proxy, where the returned data is processed.

Most of the time this pipeline ends with an output. You can write it to a file or use it to generate and display user interface controls.

To support such operations, you need to define a well thought API. It depends on the purpose of the application, but you can narrow it down to following properties:

  • A structure that will encapsulate an entry
  • A method to retrieve one entry
  • Changed events are emitted when entries are added, removed or modified

By providing this interface you can define classes, that implement this API and decorate or proxy another implementation (see decorator pattern) . Every time data is changed this change event will be propagated to the decorator and the data will be modified according the decorator’s implementation.

With this architecture its possible to structure your model like an onion, where each layer will add complexity.

This architecture is not only beneficial, when we talk about big data, even on UI development it’s a valuable tool. You can create generic models and generic user interface controls. These controls will adapt its content and behavior according the model. For instance, a List-Control, that will add and remove entries automatically when the model will be changed.

We utilize this approach in our MVC module of our HAN Lib. It will be used for user interface controls, but also for loading and changing assets. Especially our dynamic asset load system will benefit from a model driven architecture. Assets can be automatically loaded on demand and unloaded on the fly. One simple example to end this post:

  • SQL Database Model (Table: Unit) -> Unit Model -> Dynamic Resource Loader -> Game
  • SQL Database Model (Table: Unit) -> Unit Model -> UI Item Model -> List Control

How we test?

Testing is the most crucial step in software development. In test-driven development you even start with the tests and do the implementation independent of the test development. In every professional project you can find following test forms:

  • Unit Test – A black box test, where the public API is tested against the specification
  • Integration Test – Several units are combined to a system and in/output and intermediate states are tested
  • Automated UI Test – The UI is operated from an automatic system by injecting events or operating emulated input devices

C# and Unity are offering unit test frameworks, but testing should not be limited to unit tests. For that purpose, we created a submodule in our HAN Lib. It supports unit, integration and automated UI tests. In the first release version we have been concentrated on verification, integration and output. This enabled us to create all tests using the same API structure and even mix tests: for instance, an integration test can be triggered and manipulated by the automated UI test. By observing each unit’s state via the public APIs, the specification and expectation can be verified in detail.

The integration part allows us to hook into our HAN Lib and observe and filter calls and signals. For instance, each test is installing a filter into the Logger to determine if warnings, errors or assertion messages have been outputted to the log. The tester has to explicitly mark each message es expected, else the test will fail.

Our Input abstraction integration allows us to inject input events into the system. This allows us to create Automated UI Tests without messing around with touch and mouse emulation. However, emulation has also its legitimation and we still create also tests with input emulation, as some errors can’t be triggered when the UI is bypassed. Imagine a transparent object that consumes touch events.

In future we want to include reflections and combine it with generic templates to implement a gmock like method, to verify and expect method calls and parameters.

In the next post I will be explaining our Jenkins integration and CI setup.

Movies based on video games – hits and misses

Making movies based on video games has always been a tricky slope to negotiate. There are numerous obstacles that the film makers have to contend with. Firstly, the common notion that some video games simply can’t be made into movies. They are too complex for that and are better left alone. Believe it or not there’s even a legend that states out of 10 movies made on video games only 2 succeed. Second reason is ardent video games fan who don’t like live action rendition of their favorite game but for every such fan there’s one who does want to see such a movie. So without further ado here’s a list of the hits and misses countdown of such movies:

Mortal Kombat – 1995

Loosely based on the mega hit fighting game of the same name, the movie did surprisingly well considering it had a cast of virtually unknown actors at that time expect for Christopher Lambert who played Raiden. If you see the movie now the special effects look quite dated and quaint but back in 1995 they managed to thrill the audience. The movie reached number one spot in American theaters and managed to rake in big bucks for the producers. It was well liked by game fans and critics alike.

Mortal Kombat: Annihilation – 1997

Remember the legend mentioned before? Well it struck and struck hard the second installment of Mortal Kombat named Annihilation. Released two years after the original with a different director helming the project, Annihilation was shredded by critics for its shallow characters, cheesy special effects and mindless action sequences. Even having two of the lead actors reprise their roles wasn’t enough to save face. From a personal perspective I think the decision to cast James Remar as Raiden was the biggest flaw. Remar is a good actor but is not cut out to play the god of thunder and lightning. Financially the movie did manage to make good money but is also responsible for ending the movie franchise altogether.

Hitman – 2007 

The 2007 movie starring Timothy Olyphant as the titular bald assassin was well made and captured the essence of what made the video game so beloved. It was shot on very scenic locations in Russia, Europe and Africa and had the signature action sequences that fans have come to associate with the series. The story was well written and executed on screen and the actors all played their parts quite well. As for critical reception, the response was a mixture of lauding to panning. The movie did quite well financially raking in $99 million against a budget of $24 million. 

Hitman: Agent 47 – 2015

The second outing of the bald assassin raised by the shady “organization” wasn’t a success. Stepping in for Timothy Olyphant this time was Rupert Friend. The plot of the movie though impressive suffers from bad acting and over the top action which ventures far from the essence of the video game. The critics were kind on the movie giving it a low score and calling it a forgettable experience. Suffice to say that Agent 47 has also proved to be a franchise killer for the hitman series.

Silent Hill – 2006

The adaptation of Konami’s world famous video game was a mixture of success in certain departments and failure in others. The film starred some recognizable names from Hollywood and was praised for its eerie visuals, atmosphere and design while panned for meaningless dialog and overly long duration. On the box office the movie did manage to reach the number one spot and grossed a good amount of money. Personally, I think the movie embodied the ghastly and equally horrific town of silent hill perfectly.

Silent Hill: Revelation

The second installment of Silent Hill was a critical flop despite starring big names from Hollywood. Fans and critics alike disliked the movie claiming it to be a mediocre effort with weak character development devoid of scares the first movie had. Commercially the movie was moderately successful raking in more than what was spent on its making.

The above proves that movies based on video games even though very luring are a risky proposition.

Gaming trends that emerged in 2018

To say that gaming industry is a tumultuous one would be an understatement. New breakthroughs in the field of technology and electronics are occurring more frequently than ever before. The gaming industry gets directly or sometimes indirectly influenced by these changes. What was considering cutting edge gaming technology a couple of years ago is now considered run of the mill and thing of the past. The same logic extends to gaming trends.

Here’s a look at the top gaming trends that emerged in 2018:

E-sports gaining momentum & popularity

E-sports in a nutshell are organized competitions and tournaments where gamers compete against each other individually or as a part of a team. E-sports have recently gotten a lot of coverage in mainstream media with huge prize money up for grabs by the winner. The popularity of E-sports events are now almost on par with regular physical sports. Realizing the growing potential of this budding industry, governments of various countries have started to invest in erecting infrastructure dedicated to hosting E-sports. It’s estimated that E-sports market could be exceed 1 billion dollars in market value by 2020.

Battle royale games

Epic games Fortnite has set a precedent for all battle royale style games. It has been immensely popular and has minted a lot of cash for the developers. The trend has now gone viral with game developing companies all scrambling to include a battle royale mode. Even mobile gaming isn’t immune to the effects of this trend with games like Player’s Unknown battle ground or PUBG for short garnering overwhelming response and praise. Suffice to say battle royale gaming trend is going to be in fashion for quite some time to come.

Virtual Reality (VR) and Augmented Reality (AR) becoming mainstream

Virtual Reality and its variant augment reality although are in their nascent stages but their potential for gaming is huge and undeniable. Game developing companies have managed to mix together elements from both AR and VR to provide unique interaction and interface to their games. Prime example of such game are Pokemon GO and Star War Trials. Another trend that has matured during 2018 is voice recognition capabilities. For gamers who prefer to go controller free, this is an answer to a prayer! Siri on iOS is the earliest example of this technology. Taking different voice commands from users and processing them is a revolutionary step which might pale in comparison to AR and VR but nevertheless accessing your social media feed, navigating the web etc is still highly impressive stuff.

Motion sensing video games

Last but certainly not least, motion sensing video games are negating the age old mantra that video games make a person lazy. Xbox Kinect, Sony’s Move and Nintendo’s wii all have the capability to capture gamer’s physical movement and then replicate them inside a game. Games such as Xbox’s Kinect sports, Sony Move’s Sports Champions have been around for quite some time now but have recently gone through a revival phase with fine tweaking making their motion capturing horizon broader and more sophisticated.

MOBA For Beginners

Hey guys, I hope you’re all doing great! As an android gamer, I will try my best to give some tips for those people who are interested in playing the android and IOS version of Armatus, which is a mobile MOBA.

I guess most gamers already know what the goal in MOBA is. Here are some tips for new MOBA players specially you may find useful.

Before actually starting the game, try do some research on our website (www.armat.us), content, forum, and blog posts for example about basics like how the Armatus, soldiers behave, how items and cards work, ability effects and so on. In the game user and interface menu, you can see more in-depth facts about your troops and their skills and stats.

Laning

The first few minutes of the game are centered on gaming experience and money so you can level up and get your ultimate skill. The game takes place in the lane which you view from the top of the map. You can start one unit on a lane and the unit will automatically move one node further per turn. When playing as a team if you have an experienced player who holds their lane, then another one can freely roam and hunt enemy troops.

Reflex

Armatus has been designed to be beginner friendly so a lot of skill aiming is automatic. Use it to your advantage. Always keep an eye on your surroundings and mini map.

Patience and Teamwork

The purpose of the game is to destroy your opponent’s shrine or main building and to do that you must push the lane and lead your creeps to the enemy’s base. Push with your team and don’t go rushing too far ahead.

Know your role

Once you have a few troops available at your disposal, know their roles well. If you don’t really have a coordinated team, then check your line up if it lacks a key role. Always be ready to throw everything you’ve got in a team fight. Supporting your carry is equal to or greater than getting kill points.

Respect

Never use profanity in chat. You can complain and rant. Just be respectful when scolding new players for their mistakes. Nobody is perfect. We were all beginners once.

Thanks for reading! Game on…

Free to play games of 2018

Hearing the term “free to play” invokes a couple of reactions from gamers. Firstly, elation that they don’t have spend money on it but preceding that reaction is the “oh its free to play, has to be subpar and there’s gotta be a catch”. Those reactions are thing of the past thanks to games like Fortnite. Free to play games are getting grander, more intricately made and on par with AA titles. Without further delay here’s a list of 7 upcoming free to play games of 2018:

Gwent

The name of the game would immediately be recognized by fans of “The Witcher” series. The polish developers CD projekt took the RPG world by storm with the third and final installment of their game. Gwent was an in game card game (for a lack of better term) which is now available as a separate game in beta version. Gwent proved to be so popular that players spent hours playing it and thus got made into a separate game. Even If you are not familiar with the Witcher game series, you are going to enjoy indulging in this game of wits. Full-fledged version of the game is due for release sometime in late 2018. Keep your eyes peeled for it!

Dauntless

This game is going to be a common entry on every free to play gaming article. Why? Simply because it’s too much fun to play and provides a free play alternative to Capcom’s Monster Hunter. The premise of dauntless is a simple. The protagonist must slay monsters to protect a human colony. What the game might seem like lacking in premise, makes up for it by providing a variety of monsters to hunt and crafting unique gear to do so. Dauntless is available on the PC platform for now but who knows it might get ported to consoles soon! Fingers crossed for that!

Unreal tournament

Wait a minute! Unreal tournament isn’t free to play and it isn’t new? Right on but there’s a new version about to be released of this beloved game which is going to be totally free and would be devoid of loot boxes. The game would be sort of open source as developers will be allowed to give away things in the market place. There will be some in game purchasing but it will be skins and items made by the fans from around the world. This is one title which is going to be the most eagerly anticipated game of 2018.

Fortnite – Battle Royale

Now how could we leave out the most awesome and biggest free to play game of this year? Fortnite’s battle royale mode has been the most successful free to play game of the year. According to a report the player count has exceeded 125 million already! There’s another mode of Fortnite called save the world which is basically a PvE but its not free to play and hence doesn’t get a spot on our list. Rumors are that it will be free to play in the near future but till then we shall stick to battle royale.

Crowdfunding your dream startup

The concept of crowdfunding has been around for a sometime now. It has proved to be a blessing for aspirant entrepreneurs looking to incorporate their startups but lacking funds to do so. In a nutshell crowdfunding is like appealing to masses through a platform over the internet to donate for a project or even a cause. Everyone is free to donate as little or as much as they like. Crowdfunding has evolved since its inception and now spans to all niches and caters to every type of project no matter how outlandish and quirky it is.

Crowdfunding has a few synonyms such as “online fundraising”, “Social media fundraising” and “peer to peer fundraising”. Despite the difference in name they all serve the same purpose described above. Crowdfunding is also a very viable marketing and awareness creation platform if used right. There are numerous examples of musicians, filmmakers and artists purposely using crowdfunding to foster awareness about their projects. The most potent example of crowdfunding according to Wikipedia is the EOS project. “EOS is a Blockchain operating system designed to support commercial decentralized applications.” The EOS project was able to raise a staggering and unprecedented amount of four hundred million dollars through crowdfunding!

Some of the most important crowd funding platforms are as follows:

Platform name Purpose
Kickstarter (www.kickstarter.com) Most well-known project oriented crowdfunding platform.
Gofundme (www.gofundme.com) Most popular crowdfunding platform for causes and personal
Indiegogo (www.indiegogo.com) The same as kickstarter but with lower fees and equally popular

 

Crowdfunding for gaming industry

Apart from the above mentioned crowdfunding sites, there are websites which have earned a solid reputation for raising funds for video games. These sites include:

  • Launched in 2015, Fig (fig.co) caters to indie game developers and projects.
  • Ulule (www.ulule.com) is a European crowdfunding site which has earned a reputation for funding various video games. The donors include people from around 135 countries!

Biggest amount amassed by a game through crowdfunding

According to record books the largest amount amassed by any video game through crowdfunding via crowdfunding platform and its own website is called Star Citizen. The fund raising for this game started in early 2013 and has to this day accumulated $148 million. The game is space flight simulation based and offers the players a fictional open space universe to explore. The most heartening fact about this is that the developers of the game called Cloud Imperium Games is not a big studio by any means. It just goes to show you that if you have a unique, interesting and meticulously put together idea for a video game, gamers will get behind it and donate generously.

 

Most popular crowdfunded video games

Below is the list of some video games (in no particular order) which enjoy immense popularity and are or were crowdfunded.

Game Genre Crowdfunding amount
Chronicles of Elyria MMO – RPG $ 3.4 million
Superhot FPS S$250,798
Pillars of Eternity Fantasy – RPG $ 4.1 million
Shenmue III Action Adventure $ 6.6 million

 

Is online gaming beneficial for children

Is gaming beneficial for children or not! The topic has always been like opening a proverbial can of worms. Majority of the parents I know have the same opinion about gaming that it’s a waste of time, rots the brain and is possibly the reason for plague outbreak! Ok I may have gone overboard with the plague bit but it’s no secret that parents and educationist frowned upon gaming and all its types.

But such negative opinions are steadily changing now and in a way parents and educationists are directly responsible for it. The vehemence and vitriol displayed by parents led scientists and researchers to conduct in depth studies on gaming and its effect on children. Here’s an unbiased and impartial extract of their findings. For sake of clarity (and because I recently discovered how awesome comparisons look in tabular format) I am going to place the most potent objections raised on gaming side by side with findings of scientists:

Objections about gaming What research says about gaming
Online gaming makes children antisocial and hostile towards others On the contrary, researchers have found that online gaming fosters a sense of comradery and community in children. It makes them better at achieving tasks as a part of a team, teaches them how to work together in coordination.
Gaming especially online gaming can cause addiction Yes, it can! But so can a lot of other things we deem healthy. Moderation is the key to avoid addiction. Specify a time slot in the day for gaming preferably when all the school work has been taken care of.
Gaming makes children lethargic and slow Research has shown that gaming fine tunes motor functions, hand – eye coordination and spatial skills. A typical gaming session requires the player to follow and coordinate multiple activities on screen which requires sharp focus and multitasking. With the advent of VR games which actually require mimicking onscreen behavior a lot of physical activity is required.
Gaming rots the brain Gaming especially online gaming requires split second decision making and equally fast situational analysis. Simulation games are so accurately made nowadays that law enforcement agencies and even the military has made use of them for training their personnel.
Gaming is a waste of time Through gaming children learn a lot of important things while having fun such as reading on screen text to follow the storyline, quantitative skills to manage resources, solving puzzles that require mathematical skills and pattern recognition.

 

In light of the above demonizing gaming isn’t justified at all however parents need to moderate and control the time spent on gaming just like they would regulate playing time outside. Last but not least gaming has been falsely held responsible for inducing violent tendencies in children. This false accusation has been laid to rest recently by a research conducted by the University of York which couldn’t find any correlation between gaming and children becoming progressively violent. Here’s an extract directly from the report “”The findings suggest that there is no link between these kinds of realism in games and the kind of effects that video games are commonly thought to have on their players.”

 

Remnants of Naezith

Game development is complex. Over years, thousands of man hours, not ending over hours and grousing partners you will develop your vision.

I am proud that one friend of mine has finished developing his dream. In Remnants of Naezith you are flying with your hook through dungeons. The game will accelerate until your fingers are melting and your eyes are exploding. If you like fast paced games, this is the game you are looking for:

Get it on Steam!

VR is no Rocket Science

VR is the big topic in this decade. Seeing and hearing in third dimension maximizes the immersion of the user. He passes to a new word, a virtual world, so real that somebody with a fear of height should never start a Mount Everest simulation. This next generation of storytelling will change the known media landscape, so that experts are already talking of post-VR depressions, which will be caused after leaving the reality (the virtual one…).

VR is not new. Big companies have tried to establish VR headsets before. One of the best-known products is the Virtual Boy of Nintendo from 1995. With a monochromatic (red-black) display the Gameboy was extended to the virtual reality. But the reality was that nobody wanted it.

Technology evolved and are now able to show more than one color. With high technology, which can be found in every smartphone today, the new headsets are conquering the hearts of the consumers. But this time support is guaranteed. Big companies invest many billion dollars in the development of VR devices and content.

So, you will say: ok that’s great but even a nerd with a Star Trek uniform will not wear this giant VR-glasses. Trust me we do. But what is with the usual consumer? The first generation of VR headsets are mainly made for early adapters and pro-gamers. And in this fields it is a huge success. Especially Sony sold a lot of PS VR devices. The important aspect is that the headsets become smaller and smaller and in a few generations, it will be in the size of your sun glasses (maybe more like you grandfathers glasses with -10 diopter).

VR (and especially MR) will become an important technology in the future. Think about the internet, before 30 years nobody thought that everybody will have it in his pocket. And that even a 3 years old child will use it. And now, if your internet connection breaks you will have withdrawal symptoms after 5 minutes. A same technological jump is awaited for VR, AR and MR. You can imagine it as the technological advancement of the monochromatic television to the unlimited color 3D OLED screen.

So, what is it good for? I don’t play games (if my boss is starring at my screen). Not only games, movies and other entertainment mediums will benefit from this technology. Imagine you customers could see your products, touch them, rotate them, use them digitally before they buy them. Imagine you could see your living room, choose your furniture and move your lawn before even your house would be build. And what if you could take your next vacation to the mars? And I will not mention the ill virtual relationships, that you are thinking about. Everyone, which knows the holodeck of Star Trek, knows that we need it.

VR is already here and every smart research and development facility tries to find ways to use it. The question is not for what, it is how much cost it. We live in a time with smart tools and optimized development cycles. With the right tools, good ideas and some technical expertise you could create your own virtual world without any expenses. It is no rocket science. But this will be topic of my next blog entry. Stay tuned.