Showing posts with label gamedesign. Show all posts
Showing posts with label gamedesign. Show all posts

Monday, November 26, 2012

Axonometric Graphics and Status Effects Redesign

After a lot of thought, I have decided that using actors is a better approach to persistent status effects than sticking modifiers onto an actor's statistics and removing them with events in an event queue.

This way one can have complicated effects that change with time, effects that only occur at certain places or under certain circumstances, effects can be the targets of spells and abilities, and it is much easier to add visuals to applied effects.  I feel certain I will find many more uses for this.

I have also grudgingly accepted that my game-play ideas require that the game is three-dimensional, so this weekend I added a third dimension to the map and to the base class for physical actors.  I have decided that "proper" 3-D graphics is still not an option, so I am implementing an axonometric graphics renderer.

Isometric graphics makes use of an isometric projection, which is a special case of an axonometric projection.  In an isometric projection, each three-dimensional axis is assigned a direction on the plane of the two-dimensional projection, the three directions are 120 degrees apart, and the scale of the axes are the same.  This gives a view without perspective, as if the world is seen using only parallel rays, and these rays are all parallel to the vector (1, 1, 1).

In an axonometric projection, the view still has no perspective, but the rays are no longer parallel to (1, 1, 1), but rather to a vector of my choosing.  So the axes' directions are no longer separated by 120 degrees, and are no longer at the same scale.  Calculating the new angles and scales from the rays' direction vector would be a chore, but fortunately one does not need to do that.  As most things in graphics go, getting it to look right is much more practical than making it be right.  Since the axonometric tiles will be drawn by hand and the computer will only assemble them accurate to within a pixel, it is sufficient to draw a cube by hand and use its measurements as the basis for all the rest of the tiles.


Friday, November 16, 2012

Gaming the Meta-game

An enjoyable article examining how game designers can affect the meta-game:

When Players Make The Rules: On Memes and the Meta-Game

Of course, a player could possibly also make use of this phenomenon, and game the meta-game as such.

Monday, November 5, 2012

A Framework for Special Abilities

I have been working on the framework that will handle the characters' special abilities in my as-yet-unnamed RPG.  Special abilities include skills and spells, as well as the effects of equipment and consumable items.

The main idea is that an ability is triggered and has certain effects, some of which are instant and some of which are delayed.  For instance, if there was a spell called 'Frog', it would be triggered when the character casts the spell. The effect would be to apply a frog transformation on the target, and to put a 'cancel transformation' event in the event queue, to be applied when the spell would wear off.

Some typical trigger use-cases that I considered were:

  • An active ability registers its trigger object(s) with a player or AI, indicating that it needs to be activated when the controller sees fit.
  • A semi-passive ability registers itself with its character object, giving a trigger object that specifies when it should activate.
  • A passive ability triggers when the ability is gained.

It looks like all abilities can be handled with triggers and effects, but during transformations, possessions and body swaps there will need to be special handling of non-instant and delayed-effect abilities.  Maybe the event queue is not the best way to handle long-term effects.

Back to the drawing board!

Wednesday, October 31, 2012

Useful links and a new perspective

I spent the last year programming lots of stuff, but with very little worth showing:

I got myself up to date with OpenGL 4.
I tried to learn OpenCL.  Will have to try again, though.
I wrote a terrain mesh simplifier, based on ideas from Shamus Young's Terrain Project.
I wrote an emulator for the DCPU-16 from Notch's new game 0x10c.
I designed ROBOL, a new programming language specialized for game AI and robotics.
I worked on a graphics engine based on dual-contouring of voxel data, deferred convex polyhedron volumetric lighting and portals, with gamma-correction, pre-multiplied alpha and dithering.
I wrote a buggy AI for a Tron lightcycles-like game as part of the Entelect R100000 challenge.

The graphics engine would be worth showing, except that I'm trying to implement it in OpenCL, and have thus far failed to really get it started.  Maybe I should try it in pure Java first...  modify the Cyclopean engine...

Meanwhile, I've decided to get away from 3-D graphics for a bit, and get back to simple 2-D sprites.  It's amazing what you can do with 2-D if you're artistic.  And the quality of my recent paintings do imply that I am sufficiently artistic.

Yesterday I had an idea for a project that would be simple enough to produce rapid progress:  A 2-D real-time RPG with a significant amount of modularity.  The modularity is needed so that I can start with a bare-bones game (i.e. rapid visible progress) and then add more ideas with time, until it has enough features.

Overall, I intend to update this blog every Sunday from now on.  I will mostly post about my new RPG: showing off screenshots, explaining design choices, hyping the innovative ideas, etcetera.  When I don't have time to work on the RPG, I will go more in-depth and technical on things that I did in my previous projects.

Hopefully, my new articles will teach others useful new tricks and give them understanding of some interesting algorithms.

Friday, January 7, 2011

Fun System


During the Christmas season, I have finally gotten around to doing some top-down design for Galactic Throne. I have gotten a good overview of how to make the combat, science and espionage into fun activities, but I still need to do more work on exploration and economics.

I have started developing again, hoping to focus on getting moving fleets and working planets in, but that has to wait until those last two parts of the top-down design are done.

So, I am experimenting with the map generator a bit. I have managed to make it arrange the stars such that the names no longer overlap the other stars or their names. In the process of testing it, I discovered the Fun system (pictured.) Clearly the name was generated by the random generator.

Hopefully with some more design I can make the game as fun as that solar system. :^)

Thursday, March 25, 2010

Creating a galaxy

I am working on a new map generator, and would like to hear any ideas that you might have. (Just post them in the comments.)


The goals:

  • Where you start should influence your strategy.
  • Map features should cause interesting strategic situations.
  • The map should be visually interesting.


The tools:

  • Objects in space (e.g. stars, derelicts)
  • ‘Terrain’ types (e.g. nebulae)


Current ideas:

  • Younger stars near the centre, older stars on the rim.
  • At least three types of nebulae: dark, reflective and luminescent.
  • Stars inside or beyond dark or reflective nebulae are invisible over long range.
  • The galaxy has a number of arms depending on its size.
  • The gaps between the arms are large enough to be hard to cross.
  • Nebulae cover the core and the gaps between the arms.
  • There are cracks in the arms, creating choke points.
  • Wormholes occur, as shortcuts and choke points.
  • There are different kinds of ancient alien remains:
    • Ancient Wreck – Free tech
    • Ancient Ship – Free ship which can be scrapped for tech
    • Ancient Ruin – (Guarded?) A planet with a significant research bonus
    • Ghost Colony – (Guarded) Free colony with infrastructure and artefacts
    • Ancient Factory – (Guarded) Free factory space station
    • Ancient Refuge – (Guarded!) A planet inhabited by an ancient race
  • If I add ‘exotics’ as a resource type, the sources will be black holes, cosmic strings, etc.


Depending on how the ‘huge galaxy’ idea goes, I might even add the option to have multiple smaller galaxies instead.


Eventually, there will also be technologies to allow civilizations to modify the galaxy in various ways.

Wednesday, March 10, 2010

Countless millions of stars

I have been thinking of the problems with the 'huge galaxy' idea. To make this work, I decided it would be necessary for the game to support thousands or even a million stars. Of course most computers these days will not handle the amount of AI in such a galaxy well, but it could still be useful for an MMO version, or at least to future-proof the game.

My star name generator could previously only generate about 6000 names before reporting errors, if I recall correctly. This is a problem when there are a million stars.

The new generator can generate three kinds of names.

For the first ten attempts, it chooses randomly between a name sounding like a Bayer designation (e.g. Alpha Centauri) or a traditional name (e.g. Rigel). The Bayer-like name is created by choosing from a list of prefixes and of suffixes and combining the two (13200 possible combinations), while the traditional names are just chosen randomly from a list of 352.

If it does not find an unused name in these first ten attempts, it generates a random name that sounds like a traditional name.

Examples of Bayer-like names:
Octa Aurigae
Zeta Crucis
Aleph Polli
Wau Lacertae
San Cancri
Rubix Vidi
Nona Jordani
Octa Velorum
Omicron Boötis
Rosa Lupi
Chi Sagittarii
Heta Sceptra
Orochi Cygni
Trio Hippopotami
Kappa Gruis
Blu Indi
Ichi Sculptoris
Aleph Roburem

Examples of traditional names:
Kuma
Pherkad
Acrux
Algol
Aldebaran
Regulus
Nash
Deneb

Examples of random names:
Arkad
Polava
Menchirdun
Kajam
Lucidus
Kochamali
Alfim
Rukhr
Sadfar
Birhanab
Mekbuda
Rukhl
Praecipua
Situla
Gieba
Braqu
Alnash
Birdun
Arneb

Monday, March 1, 2010

Galactic Throne

Last year some time I started work on a turn-based space strategy game with tactical battles, a là Master of Orion. There are several reasons why I should work on Galactic Throne, rather than on Nation Builder (working title):
  • Less graphics programming means more game programming.
  • It can already scroll, zoom and detect what I click on.
  • It is much less ambitious.
  • I am more certain on what I want to achieve with it.
Talking about what I am trying to achieve, here are my goals so far:
  • It should feel real. The planets and the galaxy should feel alive. I believe that this can be achieved by giving the people in the game a will of their own, and giving them a world to interact with.
  • It should feel big. In a real galaxy there are billions of stars with billions of planets and it is billions of years old. While my game will not be that big, it should feel like it. To achieve this, I will either make the map really big, or create events and/or game play that relate the map to the rest of the galaxy. To make it feel ancient, there will be remains of ancient (but not necessarily dead) civilizations and the after-effects of long gone cataclysms.
  • It should add a bit to standard 4X game play, maybe even add another X. Usually in this type of game you are either a powerful all-conquering emperor, or a member of an alliance fighting against such empires. However you unite the galaxy, you win. I will add a third way to play; spies everywhere manipulating politics and economies, even the planets that you rule will not know that you do. An important upgrade to the game play, which will make this possible, is the separation of government and people. This also ties in with giving people a mind of their own.