Archive for » 2011 «

szerda, november 30th, 2011 | Author:

It is the last day of the month, and I still haven’t finished the game. I have a handful of remaining tasks to make it work, and a few others to make it good. But I don’t really care about the deadline, because for this I have as much time as I want to spend on it.

Anyway, when I have free time – eating, travelling, etc. – I am trying to plan ahead. There is one last large task in my list, here is the broken down step-by-step guide for it:

  1. Validations
    1. Is there anyone playing the game?
      1. Players might be deleted
      2. If 0 players are found, end the game
      3. If 1 players is found, add extra score, end the game
  2. Loading turns
    1. Active turns only – a turn is active as long as no other turn was submitted for the same game from the same player
  3. More validations
    1. Does the player still exist?
    2. “Jump out”s are not included in active
    3. If 0 or 1 actives are present, skip the turn – Turn count is increased, though., so skip to no. 9
  4. Robots acting
    1. Player substitution?
  5. Player positions calculated, “jump out”s are removed from the list
  6. Explosion calculations
    1. coos with bomber player ids
  7. Checking affected players
    1. Effect types:
      1. Self effect: negative score
      2. Other effect: (Can happen in parallel with no. 1)
        1. Score to the bomber
        2. Death to to affected
        3. Affected jumps out until net activity
      3. Store player scores
      4. Recalc high scores
      5. Store movie data
      6. Store turn result data
  8. Mark processed turns as executed in turn X, but keep them active
  9. Check game end criteria:
    1. Turn based: If turn count is >= max turns, close the game
    2. Deathmatch:
      1. If there is only one survivor, close the game, give extra score to survivor, recalc high scores?
      2. 0 survivors: Close the game
  10. Start a new game if needed?

This is about 5 hours worth of work – about three evenings.

Category: Hobbi  | Tags: , ,  | Leave a Comment
csütörtök, november 10th, 2011 | Author:

A short description:

Turn based game. The players are in an arena, with an unlimited supply (or actually, limited to one / turn) of paint bombs. They plant their bombs and find a hiding place. At the end of the turn, all the bombs go out at once, painting the players in their radius. The players get positive score for the other players they painted, and negative score, if they were painted.

Url: Paint Bomb

Category: Hobbi  | Tags: , ,  | Leave a Comment
csütörtök, november 10th, 2011 | Author:

Rövid leírás a játékról:

Körökre osztott játék, ahol a játékosok célja az, hogy festékbombákkal robbantsák fel egymást. Minden játékos minden körben lerak egy bombát, majd keres egy búvóhelyet. A kör végén a bombák felrobbannak, beterítve mindenkit a hatósugarukban.

A játékosok az alapján kapnak pontot, hogy hány játékost sikerült elkapniuk, és negatív pontot azért, ha őket festi be valaki.

A játék itt lesz elérhető: Paint Bomb

Category: Hobbi  | Tags: , ,  | Leave a Comment
kedd, november 08th, 2011 | Author:

Paint Bomb’s advance is slow, but steady. Now I am experimenting with explosions and walls.

Ok, that one is very simple. How about this one then?

Time spent on calc: 114ms.. pretty fast, ah?

Category: Hobbi  | Tags: ,  | Leave a Comment
kedd, november 01st, 2011 | Author:

Today is the day when the NaGa DeMon (National Game Design Month, or Naga Demon, whichever you like more) starts. Although I am pretty sure that it is a different Nation, the challenge doesn’t specifically mention that I should be an American.

So I decided that I grab one of my simpler game ideas – Paint Bomb – and try to develop it, and play it in this short amount of time – November. That means that I need to give up some of my Lotro time, as well as time that I’d otherwise spend on developing Grim, but there are benefits as well.

So, stay tuned, I’ll let you know when beta testing starts.

Category: Hobbi  | Tags: ,  | Leave a Comment
kedd, november 01st, 2011 | Author:

Based on the price of Kindle Light (no touch, no keyboard) on amazon.com and amazon.co.uk, I expect the following prices for the upcoming touch screen ones in the UK:

Kindle Touch: 114 GBP

Kindle Touch 3G: 154 GBP

Which is pretty similar to what Kindle 3 was (109 and 149 originally, 111 and 152 after the tax change).

Obviously, I don’t expect to have Ad supported versions here.

Category: Hobbi  | Tags: , ,  | Leave a Comment
kedd, november 01st, 2011 | Author:

After trying to define what makes an adventure ‘Epic’, let’s take a look at the AI. The scope is somewhat bigger than just the epic adventures, this time we need to lay down the foundation for NPC AI driven quest/task/job/adventure generation first.

NPC AI In separation

Previously, I was writing on this blog about NPC AI based on Maslow’s Hierarchy of Needs. (In Hungarian, so I’m linking only the wikipedia now..) Simply put, this system defines the same levels in the same order for humans, as it is outlined in Maslow’s Hierarchy, then uses them to determine the next action for the NPC. Naturally, different races have their own structure, and make their decisions by their own needs.

While in theory this is a very good system, in practice it is not the best for the imminent action, when the entity is expected to react when – for example – it is attacked. Also, quest givers are usually not expected to have their own lives, or to do anything else than to interact with the player. It is actually better to have a simple state based system for reactions, and use the maslowian system for long term goals, and with that, quest generation.

Beside of the memory, and the sense of the environment, the entity needs a sense of future needs. Let’s take the blacksmith of the village, as an example, and analyse his long term needs.

On the lowest level, his everyday needs: Air, food, something to drink, other body functions, sex. For three of these functions – food, drink, sex – he can make long term plans. Having food in the storage, having some water in the pitcher, being in good terms with his wife, these are all things that he can and will do to keep the status quo.

One level up, safety. To prevent future accidents, he takes good care of his tools, and protective clothing – mittens, apron. He puts out the fire for the night so that the building won’t catch fire in the night. He locks the door so no-one steals his materials, tools. Safety is one of those things where you need to do a lot of things to prevent future bad things from happening.

Then the next level: “belongingness”. (I found this wonderful word on the wiki.. :) ) There are a lot of groups the smith belongs to. His family, his friends, the guild of craftsmen, the angling club (see below), the village, the country, humans.. Although the role of the entity is usually more significant in a smaller group, meaning that he is more important in his family than as a human, he has obligations in each group. He will earn money to be able to put bread on the table. He will go to the local pub and drink an ale with his friends, and if a friend needs a loan, he will give some money to them. And so on. The future need on this level of the hierarchy is to maintain social status and to provide safety for the group.

Esteem, the next level, is when our smith shows his ambition. He wants to be known for something: Be a good father, be a good friend, be the leader of the craft guild, the best smith in the country, etc. He is working hard on this, to earn reputation. In game terms, the previous level means that he works to keep neutral reputation in the groups he belongs to by fulfilling his role. This level means that he is working to increase his reputation beyond neutral.

And the last level is self actualization. As I mentioned above, he is a member of the angling club, because his hobby is fishing. He likes fishing, not just for the fish, but also for fulfilling his need of solitude, and the time he spends out at the lake. He plans for these fishing trips, checks his equipment, gets the right kind of lure, talks to other anglers about good places, big catches, etc.

As we can see, these levels are somewhat interconnected (work -> money -> food) and you can be in several states at once – you might be worried at once about getting food for tomorrow, and forgetting to lock the smithy door. Also, the degree of your need can vary, you might be worried about having food next week, but that is probably not as worrying as not having food for tomorrow; you can quantify the need as a percentage value, for example. Thus, a simple finite state machine would not be sufficient for this,  but a fuzzy logic system might work well. Aside of this, every NPC must have a definition of groups it is part of, as well as a “personality”, which would describe the importance of each levels for a given NPC. For example, we might have an NPC with a high importance for self actualization, and low importance for safety. Putting these two together the NPC is willing to go to prison to defend it’s art. (see Marquis de Sade) Personality also needs to define the occupation, hobby, and interests of the character. This importance of the need can be sometimes expressed as the speed the need raises – if the NPC eats more, it will need to store more food to have reserves for the whole month.

NPC generated quests

Now, let’s take a look at this system. What kind of quests can we generate based on this system? Let’s put together a few examples.

On the physiological level, the NPC might need help to gather food, get something to drink, or get sex. Also, the NPC may offer these things and is looking for someone to buy them. (this latter one is actually the second level, but connected to the needs of other NPC on the first level). Possible quests here is “get meat”, “help with the harvest”, “remove the troll from under the bridge which prevents us to get fresh water”, “get me a specific type of wine”. It’s important to realize, that we mix the levels here; the third one is safety as well as the basic need of drinking, and the fourth one is actually more like self actualization than basic need. The common point with all of these is that the NPC has a goal, but for certain reasons it requires help to achieve them – if it would be easy, the NPC would do it itself. A possible Epic quest on this level is to take food into a castle that is under siege and surrounded by enemies.

(I’d like to emphasize one thing here: There might be several different ways to actually solve these quests, and that is intentionally part of the system. The NPC doesn’t tell you which or how much animals you need to kill to get meat. It doesn’t tell you to kill the troll, if you scare it away for good, it can live with that. It doesn’t care about whether you steal the wine, buy it or take it out from your backpack.)

Second level: The source of the “Kill ten rats” type of missions. Defend, escort the npc, but also, help him to get materials for his everyday job, catch the robber who robbed him, etc, etc. Carrying items from point A to point B, including the safety of the item. Also, health is here, in this category, so a quest to find a rare herb to cure an illness will be generated on this level. Also, taking crafts into consideration, the NPC may even ask you to help him to repair his roof, for a reward, of course. Epic quest here is to save children from a burning house.

Third level: Carry messages, social interactions, solving group level issues. Diplomacy, quests related to emotions. Epic quest here is to prevent a war between two kingdoms.

Etc.

It is important to notice that the quests you get in the MMOs today are usually of the lower levels. Because NPCs doesn’t have real lives, they don’t have higher level needs. There are some quests when the male npc is in love with the female npc, and asks you to collect a bunch of flowers that he can then give to her, but, beyond the obvious question (“Why the hell don’t you go and pick those f*cking flowers yourself, mate?”) these are also really bad examples for the quests of the third level. Maslow’s hierarchy would allow much more than that.

In the next article, I’ll take a look at the problems of numbers – the need for simulating the crowd.

Category: Hobbi  | Tags: , , ,  | Leave a Comment
szerda, október 26th, 2011 | Author:

Is it possible to create an emergent system in an MMO where the interactions and needs of the NPCs (in the form of independent AIs) can lead to quests on the epic scale?

I don’t know the answer to that question, but I have a few thoughts about this topic, which might help the reader to come to their own conclusions.

So, what I want to talk about here are the following:

I might need to slice this up a bit and write a handful of articles instead of just one, but I hope it will worth reading them.

What makes an adventure ‘Epic’

To be somewhat cheeky, let’s say that from the Lotro perspective “epic quest” means that you have to travel four times as much as with a normal quest. Jokes aside, I’d rather not use existing MMOs as role models for this. Instead, let’s find some examples in literacy.

The first one being Beowulf. He is a scandinavian hero, who fights a demon, then the demons mother to save the people of a kingdom. Later, he becomes the king, and – as an old man – sets out to fight a dragon. He slays the dragon, and gets a mortal wound. On the wikipedia it is described as “Beowulf is considered an epic poem in that the main character is a hero who travels great distances to prove his strength at impossible odds against supernatural demons and beasts.” We can now see that Turbine got it right about the travelling part, but the impossible odds part is somewhat lacking.

The second one is a fantasy story. Fantasy literacy is usually full of epic adventures and pathos, so it’s a very good starting point. In our case, the one I want to use as an example is a part of the “Nine Prices in Amber”. Sorry for the spoilers, but be assured, when reading the whole series, you will still find a lot of wonders and surprises.

So, Prince Corwin, our main character – with the help of his brother – gathers an army to conquer the castle of his father from the usurper. To get to the castle, they need to go up a stair with a thousand steps to a plateau, where every step is defended by a soldier. At this point their army is already demolished, leaving only a handful mercenaries. The two brothers and their small company begin their ascent, the mercenaries first, then Corwin’s brother. The brother then falls down from the stairs, and Corwin throws a deck of magic cards after him – which would have been his only chance of survival. Corwin alone continues the fight, and actually makes it to the plateau, where he loses the fight, and gets imprisoned. (Believe me, the original is much more enjoyable than this succinct description of the events)

Why do I consider this epic? Well, looking into it, we find common elements – impossible task, long journey – and something that is also present in Beowulf, but less apparently: a just cause. Also, in both cases, there is the notion of self sacrifice – Beowulf dies for his people, Corwin saves his brother, and because of that he gets imprisoned. On the other hand, Beowulf’s story ends well – his death is not futile, in the end he saves his people from the dragon. (Corwin’s story doesn’t end here.. but his fate gets much worse by the end of the first book.)

I was thinking about a good third example (we need three of anything, because that is the magic number) and one good example I found is the biblical story of David and Goliath. I’m pretty sure everyone is familiar with it, but still, here’s a short recap: Goliath is a giant of a man, who is challenging the army of Saul for forty days. On the fortieth day, David, a boy, goes there for some reason, hears Goliath’s challenge, and answers it. Without wearing armour, he goes out to the field, and kills the giant using a sling and a stone. No long journey this time (I knew it’s not required! :) ) but again, impossible challenge, just cause. No self sacrifice either, not more than what the task requires, actually. What is particularly interesting here, is that David didn’t win because of his supernatural skill or strength. Instead, he used his wit to meet the challenge. Outsmarting your enemy is a common motive in the epic stories, let’s just think about the challenges of Hercules, or Loki, the trickster.

So, let’s collect the list:

  • Just cause: The hero must have a motive that is not selfish, something that serves the public well-being
  • Impossible challenge: Something that is (or seems) impossible for the average woman or man.
  • Long journey: If travel itself is more than just a click of a button, a long journey can be the challenge in itself.
  • Self sacrifice: Failure often means death
  • Need of thinking: The solution might require more than physical prowess

In the context of MMOs, putting the player in mortal danger is not as serious as it is in real life – given that in most MMOs death is not much more than a temporary annoyance. One way to solve this problem is to exchange mortality with finality: the player can try to do the quest only once, and that’s it. Failing the quest is final, there is no retry. Also, physical prowess is an in-game feature, while the thinking is done by the player, sitting in front of the computer.

(Some might argue that completing an epic quest it’s only hard for the first player, then he writes everything down on the wiki, and everybody will be able to finish the quest easily after that. In our case it’s not a valid argument, because the quest is not scripted, it is emerging from the interaction of NPCs, thus it is never the same. But even in a scripted system you can say that the first one to solve this quest will get the epic reward, everyone else will get the normal reward. This is not a perfect solution, but this problem is not the one either that I want to solve.)

To put it simply, our emergent system must be able to

  • Either identify quests/tasks/jobs/adventures for which several of the above are true
  • Or specifically generate quests with the above-mentioned qualities

In the next few blog post I’ll look at the AI perspective, as well as how the epic adventure can be part of the game world. Stay tuned.

Category: Hobbi  | Tags: , ,  | Leave a Comment
hétfő, október 24th, 2011 | Author:

(2:55:33 PM) Bond: néha elképzelem, mit szólna Angelday Józsi, ha meglátná a blogom napi látogatottságát
(2:55:45 PM) Bond: szolid felröhögésre számítanék :)
(2:55:49 PM) EV: [robi] mert?
(2:56:29 PM) Bond: az egész blogomon van 401 hozzászólás.. ezt sztem ő kb. 1 nap alatt produkálja 1-1 bejegyzésével :)
(2:56:38 PM) Bond: Today: 50 hits and 18 unique.
(2:56:57 PM) EV: [robi] és abból az 50-ből 5 te vagy? :)
(2:57:13 PM) Bond: hát 5 vsz én, de kb. 30 sztem robot :)
(2:57:42 PM) Bond: hozzátéve, hogy a rendszeres olvasóim általában readerben olvassák a bejegyzéseket
(2:57:48 PM) Bond: mindkettő, ha jól tudom ;)

péntek, október 21st, 2011 | Author:

Az IT-ban elkövethető egyik legnagyobb hiba, amikor egy legacy rendszer portolásánál annak valamelyik funkcióját újratervezzük, esetleg más rendszerbe helyezzük át, és ezzel a megoldással elbukunk valamit, amit a rendszer – esetleg nem dokumentáltam – biztosított a felhasználók számára.

Vegyünk egy példát a való életből: A Google erősíti az integrációt a Reader és a Plus között, kimozgatja a redundáns szociális funkciókat a Readerből, és azt ajánlja, hogy hozzunk létre a Plus-on egy olyan kört, aminek az a neve, hogy Reader, legyenek benne ugyanazok, akik minket követnek most és amit eddig readerben megosztottunk volna, azt osszuk meg inkább oda.

Rendben, so far so good, ezzel még azt is nyerem, hogy lehet Reader Szakmai, Reader Vicces, Reader akármilyen csoportom, és nekik az adott témát osztom meg, ez fasza.

De átfogalmazom: ÉN mondom meg, hogy kinek osztok meg mit. Eddig az volt, h ha valakinek tetszett a stílusa meg a megosztásai, akkor elkezdtem követni (ilyen volt pl. Martina). Mostantól ez úgy megy, hogy elkezdhetek neki kuncsorogni, hogy “légyszi vegyél fel a megosztó körödbe”. Persze, látom, amiket megoszt publikusra, de a reader körét már nem, amig fel nem vesz oda.

A másik probléma a chaff. Egy csomó ember megoszt egy csomó szemetet. Státuszt updateelnek arról, hogy kibe szerelmesek, mit olvasnak, milyen finom volt a tea, mi az aktuális politikai állás. Ez engem nem érdekel. Én arra vagyok csak kíváncsi, hogy milyen érdekes cikkeket olvastak. Ha megtehetném, csak arra iratkoznék fel, amit a reader csoportjának osztott meg, de ezt én ugye nem tudom.

Még reménykedem benne, hogy ez valakinek a Google-nél is eszébe jutott – elég sok okos ember dolgozik ott, hátha – de kicsit félek, hogy nem.