Train2Game – Week erm I lost track

March 17, 2010

I have been so busy over the last month or so I haven’t had time to write these blog entries. However I have been progressing quickly with my course. I have passed the first 7 tutor marked assignments (TMA) and I have submitted my 8th one today.

The quality of the course as continued I have questions one of the sections about referencing arrays however the general theory in that section was correct it was merely down to grammar (Of which mine is terrible).

I have gone through the basics of game design and the basics of programming and data structures and on thursday I have my first seminar!

To be honest I have actually learnt a lot about programming that I didn’t know already, there are a lot of things when programming a computer game you do slightly different from you would with an application, in fact if anything there is much less room for error.

The last section I passed was on classes and structures and the TMA I submitted was on memory allocation and memory management (The Mozilla guys really need to read the section on memory leaks lol)

As for what I have been doing, I have been creating a series of 2D classes for use with direct3D using XYZRHW (pre transformed vertices).. well more on that soon.

I hope to update this again shortly!


How do you make a game fair:

February 24, 2010

Game balancing is what it boils down too and you have got the basis of the topic and its fundamentals correct, however there are 2 forms of balancing in a player vs player and a computer vs player environment and I believe this has been slightly overlooked even by our omnipresent MattB.

PcM/PvC/PvE – (Monster/Computer/Enemy) Player vs AI
In order to make a game more fun a lot of people who write games employ rebalancing tactics for difficulty, some games ie. online games have one difficulty others have a fixed scale which alters a game dynamic in some cases meaning that a players scissors will have a chance beating a computer players rock on the easiest mode, this allows a player to learn through the game and even though it is easy pick up the game basics, some people like in newer versions of command and conquer have the option to automatically alter the AI level to make the battle more even.

PvP/2 Player/Multiplayer – Player vs Player
In this environment things tend to be a lot more balanced this adds to the “fun” aspect, when they work together each character type/class/unit/race etc has their own strengths and weaknesses, but in this environment the emphasis is to base the result as much on player skill as possible often meaning anything can beat anything it is down to how good the player is.

RTS
ie. Command and Conquer: Red alert 3
PvE: In this scenario as mentioned above you have different difficulty levels and the strengths come out with troop combinations the weaknesses with a single troop type, after many revisions they finally got this right with RA3 and you can see clearly a well balanced game troops can dig in and become more able to take out tanks, on the easier settings armour/firerate is also reduced for the enemy AI as are a few other things to give the player a clear advantage, later on in the harder settings not only does the player have a disadvantage as 1v1 the computers units are stronger they build faster and the computer knows the best formations and battle strategies.

PvP: The computer player here doesn’t matter the players use their own battle tactics and 1v1 their units are as strong as each other, so it comes down to good old battle tactics and formations.

FPS
ie. Quake 3 Arena
PVE: This is fairly simple to work out, AI is “dulled” down making it slower less accurate it hits less you take less damage per hit on the easier modes and as you progress it gets harder and harder sometimes if you take a single hit in some games you are dead and have to start again in the hardest mode.

PvP: Each character has no advantage/disadvantage over any other it is purely down to skill except on games like Team Fortress/BF1942/COD etc however each of these classes are well balanced enough that played correctly they are still equal in terms of power but they still have different roles as this is a team play environment.

RPG
ie. World of warcraft
PVP: You get the idea you have different classes each tactic has a different approach to play Tank/ DPS/ Boomer/ Healer/ Buffer/ Debuffer/ Combination classes. This allows for team play vs the computer or in the case of single player it allows for different battle stratergies.

PvE: There are 2 approaches to this, in heavy PvP RPG games like CABAL Online each class is balanced differently in PvP than they are in PvE this helps to ensure no matter what the class their skills and damage work differently against other players often employing different skills faster skills to beat other players with other effects such as knockdown/knock back/stun this helps make sure that any player can take on any player no matter their class but in a PvE situation they have to work as a team.

You can apply all of what I wrote in the above to any situation that is PvP and PvE no matter the genre Racing, Sports, Fighting, etc. the balancing that is used is what will be the most fun for the environment.

———————————————————

So in summary it boils down to 3 different balancing aspects:

Difficulty – Single player environment the difficulty can be scaled so a players scissors can beat a rock etc. (Any single player game)

Class balancing – This is in team play where working together helps overcome difficult objectives making up for each others weakness. (Team fortress, PvE World of warcraft (Dungeons/bosses etc), Counter strike, etc.)

PvP Rebalance - In order to make player vs player more fun the game is balanced removing handicaps, on games where it is the most effectively they become extremely popular fast. (Quake 3 arena, Unreal death match mode, CABAL Online, etc.)

Sometimes balancing isn’t done quite right and it will take a couple of generations of the game learning by the creators on how to balance it, (Eg. Command and Conquer) and sometimes the balancing makes them perfect after a couple of patches (StarCraft), at the end of the day it isn’t graphics/style/originality etc that make a game a legend its how fun it is and balancing plays a major role in that.


Object joining for customisable flexability

February 20, 2010

From my MMORPG Engine – Exordium – This work is all copyrighted if you wish to implement this style of system please talk to me first!

Unlike most games where u say have 200 items this game will have about 200 parts which you can make and design your own weapons from, (There will be stock designs from blacksmiths and people can make weapons and sell them etc..)

Item code will be a series of part numbers and another byte that indicates which part number and which flare point they attach to on that part. It will be limited i think so they dont have total control but they will be able to snap in components and scale them.

struct item_component{
byte objectid;
nibble target_index;
nibble flare_point;
}

Not sure if to have max 10 components to a weapon that would give say a sword:

blade -> crossguard -> handle -> pommel = 4 components

a double blade

blade ->
            crossguard -> handle -> pommel = 5 components
blade ->

a 4 bladed mace would therefore have

blade ->
blade ->
            crossguard -> handle -> pommel = 7 components
blade ->
blade ->

normal stave

stave = 1 component

or

blade -> stave -> blade = 3 componets

The point of this is that each object type has weight and is classified as a attacking section, holding section or defence section.

When combined according to where the item is hel you get balance of the weapon, eg. swords you can balance by adding a weight on the end (A pommel).

Back to the item code If its 10 items per weapon I have a 5 byte serial number for the weapon (1,099,511,627,775 unique items should ensure security of items maybe ill use a 4byte serial but i know after say 40k accounts have gone through then you run out of serials every time a weapon is dropped it gains a serial number, maybe could get away with have a 4 byte because of the complexity of item codes the probality in gettinga dupe there is about 4million billion to 1).

Then ide proablly have 2 bytes for elemental code.

I may help try and compress the item code by having 1byte to say how many components it has.

so we have now

struct item(
byte elements;
item_component item_component[];
dword serial;
byte elemental;
);

max length 26bytes.

Real world example: Muonline has 20byte item codes I could probally cut that down a bit but I dont think 26 bytes is that bad, because its variable length an item would be inbetween 17 and 26bytes. averaging at 20 bytes.


Train2Game – Week One

February 19, 2010

Well I got my first section a week ago – Games Developer Introduction, my inital thoughts where I was instantly impressed, the quality of the documentation the data and the tasks was above any academic course I have ever encountered.

So far I have found no bad sides to the way the course progresses through this book, given my skills and knowledge the first section of the book took me around about 3 days in total to complete.

The student world support logins and seminars are top grade the forum help, chat rooms and other students are extremely helpful as well.

The introduction uses a program for the most part called GameMaker 7, for this course you are given the Advanced version of this for free and it takes you through the basics of putting a game together from a simple 2 object game to a multiple object platform game.

There are several games and techniques you learn along the way including some of the more advanced ones like Timelines, Collision detection, Sprite handling and sounds. At first these are dealt with very simply through the GameMaker interface but the more you progress before you know it you are handling more and more of the system yourself, at this point you are actually learning the fundamentals of programming without knowing it you us Events, Loops, Switches, If statements, everything you would expect in a foundation of programming, the GameMaker simple makes this easy to learn and quick to understand.

After I had worked through all the tutorials and examples I had a play around and built my first custom game to play around based on the scrolling shooter game they create with you based on the original 1942 game. I had a play around with sprites graphics sprite control and a myriad of special effects understanding truly what it means to put a game together beyond programming.

So I have handed in my first TMA (Tutor Marked Assignment) and I am awaiting the results… Lets see how I did!


Packet processing in a network/internet based game

February 19, 2010

Now your asking me why do I write this article well, its because its simple, to many people overlook the core principles of this.

Packets:
A packet is a set of information it has a header to identify it and a series of commands then data for example:

[ID][ID][CMD][DATA]…[checksum]

This is a typical fixed length packet.

The packet ID will be 2 parts the first ID will be the type of packet typicall 4 types will exist in a secure online game data, command, encrypted.data and encrypted.command.

The 2nd ID will be the packet type what processing part it should be sent to, typically if there is a server application it will be split between player, enemy and data controls.

The CMD will be the function it is headed for some functions will require multiple CMD bytes to identify the function the packet DATA is for.

The checksum isnt always used but sometimes a player can manipulate packet information so this is used as a extra barrier for this the checksum function itself often obfuscated in a way they it is near impossible for the player to get at so cheating on the game is even harder.

Now the main point of all this IS security! Packet security is the most important aspect in a online/network game if you wish to stay away from cheats here are the simple examples you can follow:

Process anything that can affect the outcome server side.

Encrypt packets using a xor mask or similar method.

Compress large packets with a custom packing routine then encrypt too.

Encrypt the game program in memory using a executable packer.

Use anti debugger code.

Scan memory for finger prints and names of programs that can be used to hack your game.

Check the integrity of ure game files randomly, the server can send a check and the client will send back a hash to the server of the file the server asked to check.

Make encryption of a key part dependent on the machine ID for the client side the server can set this up when you first run the game ie. a file that lists all the creatures ingame, the game cant run without it, the computer the first time it runs sends certain information about the computer it is running on to the patch server and the patch server sends back a uniquely packed file it takes a split second for a machine to pack this kind of file and it can be stored as a hash server side for the file integrity check.

Keep your packet commands simple but also you can alternate the CMD byte for some functions to confuse people who are packet sniffing.

Basically, keep it simple and unpredictable.


Developing – Collaboration of an online team

February 18, 2010

I have been around a fair while with the online scene, and I have been a member of various teams and a team leader on some extremely successful and unsuccessful projects so I thought I would share my thoughts about this.

Online teams/Virtual teams/Sceners lots of buzzwords surround these kinds of people but what exactly are they?

Well they are people who write and collaborate on online projects such as applications and computer games, some form permanent/semi permanent teams and approach several tasks. Some of these teams each member works as an individual submitting tools and programs while sharing source code with only other team members, then the program is released as a team project. Others actually have a managed team each person performing a part of the programming then a lead programmer putting it all together.

Which way is best? Well the best method I have found is the following:

Initial idea > Brainstorm > Design > Workflow > Handout tasks > Code > Document > Combine > Test > Release >

Each of these sections can flow back into any section before it creating a development flow eventually each flow back will stop until the project is no longer supported, this cycle on an ongoing project should never end there will always be balancing, extra features, new supported operating systems, etc to implement.

So what are each of these sections?

  • Initial idea

This initial idea is the start of the project someone comes up with an idea a rough layout of what they want to do and grab peoples imaginations.

  • Brainstorm

Brainstorming is the part where you expand the initial idea, this will be kept going long after the release stage of the project for an online collaboration the best way is to create a forum, a place where members of the team and friends can come together and throw ideas around the best ideas are then grouped together ready to build a design.

  • Design

The design stage is where you sit down and chat with the design members of the project and the developers and one person talks to them all together going through the ideas for the project and working out the best way to implement each part, then the designer will draw up a design document and produce specifications for each part. Also make sure you outline what programs you will work with and your coding conventions!

  • Workflow

The work flow decides what tasks need to be completed before other tasks, it is no good asking an artist to do a final drawing before the sketches are done right? This part often does flow back and forth through out development between the “Code” and the “Design” section as things are altered often to do with time, money or technology constraints.

  • Handout tasks

This part is in essence the implementation of the workflow, often using an event manager to time line tasks a flow diagram also works and once a section is completed it can be used to start work on the next section, sometimes a problem arrises here team members aren’t available for this part of the project where as the person who would take the section after them are but this is where you need prompt decision making do you take out that person and find someone else, or do you let someone who maybe isn’t as skilled or perhaps on another task do it increasing their workload and increasing development time.

  • Code

Several important things to remember during the Design stage you have already decided your conventions and what you should do with the code, try to make each persons task as simple and as abstract as possible hand out functions to program with desired input and output of the function, the lead programmer will receive all this and implement it.

  • Document

With EVERY function there would be at least 1 line added to the program documentation to state what it does its definition where it is defined and what it is used for also include the function in the document after the description and if needed the design documentation too, also in here should be a full description of all media included their formats and format details and structure also UI design limitations and any problems found on the way by anyone and if they have been fixed or not.

  • Combine sections

This is the lead programmers task, he combines all the functions written by everyone else all the sections all the media all the documents and often goes back to the programmers for alterations to the code, it is important that the original programmer if possible makes the alterations because if they then later submit an update to a new lead developer they may overwrite anything added afterwards, to further avoid this the project should make change notes for every change past the original creation.

  • Test

Once the program has been finished it is time to test it out, hand it out to each programmer and ask them to test their part of the program as it is implemented and usable, and recheck everything every time something is added. Eventually you will get a fully working BETA product you can then have people BETA test it for you and make changes were needed.

  • Release

Congratulations you have released the product make sure everyone who worked on the product is duly noted and make sure you have backups of everything.

Technology and general hints you can make use of:

Forums: The best one I have found is phpBB it has a lot of useful plugins for this sort of work including chatrooms, event timelines and other project management applications.

Teamspeak/Ventrillo: TALK TALK TALK talk properly not just in chats this is the major downfall of a lot of teams meetings should be done on voice and someone take notes type them up and publish them, also record meetings too so if anyone couldn’t attend then they can still listen afterwards.

Email: Get everyone’s email address, make a mailing list and keep people up to date with forum news weekly highlighting important topics sometimes if needed daily.

Getting team members: Find people who are like-minded on forums all over the internet add your advertisement to everywhere have a place to submit a team application and give an aptitude test! Most internet team leaders don’t do this but it is a must you don’t want someone saying they can do this and that if they can’t add up, make sure your test isn’t to hard make sure it only covers the basics with a few advanced questions thrown in to ascertain their real level.

Keeping team members: Make sure they don’t loose interest, keep them interested with emails, updated from other members encourage them to write a blog about their progress this can be later used for marketing your product.

Staying in control: The project manager must must must stick to his project managers job, don’t step on to many toes don’t start saying I can do this I can do that do your job let others do their job and congratulate them. What also is important don’t make yourself seem more than you are worth if you do you might just find a mutiny or people just leave you on your own.

The right members: Make sure you have the right members to start the project there is no use starting a 3D game if you don’t have a 2D or a 3D artist because you could get 4 months in and still have no one, build the team first then do the design you will need their input to get the project off the ground.

Don’t think this will make you rich: In fact MOST projects like this will actually cost you money, try to keep everything as free as possible, host the website on the cheapest Linux or windows hosting you can find even at home using dynamic dns keep costs down, well unless your rich.

For game development: Make tech demos for alpha with a design document before approaching companies as a Homebrew web-based team, without them you just won’t get looked at and if your not careful your ideas might get stolen.

Copyright: Make sure anything you put in the public view has a copyright notice, also if you take and store ANY ones details make sure you comply with the data protection act of the country you website is hosted in AND if you are a registered company the country you are based in.

Last of all if you lose focus look back at the roots of the project and remind yourself why you started it bring it back under control if your leading the team you need to lead and keep leading or it will fall apart fast.

HAVE FUN!


Exordium

February 14, 2010

Exordium – The beginning.

In this blog I will follow my Train2Game course progress, I will also add all programming tips and tricks as I come across them and also post a few random tit bits from my past.

There will be a weekly video diary and I hope an almost daily blog entry – Lets get developing!


Follow

Get every new post delivered to your Inbox.