Recently TribePlay Game Development started a new client game project using the MVC model in Actionscript, which is a software design model that has been widely accepted as the model that incorporates all software design’s best practices. It in short revolves around dividing code into a triad, Model voor data, View for anything you see on the screen and Control for controlling. Control can only be indirectly reached by sending messages. Yet one of our employees got me thinking as he asked, why not just program using interfaces instead of using MVC?

An interface in a way decouples the internals of a piece of code from other code needing to talk it. Thus also creating the decoupling the control tier creates.
Generally spoken data and control should not be together, which is what would happen when just using an interface. This way we cannot easily use any other data with our control code as it would be behind the same interface. Many projects don’t change their data that much, particularly game applications. So what else?

By sending messages instead of directly calling on the interface you enable other controllers to respond to these messages. This moves the responsibility of acting on certain events to the controllers themselves instead of the caller who simply requests something to happen (it could be just a button!).
Good coding...
Another important thing, benefits do not only come from reusability but also and probably more importantly from readability. The also an extended discussing on this topic on this webpage to the questions “Should you sacrifice code readability with how efficient code is?”. The model and control create a conceptual border between code related to data and code related to control; making the code much more readable.

The second thing he didn’t quite get was why bother with all this as it makes the program a whole lot heavier with all the events flying around to communicate between the M, V and C. Cairngorm uses a central event system to communicate between MVC.

In general the events will not slow down the application really, as in the places where you would need events you would otherwise use code to check for all the changes and notify others through normal function calls having also their overhead. Even if it does slow it down, you will generally not even notice it in client side programs as CPU power there is superfluous and the most time is spent rendering graphics and not processing your code. Even if it causes you problems in terms of performance you can easily adjust things to make it faster if really necessary.

I think this is a good moment to finish with a statement I think every programmer should take to heart. I use to tell it every new flash programmer at TribePlay game Development:

Quality of code largely lies in its readability. Performance is nothing if your code can not be (re)used by others or understood by others.

In addition to others:

Programs must be written for people to read, and only incidentally for machines to execute.-Abelson & Sussman, Structure and Interpretation of Computer Programs

Make it correct, make it clear, make it concise, make it fast. In that order.-Wes Dyer

Tagged with:
 

Finally this year the Holy Grail will be attained if we are to believe Adobe: fully accelerated 3D in Flash! This prospect promises to revolutionize browser based gaming. Of course others have made excellent accelerated 3D browser plugins already (Shockwave, Unity) but simply failed because they didn’t have and in no way could gain the penetration rate of the Flash plugin.

I’m very happy with this development and I’m very curious about 2 things: how will the tools look like and how extendible will it be.
Having worked already with many many 3D engines I have concluded that the power of a 3D engine does not lay in its features but far more in its tools. The internet is littered with 3D engines made by companies or hobbyists with promising features but many lack tools to get content into a form that is usable for their engine.
Lacking of this kind of tools means you have to program these tools yourself which is most likely to be a lot more work than ‘just’ programming your game.
For making games, or any 3D application for that matter, 2 tools are vital besides the basic 3D editor such as 3D Studio Max or Maya:
One is the model preparation tool, this allows you to prepare a 3D model that came from the 3D editor for the engine, apply engine specific details that cannot be set in the basic 3D editor (dynamic textures, shaders etc.).

If you just see a blank space above, click here for Youku Version for Mainland China

The other one is the scene editor, this allows for placing game objects in the world and details that is specific to your game/application.
In this sense Adobe is facing one hell of a task, how will they integrate all of this in the already burdened Flash IDE? Or will they release a completely separate set of tools for using 3D in Flash? Or will they simply not supply them and let the community create those tools on top of their API?

The second thing is a bit of a worry to me, 3D technology is a fast evolving technology and I wonder how Adobe intends to keep up with that. Now they could expose direct access to the OpenGL and Direct3D subsystems to allow users themselves to extend the Flash 3D engine.
Of course in a monetizing sense this would not be desirable as it will kill an option to trick users into buying new Flash versions. This makes me fear the implementation will lack functionality to create cool features that simply cannot be done even though the necessary functions are very common in 3D engines (Shockwave 8.5 additive blending anyone?).

Either way, I’m sure they will come up with something useful although maybe not cutting edge we at TribePlay are going to have fun with it!

P.S. Check also this post out, Uza is providing a helpful roundup on Molehill news, with lots of demos, videos and background infos.

Tagged with:
 

Social games

On March 3, 2011, in Company, GameNext, Social Networks, by Gregor
1

Facebook games and other social games are truly on its way forward. Recently there where a couple of studies, emphasizing that the time of hardcore gamers are over and this decade will be the one of causal gamers. Indeed Social Games reach a wider audience, than “Classic” Games, according to the findings of Flurry, Social Games are mostly played in the age group of 18 to 49 years. Also among the so called casual gamers, women are the larger group of players, compared to men.

But what does this term Social games mean? And are Social Games really different from the old, usual… Games?

One of our competitor, the Norwegian company Playfish, describes Social Games as the following:

Social games are games designed to be played together with friends. [...] This is in some ways a return to the roots of games. You play with the same people you would play cards, board games or go bowling with in the real world. Sharing the game experience with friends makes it more compelling and fun.

Clearly, this is how most people receive the term Social Games. We use the technology given by Social Networks, to play games together. But how social are this games really? Is it Social when you have to invite another 200 so called friends to get into the next level? There is an interesting article on this topic on WhatGamesAre, about the selfishly social aspect in Facebook games. This topic seems to be making the round in the game development scene, as also on currently on-going Game Developers Conference, there was a discussion whether Social games are evil? I think evil is always a strong word, and to describe Zynga’s Farmeville as evil is not exactly getting the point, but still there are a lot of improvements that can be made to lay more emphasis on the Social in games.

Virtual Worlds already provide a more social aspect to gaming, because they let you meet people in games and together you can play certain games, chat or just walking around with the virtual space. As the technology is getting better, also this Virtual World get more advanced in their game play and design. Also Mobile integration can add to more Social aspects of gaming. Communication is a strong tool to connect players, beyond the classical multiplayer experience. We at TribePlay believe, that the next generation of games will have to take this aspect into account. Lets see what the future brings…

By the way, try this cool game, not really social, but fun anyway: Interlocked.

Tagged with: