Creating balanced in-game economies (Gamasutra)

Interesting piece:  http://www.gamasutra.com/php-bin/news_index.php?story=22002

An excerpt:

…the early days of Ultima Online were infamous for the game’s wild and chaotic economy. Zachary Booth Simpson wrote a classic analysis of UO in 1999, detailing some of the more notable problems experienced at launch:

- the crafting system encouraged massive over-production by rewarding players for each item produced
- this over-production led to hyper-inflation as NPC shopkeepers printed money on demand to buy the worthless items
- players used vendors as unlimited safety deposit boxes by setting the prices for their own goods far above market value
- item hoarding by players forced the team to abandon the closed-loop economy as the world began to empty out of goods
- player cartels (including one from a rival game company!) cornered the market on magical Reagents, preventing average users from casting spells

86 Int16, Int8; unified Logical type

While giving a presentation the other day, someone asked me why Slag had so many primitive types.  I’d never really thought about it before – I just started out with equivalents of Java’s 8 types as a baseline and added two more I was keen on (unsigned 8-bit Byte and Ternary types).

Read the rest of this entry »

How not to make a virtual machine (label-based threading)

I’m a better coder than when I woke up this morning, even if I don’t have anything substantive (like an improved virtual machine) to show for it.  For example, I now know:

  • gcc lets you get the address of a local label by saying “&&labelname”.
  • gcc lets you jump to an address (“calculated goto”) stored in a void pointer by saying “goto *ptr”.
  • gcc lets you define nested C functions.
  • Visual Studio doesn’t let you do any of these things – but you can work around that with inline assembly.

It’s all Joe Eager’s fault (I kid, I kid).  Joe mentioned something about threaded code this morning, and soon enough one thing led to another and I was making proof-of-concept virtual machines to test out threaded code with local label jumps – this in contrast to my current “one big switch” architecture and my old threaded code with function pointers.

Read the rest of this entry »

MadStone postmortem

Jacob’s MadStone postmortem report was published on Gamasutra today.  It’s a really interesting read, check it out!

http://www.gamasutra.com/view/feature/3903/postmortem_riverman_medias_.php

Slag gen2: First results

After spending months rewriting the compiler, weeks on the new virtual machine, and days debugging various low-level errors, I’ve gotten everything stable enough to compile & run my prime number speed test (and consequently a good chunk of the standard library).  The results:

Gen1 virtual machine: 25.40 seconds.

Gen2 virtual machine: 11.87 seconds.

Ergo: wooooooo!

Read the rest of this entry »