Chapter 2: Game Objects Conceptual Design

Tuesday, November 10, 2009

Developing an Advergame for Hyzonia

In the previous chapter we introduced a kind of casual fishing game that we are going to develop using Hyzonia platform as a sample. In this chapter we will describe the game from an abstract aspect; this will help us to understand the game logic, the main actors and what objects are needed to implement the game for Hyzonia platform.

From a game developer point of view, Hyzonia is a platform that makes building advergames easier and routine. Hyzonia allows the developer to focus on developing the game itself. The developer should think about the game rules and the game play rather than spending time trying to implement features that are not related directly to his specific game (like receiving advertisements, generating reports, etc.). Those functionalities can be implemented using Hyzonia tool called Hyzonia client library and Hyzonia Game Services that we will explain them more in the next chapters.

From a very abstract standpoint a Hyzonia game is made of three layers:
  1. Game Client

    This layer consists of game logic, user experience, visual effects, etc. A Game Client can be made in variety of platforms like Flash, Silverlight, or Java (any platform that can communicate with XML or JSON web services). In Hyzonia we admire JavaScript, in this tutorial we build the client using JavaScript by the help of Hyzonia JavaScript Client library; this library can be used for general games purposes tasks, like having a timer or moving objects in the screen to create game animation. The game client layer is responsible for the following main functionalities:

    • Game Play: Managing the game logic
    • UI: Managing the visual objects and interacting with the player.
    • Game Services Client: Facilitating the communication with the game services
  2. Game Server
    • Game Services: Game Services were built to help the developer to create Hyzonia compatible games easily, the services are XML Web Services that were developed using ASP.NET and can be consumed by any Web compatible technology.
      To make using these services easier to a wider range of developers, the game services can be consumed using any of the following XML or JSONP.

      Hyzonia JavaScript Client library contains a proxy that can be used to facilitate the communication with theses services. Calling a Hyzonia Service using the client library is as simple as calling a JavaScript function.

      Some parts of the targeting job are managed by this component. For example when a player starts a game session, this component finds which ad materials (Items) and Quests are relevant to her.
    • Statistics: The statistics services provide game data that can be displayed in the game like Top Ten Players Scores, The prize of the day, the new prizes in the game….
    • Game Data: All the functionalities that are related to managing the players’ data, ads data, Quests and other related game information like login, registration...etc are implemented using this component. The data layer is commonly transparent for a Game Client developer.
    • Hyzonia Network Communication: The main rule is to communicate with Hyzonia advergames network, this layer communicates all the data related to ads, Campaigns and Quests to and from Hyzonia platform. It is a crucial part of a Hyzonia game, without it the game simply cannot make any money.
      This component is also hidden for Game Client developers.

  3. Hyzonia Advergame Network

    Games that are part of Hyzonia advergames network automatically receive Campaigns, ads and Quests from the network. Campaigns are made by advertisers who use the network to publish them to their targeted players audience. The role of an advergame is to make the engagement of the players with the ad materials happen. The network chooses and publishes the Campaign in the relevant games. Once a game was created using Hyzonia platform, the game dynamically communicates with the network. This does not require the developer to develop any special logic. Everything regarding this communication, receiving orders, targeting players and reporting, is transparent for Game Client developers.

Conclusion:
A casual (adver)game developer has to make Game Play and UI.
He will not care about ads, campaigns, reporting, data management, etc. these things will be provided by Game Services.


Conceptual design of the fishing game

In this tutorial we will focus on the UI, Hyzonia JavaScript Client Library and Hyzonia Game Services.

Here are the main objects for our fishing game:


  • Moving Object
    It encapsulates all the functionalities about animating a visual object in the View Port coordinate system. In our design, Moving Objects, View Port and Game Timer will work closely to move fishes, boat and fishing rod.
  • Fish
    image, position, containing item, isTrash
    move(), isHooked,create(), attachToHook()
  • Fishing Rod
    hook position, phase
    isHooked()
  • Boat
    move(dir), image, position,
  • Game Session
    Contains the data about Quest. A player will either win or lose a Game Session.
    sessionId, time left, items,
    endSession()
  • Player
    Player data will be maintained by Game Services.
    name, id, points,
    increasePoints(),
  • Bag
    items, size
    removeItem(item), addItem(item),
  • Quest
    toDo,
    canWin(), win()
    (see chapter I to read more about Quest and particularly Collect Some Items Quest)
  • Item
    Item is an playable advertismenet material. We will dedicate a whole chapter about the relationships among Items, Quests, Campaigns and Engagements.
    For now think an Item is made of: picture, name, description
  • View Port
    width, height, background, sea level,
    showDialog(dialogId)
  • Game Timer
    Manages the movement of the objects.
Later you will see that we add more UI functionalities to work with registration and login, and a few more features.

In the following post we will talk about visual objects and the mechanics of this particular game. We will make a working prototype of this game using JavaScript.

2 comments:

Maryam said...

seems a great stuff for freelance developers.

Anonymous said...

PLAY THE MOST EXCITING & MIND BOOSTING GAMES AND FREE DOWNLOAD OF THE LATEST VERSION GAMES IN ONLINE AND GET PAID FOR HIGHER RATINGclick here TO GET MORE DETAILS CLICK FLOODGATES FOR YOUR ONLINE INCOME.
THANK YOU

Post a Comment