Friday, February 13, 2009

Lychgate Roadmap

Lychgate - the JavaScript Game Engine


This is a portion of a Google document that I have created to assist me in my programming activities. I believe the first full game I will design this engine for will be for my Nemesis Star game. By doing this it will include support for ground, air and space activities across multiple planets. Nemesis Star however encompasses both RTS and RPG elements which should make the design of the basic engine a bit trickier but overall I think it would be a better final product for it.

I will be revising this as I go and put forth a more detailed road-map to a full fledged game, but at the current moment getting these few things done would allow me to open up some closed alpha testing and tweak the game till it works properly. I do have a list started for requests from people to be part of the closed alpha, but if you wish to participate you must make this request before it begins.


A few requirements I have laid down for myself ...


Classes

  1. Classes will be broken into groups based on what they do.
  2. These groups should work as independantly from each other as possible.
  3. Allow dynamic loading and unloading of these classes and scripts.
  4. Each group type will have basic get/put elements that are required for interaction with that group.
    (this all allows multiple types of the same group.)
  5. Cannot load more than one group type at the same time.
Graphics

  1. Graphic animation strips should be small, 1 animation type/direction per file. This means multiple files however it does give a big speed processing. I've tested this quite a bit and the larger the file the more the slowdown when clipping from it.
  2. The graphics library must support dynamic buffering. This would be the dynamic creating/deletion of canvas objects where needed. Back-buffering is a very old trick but it does very much apply when using the canvas tag to render scenes and animations. By pre-rendering certain things you get a great improvement in performance.
  3. Dynamic loading and unloading of graphics. The map object will be designed to support a nearly infinite amount of different tile terrains. Because the base graphics are loaded into via smaller files the map engine itself can select what terrain tiles that it wishes to load. This allows the coder to put just what they want into the map from any terrain library that they wish.
  4. A simple web-based graphics editor. Not really so much for creating graphics as for clipping, arranging animations and such. Can make the graphics editor more complicated later.
  5. Web-based map editor. Their is none, map edits would be made by the GM/Owner in real time in the game world itself. Why create two version of the same thing.

The to do list ...

  1. A Super-Basic RPG

    1. Basic Client Side Graphics Development

      1. Create the Draw Class

        1. This class is responsible for all the drawing

      2. Create the Sprite Class

        1. This is an extension of the ‘Draw’ class as it gives it the ability to use tiny buffers to perform animations and movement.

      3. Create the Timer Class

        1. This is what controls the Sprite Class and Draw class in order to insure that everything runs at the same speed across all supported types of computer systems.

      4. Map-Drawing Layers

        1. Ground Layer

        2. Object Layer

        3. Mini-map

        4. Character Map

      5. Create the Panel Class, this utilizes the Draw class to display the panel information. But all the information itself is contained within this class. The “Overall Display” is a series of Panels so that they are more easily moved and migrated as required.

      6. Primary Information Panel

      7. Overall Generic Display Setup

    2. Basic Server Side Database

      1. Tables

        1. MOB

        2. Map

        3. Player

        4. NPC

        5. Scripts

      2. Encapsulation

      3. Write DB Access scripts, ultimately should support SQL and postGreSQL, (access support would be useless to include, so don’t!)

        1. Methods … (Check W3C? or another Open Source Solution first?)

          • Open

          • Get

          • Set

        2. Properties

    3. Basic Server Side Data Server

      1. Basic AJAX setup, XML

      2. Challenge-Pass.( Insure login through every connection via Sessions and Privacy Protection.)

      3. XML Packages …

        1. Note: Packages should ultimately be scriptable though an Admin section. The packages will be XML Templates with pre-programmed variables and scripting methods. This is done to ease later programming and increase the overall flexibility of the server.

        2. MAP Package

        3. Player Package

        4. MOB Package

        5. NPC Package

        6. Script Package

        7. Graphics Package

    4. Navigating the Map

      1. Now we add the ability to move around. Phase 1.1 is where we test our ability to draw the map. This is in all encapsulated in a draw class.

      2. Create the MOB class, “Mobile Object”

      3. Create the Player Class

        1. Add ability for the player to move

        2. Add animations

      4. Create the NPC Class

        1. This first instance is super generic and only displays the NPC as a static object. We give it the ability to move later in Phase 1.06.

      5. Create the Collision Class

        1. An extension of the Map Class but does no drawing.

        2. Prevents the player from moving into certain area’s

        3. Controls trigger areas

      6. Create the Script Class

        1. The script class load/unload scripts

        2. Is what the Collision class activates, specifically triggers.

    5. Our first battle

      1. Loading from remote server

        1. Battle-map

        2. Players

          • The first battle this will be a single player

        3. Enemies

          • Initial Monster will be the standard ole Green Slime. After that it will be a combination of slimes and/or goblins.

        4. NPC’s

          • The NPC will be the second part to this phase, buy a mercenary from the shop and it will participate in the battle with you.

      2. Initial Drawing Setup

        1. Map

        2. Mini-Map

        3. Battle Panel Overlay

        4. Pre-load and Pre-draw Common Animations for speed

      3. Initiative Phase

        1. Determine type of battle (turn-based or real-time)

        2. Set Initial Initiative Matrix

      4. Battle Sequence

        1. Using Initiative Matrix begin the battle

        2. When in turn-based mode everyone goes one-at a time.

        3. When in real-time mode everyone goes at the same time.

        4. Keep repeating until one team is victorious

      5. Ending Sequence

        1. Give out items and experience to winners if the player is victorious.

      6. Cleanup

        1. Close and destroy all object and classes created in this battle. Each object is stored in an object array called ‘trashcan’ when it is created.

      7. Draw player onto map

    6. Interacting with NPC’s

      1. Simple NPC Shop

        1. The NPC should already be drawn by this time.

        2. Setup NPC animations

        3. Setup shop window

        4. Setup shop XML Package. Refer to 1.3.3.a for details on this

        5. Retrieve Data Package from server for specific NPC


No comments:

Post a Comment