Been working on a function to simulate all keyboard events and return pressed keys in XNA.
public string GetPressedKey()
Keys keysDown = CurrentKeyboardStates.GetPressedKeys();
if (keysDown.Length == 1 && CurrentKeyboardStates != LastKeyboardStates)
foreach (ggFramework.Symbols item in symbols)
if (item.index == (byte)keysDown)
Create an array of pressed keys and get a list of pressed keys.
If 1 key is down and the current key state is not equal to the previous state then do; for each symbol in a list of expected symbols we expect to see, check whether the key down’s byte value is equal to the expected value you want to detect. By this I mean, have an array containing objects, each with it’s own decimal value related ascii symbol.
I use an xml file containing my data and I load that into my array.
public class Symbols
public byte index;
public char symbol;
If the keyDown is recognized as one of the keys listed in the array, it will return the char.
In life everything comes in pairs and there is no exception. You may need to think outside the box for some answers but it’s really not something you should need to question.
My question is ‘What do I want to do with my life?’.
Well, I want to change the world for the better; and now you may say ‘Well, who doesn’t?’ and while this is true; we in life reap what we sow.
Okay. So the next question is how are you going to change the world? Doing what I love. Teaching ethics and philosophy through computer games. An instruction manual with an entertainment mechanic.
- Server side dungeon map
- Temporarily removed player characters
Works multiple clients on same PC
Redoing the network cause it’s really messy. Just backing up current network.
Original gen. Small rooms separated by 2×1 corridors. Rooms didn’t always link up and levels as a whole didn’t feel unique enough.
New gen. Changed walls to whole blocks due to the way walls are now generated. Still occasional areas that are unreachable, but the path finding algorithm will hopefully stop the game from generating levels with unreachable terrain.
Levels are generated by the server upon launch and when entering a new area.
Upon connecting (LOGIN) to the server, the player is sent level object’s.
When moving, it the server-side checks whether there is a wall in the location the player is trying to move… so, server-side collision.
I’ve been thinking how I’m going to turn the existing game into a multiplayer game.
When the server is hosted, the game difficulty is determined by the host’s character’s level.When people join this game, they spawn in a random room on the same floor as the host player,
regardless of their character’s level.
Levels are made up of 10×10 areas. Each area contains a 3×3 floor space. Areas are connected by a simple 1×2 path.
Currently the game generates an array of these objects all around the level at random, then we declare that if, for example, area[ x + 1, y ] exists, then area[ x, y ] has a bridge (a path) leading east, and area[ x + 1, y ] has a bridge leading west. A random floor tile in the level is transformed into the staircase leading up, and another leading down.
GameObjects are either WALKABLE, or NOT_WALKABLE.
Things I plan to add:(x = priority)
- Inventory. Dropping and Picking up items on floor.(6)
- Character data saved onto server (2)
- Stat development over real-time (not affected by turn based movement) (7)
- Chat box (3)
- Event box (4)
- Turn based movement (5)
- Path finding to determine level is completable (1)