Hammer vs. Coffee Machine

I implemented a simple "competition" feature. Competition means, that some items can damage other items. This is another check of the item server design.

Competition is a bit more advanced and demanding, than the crafting. During implementation I learned, that we need floating point values in addition to integer values. I could map all crafting actions onto integers. But competition needs finer grained computations. So I had to change the database. I also added time values to implement a cool down period and had to change the database structure again. Effectively, the cool down implements a hit-rate limitation, which leads - in combination with damage values and modifications - to the usual DPS (damage per second) statistics.

Before I started coding, I modeled the behavior in Excel:



Here is what we can see at on the inventory web pages. This is the inventory with a hammer and a coffee machine. I used the coffee machine to make coffee, but the hammer can also damaged it:



This is the coffee machine. It is in perfect shape (Condition: 100%, Hitpoints: 1000). Obviously, the coffee machine is susceptible to shock damage and piercing damage. But shock damage is more dangerous. Piercing damage can be absorbed more easily.



The hammer. It can be used once per second (Attack cooldown). The hammer is a shock device. It smashes into something. It does no piercing damage. A knife would be different. The hammer makes 100 points shock damage. But the victim will absorb some of the damage.



Now I can hit the coffee machine one with my hammer with this command:
http://localhost:3277/Portal/Inventory/DroidAction/61/Hit/47
After the "hit", the coffee machine is in worse condition than before. It lost a bit of its "Condition" value (Condition: 93.0 %):



The hammer lost also a bit of its condition. Much less than the coffee machine. It is just a bit worn down (Condition: 99.9 %). The hammer will have to be repaired after some time in order to project the full damage.



Very simple, isn't it? But there are powerful mechanisms implemented which we will use later. The design of the item server has been verified and completed with workflows of different areas. The item server:
  • caches items,
  • loads items from a database
  • returns item properties on request
  • has user actions
  • has interactions between items, and
  • saves changes to the database

I will now leave the item server and return to work on the client. The client has lots of back-end and protocol code. But it does not really show avatars. We want to see animated avatars chatting on web pages. The client also needs a user interface. It needs windows, dialogs, a settings dialog, a buddy list, etc. But most important are avatars. That's the next step. Not a small one. I'll keep you updated.

Coffee and Cola Sample Implementations

I implemented a crafting process in the item server and the portal.

I am using two examples to check if the details make sense: coffee machine and cola dispenser with their respective ingredients and products.

The image shows all items which are currently defined. Most of them are for testing various functions.
This is a view of my visible inventory. One of them is a cola dispenser, a cola machine which makes a noname cola from water and syrup. It also needs energy. If I click the cola machine, then ...
... I see details of the cola machine. The machine is already equipped with water, syrup and batteries. It has a button to produce cola. When I press the button ...
... then I get an additional item, a small can of cola. Actually, a noname cola. Not very fancy, but still.

(For game designers: all item interactions are modeled with items. We took some days to replace a property driven model by an item driven model. It might be a bit less realistic, but manipulating items is more fun than manipulating item statistics.)

I can click on the cola can and see the datails ...
... including a button which lets me drink the can. Usually I won't drink it myself. I would offer it to visitors of my web site. If someone else drinks it, then we both get social points.

This is all just in aplain white design, actually not really a design. Only the bare minimum to check HTML/CSS structure and classes.

There will be a real design later. What about the green we were used to? or facebook blue? What do you think?


For developers: the item server has now 63 unit tests, the portal is still at 69. There are 74 different types of properties, which manage all item interactions.

Next steps: we will implement a little bit more item interaction, including damaging some stuff. After that we will turn back to the client and add a cool avatar display.

Virtual Goods Update

Neptun is growing. After the basic functions are complete, we started implementing an experimental version of virtual item interactions. Interactions enable simple work flows. Later we will extend these work flows, add more complex work flows and graphics for objects on web pages.

This sounds very theoretic. Lets make an example: you can have a coffee machine. You put the coffee machine from your inventory down to your web site. You can add stuff to the coffee machine, say coffee beans, water and a power source. Then you can tell the coffee machine to make coffee for your friends.
Your visitors can use a cup to take coffee from the machine, which results in ... (I will tell later). You will get the water somewhere on the web from a fountain. The water can also be used to grow plants on your web site. Plants need seeds. Some plants can be harvested for wood. This is just an example.

Virtual goods on the Web will work like in other games. But now they can be everywhere. Not just inside a facebook game. They can be on your homepage, on your community page, your forum, anywhere you go. We will take care, that plants will not overgrow web pages. Hopefully you will help us. And plants are not the end. All you can do INSIDE of games will be possible OUTSIDE on the Web. Not inside an artificial world, but on the real Internet.

And yes: we feel a little bit guilty for programming virtual goods now, before you have avatars. But I admit, that virtual goods are so much fun and we want to research this segment a bit further before we go back to the client and the avatar. Please be patient. In the meantime: the community version of weblin is still running. You can grow the community by offering the download on your Web site.

For programmers: This is how Neptun looks like in Firefox. It is just a list of controls for programmers. Neptun has now 40 test functions (the portal has 69). The large blue text shows links for these tests. Each link execute a single test. The "All Test" link executes all at once. At the top is a link ("Items") to the item list as before and a way to stop the server ("Quit").

Neptun: Virtual Items Server

Avatars will have an inventory of virtual items. They will be able to buy, sell, build, trade and loot virtual items. A server manages all these items and everything you do with items. Over the last 3 weeks we implemented such a component. This is our first version of a virtual item server. It is called "Neptun".

In October and November we implemented a first version of the web portal and a simple form of an inventory. Back then, we simulated our items. Now, they are real.

The inventory is now populated by the item server. In other words: items are alive inside the item server. If you see them on the web portal, then the portal fetches all it needs to display them from the item server. As usual, items are also stored in a database for safety. But in the database they are only passive. In the item server they are active and you can do something with them.

What you can do comes later. For now these items have a place to be seen (the inventory of the portal) and a place to live (the item server). It is actually much better to see virtual items on a web page of the portal, than in the item server. On the portal they have translated text and images.

Developers can also see items in the item server, but this is much more bare bone. So, this is how Neptun looks like. It has a web user interface, but it shows only technical data. There is a list of item numbers and item properties. Not much for the user, but very informative for developers.

For the programmers: Neptun is implemented in C#. We program, debug and test in MS Visual Studio 9. Then, we run the program on Linux with mono.

State of the Avatar

It was quiet during the last 2 months. The main reason is, that we started working permanently in a day job. Since this project has no funding, we can not afford any longer to live without income.

I continue to work in this project in the evenings and on weekends. Clearly, work progresses more slowly. We can not hold any previously announced deadline of the roadmap.

There has also been a shuffle in responsibilities in the project. More about that later.

I just want to tell you, that we did not abandon the project. There will be a new virtual presence system with avatars and virtual goods on all web pages. We are continuing to work. Only the mode and the speed changed, because we have to work for a living.

On the other hand I will blog more in the future. I will tell more frequently what we are developing so, that you kan keep track of the project.

Browser Navigation (FF)

Browser Navigation has been implemented for Firefox. It is a substantial Firefox extension in Javascript and some C++ client code. But we are very happy, that we do not need the hook DLL like weblin.

Internet Explorer has been deferred. We are an open source project, so supporting open source browsers has priotity. IE support will come later.

Christmas and New Year

We planned to work on browser navigation for Firefox and IE over the holidays. Browser navigation means to detect browsers and tabs and feed navigated URLs to the avatar client. In addition the client needs coordinates of browser windows and always up to date visiblity information of tabs. Windows and tabs can do a lot of weird stuff, including being closed and switched at any time and being minimized. Many cases, much work.

Unfortunately, the holidays were full of visiting friends, chill out, party. So, the navigation work did not progress as planned. We will continue tomorrow. Promised.

Happy New Year!