One of the more useful features i have come across is a scripting language. From may WoW days, i picked up a little of the language known as Lua. Its is a dynamically typed object oriented language. Meaning you don't define variables, and variables can even be methods. That's right, METHODS!
While trying to conquor the problem of key binding, custom user key binding (Aka, the user can set any key to do whatever they want), i came upon a problem. How to do this? I can't just assign the key 'K' to execute, WalkForward(). But with Lua, you actually can, in a way. You can use a table(with a key and a value) to use 'K' as the key and WalkForward() as the value. Now that i sit here and type this, i am most positive (not 100%) that C# probably as a similar data structure, possibly. Though i will still stick with the Lua fix because writing in a scripting language will much improve my game in the long run.
Ask yourself: Why is WoW so popular? It's because you can nearly do WHAT EVER THE HELL YOU WANT.
Custom GUI, here you go.
No Gui? Got your keys memorized? Sure. Macros, hell yeah.
GIANT ASS WORLD?! Got that too.
This is what i aim to replicate. The sheer depth of the game. Players will customize the game, i only provide the means to do so. This means custom armor (yes, you will be able to make your own armor, no not in the traditional, 'smithing i need 5 copper and 10 bronze to make a chest plate' No, you'll be able to mix and match metals to make alloys of various strength, the mix will determine what colors you can have your armor appear, its resistance to damage types... and so on.) custom building, custom enchantments, i've even thought about a language that would allow you to write words down in books, then if you click on the books, it would cast a custom spell.
All this would not be possible without a scripting language. Scripting means compiling while the game is running. You don't compile it until it is needed, that is the beauty of it, along with other things.
To Sum It Up: Scripting is beautiful, use it to take those leaps you couldn't with your core language. Learn a scripting language. Use one, it can make your life easier.
TNariskan.
A blog about my en devours in the world of Computer Science and game programming.
Showing posts with label MMO. Show all posts
Showing posts with label MMO. Show all posts
Thursday, December 15, 2011
Wednesday, November 9, 2011
MULTITHREADING
One of the more advanced topics many programmers may eventually come to face: running multiple things at once. Today I wrote a simple multi-threaded chat server. It may seem trivial but the more advanced application would be to easily upgrade it with protocols to tell your clients what the server looks like.
There are two types of MMO servers:
Server Heavy or Client Heavy.
Server Heavy: This requires a more powerful server, as the name may hint. In this format the client simply sends a command to the server that the player is moving forward, not that the player moved x amount forward. This type of server is less liable to hacking but requires more processing power as the server is doing all the calculating and not the client machine.
Client Heavy: This is the inverse of the above. The client does all the heavy lifting and the server only relays positions of other players back to the client and the game state.
For an MMO server, one must multi-thread. You should have a thread for each player or their connection. In my server, a new thread is spawned for each new connection made to the server.
More to come,
TNariksan
There are two types of MMO servers:
Server Heavy or Client Heavy.
Server Heavy: This requires a more powerful server, as the name may hint. In this format the client simply sends a command to the server that the player is moving forward, not that the player moved x amount forward. This type of server is less liable to hacking but requires more processing power as the server is doing all the calculating and not the client machine.
Client Heavy: This is the inverse of the above. The client does all the heavy lifting and the server only relays positions of other players back to the client and the game state.
For an MMO server, one must multi-thread. You should have a thread for each player or their connection. In my server, a new thread is spawned for each new connection made to the server.
More to come,
TNariksan
Tuesday, November 8, 2011
Release of the Alpha
Today I release an alpha version of the game I will be integrating to MMO status. It is a very rough platform. There are nearly no comments and scraps of unused and obsolete code laying around. Later this week or early next I'll release a cleaned and commented version.
Cheers,
TNariksan
Cheers,
TNariksan
Subscribe to:
Posts (Atom)