Monthly Archive for August, 2005

Keyboad Input

tap R

  • clip weapons
  • if there is a fuller clip in inventory, remove the current clip and swap with the fullest.
  • individual bullet weapons
  • load one bullet into the weapon.

double tap R

  • clip weapons
  • a faster reload, if there is a fuller clip in inventory, drop the current clip on the ground and reload with the other clip.
  • individual bullet weapons
  • perform a different reload animation, perhaps longer but cooler looking.

hold R

  • clip weapons
  • remove the current clip and swap with the fullest clip in inventory, then start filling it up with individual bullets, if run out start taking bullets from the smallest clip
  • continue holding R
    • 3 sec delay
    • start filling up the next fullest clip with bullets, then the next etc.
    • 3 sec delay
    • start taking bullets of the same type out of other weapon clips and filling the current weapon clips.
  • individual bullet weapons
  • continue filling the weapon with bullets until finished

hold a directional key

  • move in that direction continue to aim forwards.

hold a directional key when movement in that direction is blocked by an object

  • use the object as cover, pressing a direction along the object as well will move in that direction while keeping cover. If you get to a corner you will peek out first before moving around. If you are pressing against an obstacle, you will lean on it with your back. If it’s a low wall that you can peak over, press the forwards key to press against the wall and position to shoot over it, crouch will hide out of the way.
  • ie, forward + crouch = out of sight
    let go of crouch = canshoot
    let go of forward and crouch = stand
    let go of forward = normal crouch stance

double tap forwards

  • start sprinting in that direction, left and right can be used to strafe a bit, but backwards cannot be used. As long as a movement key is held down (not including the backwards key) you will continue sprinting

hold a direction then tap space

  • perform a small jump or leap in that direction

hold a direction then hold space

  • power up for a big jump or dive
  • release space
    • do a large jump in the direction running

hold a direction then double tap space

  • perform a dive in that direction

hold a direction then crouch

  • perform a roll (male) or cartwheel (female) … I’m a stereotypical sexist

hold a direction then double tap space then hold crouch

  • perform a dive then a roll when hit the ground to get back up on your feet

standing still and tap space

  • jump on the spot - it there is a ledge above try to grab it

standing still and hold space

  • power up for a big jump or dive
  • release space
    • if a direction is held, do a large dive in that direction, otherwise do a large jump on the spot. Same roll option as for the normal dive

standing still and hold crouch

  • go into crouch stance
  • relase crouch
    • stand

double tap crouch

  • go into floor mode - all movement is with the whole body on the ground shuffling etc.

from ground hold crouch

  • go into crouch
  • release
    • go to stand

from ground tap crouch

  • stand

from ground press space

  • stand

direction keys while on ground

  • depending on orientation, shuffle forward, backwards or roll to the sides shuffling forwards can rotate the body a little.

holding action while a single item is available

  • move to and pick up the object

executing a roll or a dive while holding action

  • attempt to pick up a nearby weapon at certain orientations during the dive and roll

holding action when a door or moveable device is available

  • grap the device with one hand, moving the view in a certain directions will interact with the device
  • lever = up down, door = left right etc.
  • in some situations you will also have to move release lets the device go

holding action when a ledge is nearby or available

  • attempt to grab the ledge
  • release action drops from the ledge
  • up is pull yourself up onto the ledge
  • down is drop
  • left and right move in that direction along the ledge
  • view is partially restricted

holding action when a ladder is nearby or available

  • attempt to grab the ladder
  • release action drops from the ladder
  • up is climb the ladder
  • down is decend
  • left and right move in that direction while still holding the ladder
  • view is partially restricted
  • one handed weapons only, even then climbing is slower
  • weapons are put away by default, unless they are being used, or have been shot in the last few seconds

Delegates

A game language would benefit greatly from a state based mechanic, such as delegates. Basically these are objects whose classes can be changed at runtime.

A light example:

delegate light
    - void toggle()
    - boolean status()

state on:light
    - void toggle()
        state off

    - boolean status()
        return true

state off:light
    - void toggle()
        state on

    - boolean status()
        return false

I’m not entirely sure about the syntax for changing states, it could either be setting a certain property, a method call or a keyword call as shown. Either way, this is quite cool.

I’m also not sure about inheritance, can a delegate ’subclass’ another delegate? What about states?

Either way, states can’t add any extra methods or properties to the class.

Oh, and they are fast because all they do is replace the class, so this is a good way to multiple functions without if statements all the time.

A notion of 'blocking'

My virtual machine is going to use a similar ‘constant pool’ to java and this can be linked dynamically or statically on load. Also I talk in the 2nd and 3rd person a lot… sorry. So with that in mind, this is the most recent question that I’ve asked myself.

We need a way of loading and unloading scripted bits of functionality faster than the complicated re-linking (or whatever I decide on) method. It would be very nice (ie I won’t settle for less) for this to be dynamic and automatically upkept. If a series of groups are written in such a way that reversing the order and unloading won’t change the offsets for any other part of the code base, this should happen automatically.

I think a good way to do this is for each class to have a stack of groups that have modified it, if the group that we are trying to unload is at the top of every stack of every class then we can unload it automatically. Also if we are the last group in the stack we should delete the class, but we need no instances of it in existance (may be hard for classes with static instances?).

I haven’t completely worked out the specifics yet (the class hierarchy will get in the way) but I think it will work.

Multiple Virtual Machines

Can two or more virtual machines share groups?

The chances and\or reasons for having two or more virtual machines is very rare, but then if I’m building it possible do I need to support this?

Reasons for having two virtual machines:
sandboxing? … but then they can’t talk to each other
different scripting for different parts of the program
… don’t need group overlap

So… making the virtual machine instanceable for oop niceness only, two virtual machines running at the same time maybe possible but not supported.

Introduction to Groups

Previously I had a ‘group’ being a special xml file ending with .vgroup that details the dependancies and files that are a part of a group. The directory that has the same name of the group is automatically searched for voodoo files and those are added to the the group as well. I was thinking, this is overly complicated - the dependancy can be worked out from the files themselves and it’s not often that you want files from a group being in two different places.

So now a group is just a folder of voodoo files found in the default base folder. They can all be loaded and unloaded at the same time. Loading a single file encapsulates it in a group within the virtual machine.