Sonntag, 23. März 2008

The weekly TPS report!

I hoped to be able to release a technology demo this weekend, but even after using most of my free time to code this didn't quite turn out to be feasable. Sadly I won't be able to present any new screenshots, as the visual appearance hasn't changed a lot in last days despite reaching revisions numbers in the seventies ;-).

Anyway here's the feature list that needs to be implemented before releasing that 0.1.
  • Core Functionality: Gui Library (75% done)
  • Core Functionality: Scripting (95% done, just needs some testing.)
  • Gameplay: Running around the map, shoot at stuff (50% done)
  • Gameplay: Fly around the planet (0% done)
Doesn't look to bad. But porting Guichan took too much time and kicking the code into something worth an dsource entry would take even more time. So I'm ditching that idea.

Dienstag, 18. März 2008

Yet another GUI lib.

It took me an quite some time, but I got Guichan ported to D - at least it compiles - which doesn't mean that the port is somewhere finished ... But the tedious work is done.

In order to motivate myself (a bit) I tracked the number compilation errors during my iterative adaption.

Hopefully soon the gui system will be up and running so that I can finally start to implement game logic.

Samstag, 15. März 2008


I have chosen a scripting language for my game, and after having brief uninformed looks at MiniD, PyD and DLisp - I choose the most obscure, least maintained of the bunch - DLisp.

What is it?

It's a minimal Lisp implementation in D, taking full use of the builtin garbage collector of D. Sadly the author kind of faded away, I just hope he is healthy and alive. So for now I forked the codebase and will try to maintain and extend it. After some fiddling around unittests run again - but the test suite is fairly limited.

Since I want to use it as a scripting language for an object oriented game written in D, I decided to add builtin object orientation since I hope this will ease the exposition of game objects.

Edit: Why DLisp over the others?
So why did I choose the least maintained and complete scripting language available? Basically two reasons - First I started this Project to learn new stuff - and Python I use regularly, the languages inspired by D or simply Lua don't offer something new. So choosing a Lisp version and a tiny one offers the opportunity to learn something completely new. Second I needed a data description language - I know that lua and python can be used like that (though using Python using as a DSL feels like an abuse.) - but the others didn't struck me as such.

A third reason I might add, is that having intimate knowledge over the script languages
implementation enables me to fix bugs and odd behaviour right away.


DLisp is fairly usable already, although the OOP code and syntax is still under heavy development.

Syntax snippets
;; Level Data
;; Mar. 2008
(setf *level*
(make-instance level-class "My Test Level"))

(defun place-tile (x y name)
"place a tile at x,y created from tile-prototype name"
(call-method *level* place-tile
(x y (make-instance (get-attr *dataset* name)))))

(map place-tile
((5 5 "red")
(5 5 "red")))

;; Method calling syntax?

;; Explicit - Works but ugly syntax
(call-method object 'method-name args)

;; Implicit
;; Problem is that we need 1 lookahead
;; and one cannot override macros.
(method-name object args)

;; Special syntax
;; Looks a bit unlispy - and overriding functions
;; would still need the implicit syntax ...
(object:method-name args)

Binding snippets
  class MyClass {

// Some constructors.
this() ...
this(string name) ...

// Some methods
void methodName(int arg1, int arg2) ...
string returnsString() ...


// Generate the core binding
mixin BindClass!("MYCLASS");

// Default constructor is autogenerated
mixin BindConstructor!(string);

// Bind the methods.
mixin BindMethods!(methodName,returnsString);

Mittwoch, 12. März 2008

Game Design Document I

The goals of iteration-zero are to create an role playing game with a simple interface and gameplay in a closed world.

You are playing a space marine, cyber assassing or something like that who lands on a new planet and has to fullfill a mission. You are supplied with a glider, an aircraft enabling you to travel accross the planet to different locations of interest. Accompanying you is robot with an A.I. and up to 6 other compagnions you can invite into your traveling party. Your party will earn experience and find new technology through overcoming enemies and fullfilling missions given by locals.

There will be two major game modes. With your glider you can travel over the planet and visit known places or try to find hidden areas. You will be able to land nearly everywhere, but most landing areas will be devoid of anything of interest.

You will have to refill your fuel supply and make sure your glider can carry all your equipment. Upgrades to the glider can be bought at several locations.

So the exploratory radius is constrained by the fuel supply and the player has to make a choice between different equipment available. The random levels at each possible landing location give the planet a feeling of space, while not interfering with smooth gameplay. Hidden areas can be revealed simply by riddles giving out coordinates upon solution.

You will explore alien ruins, infiltrate military outposts and hunt down delinquents. Hostile encounters have to be resolved by tactical skill and using your resources wisely. Upgrading your bodies and minds with the technology of the future might help you to survive the more dangerous missions.

Basically combat will be turn based, starting after an enemy has been encountered. As with other RPGs your party members levels and your equipment will determine the outcome of attacks. The RPG system will be designed in more detail later on.

Dienstag, 11. März 2008

SDL_ClearError WTF?

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210607424 (LWP 22207)]
0x082917ec in SDL_ClearError ()
(gdb) quit

If using Derelict with rebuild ever gives you spurious errors
in the SDL init code ... here's the solution.


From the man page:
Pass the flag -export-dynamic to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. This option is needed for some uses of dlopen or to allow obtaining backtraces from within a program.

Seems like a classic trivial but hard to debug problem :)

Also btw. I have set up an svn repository for the project.

EHLO World

So ... this is supposed to be my hello world post on the blogspot.
Why another blog? Well, since I started programing for profit my personal pet projects got lost in the noise - so I took a break from business coding and revived an old idea of mine, and decided to start a blog while I'm at it on a whim.

Idea: Lets write a small and simple CRPG in the spirit of Helherron, IVAN and rogue likes in general. I have played some rogue-likes and Diablo (I and II) of course, and what always annoyed me is how difficult it is to get going in those games and how antiquated the user interface is. So my contribution to the opensource gaming world might be this project.

  • Graphic Display
  • Click and Play Interface
  • Simple Gameplay

... and so I got started.

I decided to use OpenGL as getting OK artwork is simpler for a 3D game. This sadly rules out using F.I.F.E - but opens up the opportunity to play around with different approaches to programming.

Since I always wanted to check out the D Language after my experiences with C++ and Python - and it's really nice to get something going.

And of course here's a screenshot of a pre 0.1 version of the game.
As you can see a simple testing level is loaded, some md2 models stand around and picking with the mouse already works. The ugly gui uses just another unmaintained project from dsource.