Evolution of Lentus Online: A 3D MMORPG with XNA 4.0
You can watch the demo video of b1.2 here.After a couple months of coding the game core, it became impossible to test the functionality with a text based client. Yes, I used a text based client in v1 to test the game, when it only included moving around, acquiring items, attacking people, dying and looting etc.
Although I'm a C++ and OpenGL type of guy, I preferred new XNA 4.0 (a very good DirectX wrapper) for graphics and C# for coding the server and the client; surrendering to insistent suggestions of a friend. Honestly, I was too lazy at that time to dig into low level stuff (like in my other simulation projects), since I was just starting to deal with two majors in the university.
Behold... The ultra mega killer kamehameha client:
I made use of a project on the internet, whish I could remember which one, but if you type "XNA for dummies" or sth like that on google, you would eventually see that project.
Yeah I know, shame on me.
Before moving to the other steps, I want to show you some scenes from v5, to impress you and give you a reason to read the rest:
Me and my friends, capturing a castle, which the bots inside gathered together and built by themselves.
Sorry for using the same free models for everything, but I was a student, you know, a poor guy in his dorm eating bread with water.
*dramatic violin melody here*
As you may have noticed, I made use of Riemer's XNA tutorial for the terrain (who doesn't! You should go visit his great xna tutorial sometime), and the skinned animation project from apphub. I'm such a thieve right? Believe me, it takes much effort for even adopting these stuff into your project. And also note that XNA is not a game engine where you drag-drop items to the scene. It is a DirectX framework where you actually code stuff. They are two different things, people!
Here is another one from the same v5 beta release:
Note that these ships carry players & bots and can fire rocks if you load catapults in them. I don't know what you think, but it is pretty cool for me.
If you are curious about why I have that many versions, I mean why the fork do I have v5, it is just for me to not to confuse myself in over 40k lines of code when I need something from earlier versions. I suggest you to have a good versioning system of your own (unless you use plug-ins or other software for that) to make your life easier.
Also you can be satisfied by seing that the project is moving forward :)
Anyways, let's continue to our journey shall we? *like a sir*
The fundamental idea of the game: Everything is a container. There is a tree shaped object hierarchy. Everything has a parent container, and children containers. Even game effects are implemented as containers. For example, your right hand container has a sword, which is also carrying a cold effect. Yes, you can loose your hands during the battle, or someone can carry you around, and maybe even eat your leg and put it into his stomach container. I believed that this structure would give me a huge flexibility.
Here I managed to divide the screen for the game, map and inventory, and finally get the real time inventory working. This is actually the foundation of my container notification system.
Contrary to the common sense, containers don't know what they view. They in fact know the ones who are viewing them. If a container loses one of its children, it notifies the ones who are viewing it. Sounds strange, but this system proved its efficiency for me later in the developing.
Yes, that is the character panel, what were you thinking? I started to bind actions to the graphical interface starting around here I guess. I thought that clicking to an object would be a better way to attack instead of typing "canerus attacks zeus". Oh the pain...
Every action and item has an ID generated by the server, and these ID's should be interpreted by the client and the server separately. You don't have a character in this game, your client controls a container, and this container may change. For example, when you are driving a ship, you become the ship, and you can use actions that a ship can use.
Yes, it indeed looks like my grandmom's edgings, but... Have I said before that I suck interstellar-size at arts and drawing? Anyways, there are actually some important things beneath this picture.
Bots are able to track you, and intelligently use different tools against you. For example if you have a sharp and light knife, they take out a light shield and choose a weapon against your armor and shield. All body parts may have different armors, and bots determine your weak points according to their intelligence.
I'm using some new badass 3d models here. Also note the ultra-sucking tile map.
By the way, as the graphical client evolves at tortoise speed, huge amount of things are going on on the server side. Many new functionality were implemented and were waiting to be included in the client. If I remember correctly, by the time that this screen was taken, I was implementing the farm system and using tools to harvest faster etc. on the server. Note that the server runs all the game logic, where the client is only responsible for sending action requests and displaying responses accordingly.
As the client have slightly improved view, the game logic has minion and lineage system now. Containers which are in your lineage aid you in the game.
Instead of individually selecting the minion and giving an order, I implemented a loyalty system, in which your minions around you gets more loyal to you as you fight together, and you loose their loyalty if someone beats you up in front of them. According to their loyalty level, minions may ruthlessly attack your enemies till death, may flee and leave you like a tree, or just stand there and watch (traitor bastards).
You may have your own minions by zombifying corpses, have children by mating with other players, or paying vendors for mercenaries. Bots can have children too, they create their own lineage and hang around in groups.
Action panel is added and the character panel is improved. Actions can be used by mouse clicks now. Judging by the poison action, I can say that I was implementing timed effects at that time.
Effects are bonded to effect containers, and affect their parent containers. For example, poison event is bounded to a poison container, which is contained in your sword. When you hit somebody with that sword, the poison container is copied to them, damaging the body container over time. This is actually a very cool system, and I believe that it provides a huge set of opportunities for the game.
Constant effect: For example, the enemies agility drops down for a time period (according to the power of your spell) with the frost spell, and get back to normal again.
Periodic effect: Regeneration effects can be good examples to this type. If a ring has the health regeneration effect in it, it causes a periodic increase on its owners health.
Effect stacking: e.g., frost spell may loose its effect on a container if it gets a fireball afterwards. lightning hurts more if you are frozen.
Just a couple pages of game menu is implemented on the client side, but the server had a lot more to do again!
Save and load systems are implemented. I started to optimize the server as the game logic started to become a real deal. The server manages its computing power over different parts of the map, making areas that no players are viewing sleep or work slowly. Many new technologies are implemented on the server side which I don't remember all of them now. For example the server sends the environment around a player when it has excess bandwidth and cpu, and the client caches these areas for further use.
Notification system is improved. For example when a player moves forward, new tiles are added to his field of view by adding him to their observers, and if something changes on these tiles, the player is notified. Also when the player changes tile, the new tile notifies its observers, and the observers respond to this notification according to the their own implementation. An aggressive bot may start chasing you as a notification response, as a trap may get activated and punch you in the nipples.
Clan system: Creature spawn is provided by mating. Bots reproduce and create lineages and clans.
If a clan becomes strong enough, they locate other clans around and attack them. I'm still having difficulties to keep the population in balance. Eventually a clan was screwing all their enemies and was dominating the map. I tried to prevent this with civil war; if a clan becomes too strong, it is divided and forced to become enemies.
Age system: Creatures in the game gets older by time, and an older creature is stronger than the young ones. You may encounter ancient creatures at untouched parts of the map, and may not be able to see the sunshine again.
Wander system: Bots don't stand like trees, sometimes they move around randomly if they are idle. Usually they are busy with mating, building a town and attacking to other groups.
Guard system: As the name suggests, it guards a territory against enemy clans. They are supposed to keep safe zones for each clan.
Territory system: If a lineage becomes too crowded, the area around them becomes their territory. The territory is covered with walls and guards automatically. If a clan becomes too strong, they attack to other clans and if they succeed, their territory gets bigger. A bigger territory means more place to build homes and increased population.
Here you can see that there was a huge battle (many corpses on the ground), and yellow creatures won it. As you explore the map, you encounter things like this, and it feels awsome :)
Siege weapons are also act as minions, they follow you and aid you in the battle.
Catapults throw rocks, which have bonus against walls and buildings. Their attacks have a small splash radius. Balistas launch big and powerful arrows. They can hit long distance targets with accuracy. Siege towers are used when marching toward the enemy territory if it is full of archers and balistas.
This is a city which is created dynamically by a bot lineage. White boxes are meant to be walls for now... :) As you can see, they have built houses (all tents for now) and walls around.
As the settlement grows, more siege weapons and guards are assigned to guard it. Bots reproduce in the city, some of them become city guards, and some of them march to surrounding areas to create new towns. A crowded group may decide to attack an enemy city if they have enough siege weapons around.
Now that's what I call a cool game menu and theme...
Hello Riemers! Thanks for the advanced terrain tutorial! Shit just got real...



.jpg)
























No comments:
Post a Comment