Jump to content

  • Log In with Google      Sign In   
  • Create Account

Journal of rip-off

New game project - featuring video!

Posted by , in Fencing 16 February 2011 - - - - - - · 303 views

New Project Announcement

I've been working on a fencing game for the last few months with a friend of mine. Its coming along nicely. We hope to have it finished during the summer, but we're close to having an alpha of the primary gameplay, perhaps by the end of the month.

I thought I'd get time to work on the programming language tutorial set, but my energy has gone into this and I thought better than producing some half rate work.

About the Game

My friend Sean is the lead designer (being a fencer!) and also doing almost all of the art. I'm doing most of the programming, and acting as a sub-designer of sorts. It is interesting work, particularly writing game AI which I've never done before.

The game is quite simple. It is round based, you can attack, block and sprint. You can play against a friend using an XBox controller or play against the AI. For the full game we want to make a tournament system, where you control a team of fencers who will have different statistics. Winning will be partly about pairing off your fencers against the opposing team in the correct order as overcoming the individuals in the interactive fights.

Here is a quick video I made of the current gameplay. This features a bug (which has since been fixed), where the screen declaring the winner appears instantaneously and doesn't tell you who won.


The rounds are reasonably quick, it gets tense and more fun towards the end when you have only a couple of rounds left to go! The AI can be really mean, it does this thing where he can step back one pixel away from your attack, and then step in a pixel and hit you. It is also quite non-deterministic, but we're thinking almost too much so at the moment.

We Need You!

What I'm hoping for is a few volunteers for testing the outcome of our next iteration. This will be primarily to get feedback on the gameplay, but also an initial test for deployment, performance issues on strange machines, etc. I've never deployed a C#/XNA game before so I hope it won't be particularly tricky. What would be really great is if we could get someone who has an XBox controller they can use with their PC to try out the multiplayer for us.

Let me know in the comments if you are interested.

Making a simple programming language - preramble

Posted by , in Rasp 15 January 2011 - - - - - - · 407 views
Rasp, programming language
I'm just cleaning up the code for the first article in my planned series. In particular I scrubbed C++0x from it, because not everyone will support it.


I'm debating on whether to add extensive comments. I intend for this to be aimed at people who know C++, but the question is how well. I make liberal use of the standard library data structures and algorithms. I'm planning on keeping it a mid to high level discussion of the various problems and my solutions to them. I do plan to discuss the implementation itself but not in exhaustive detail.

Publishing Schedule

I think it will be worth taking some time to write up this base code, as it presents the foundation of the rest of the series. It is simple enough. For the moment, I support number literals and functions defined in C++. There are a small set of functions predefined, including the basic math operators and a print and println function. A function can be passed to another, but this isn't particularly useful yet. It does allow one to implement a library function like std::accumulate(), where the operation to be run is specified as part of the data. I'll probably have to split the initial implementation into three or so articles to keep them short and readable.

Implementation Stuff

So far I've implemented a simple value based system, everything is passed and returned by value. Functions are hard coded at compile time. This means that multiple invocations of a function will incur copies. This is fine at the moment as a function is just a string and a function pointer, but when I move to support user defined functions I don't want to be needlessly be copying them around.

The current implementation merely starts a REPL interpreter. There is no support as yet for loading from a file or any command line parameters at all.

Show me the Code!

The code is available on github: https://github.com/rip-off/rasp-lang. I haven't put in a build system or committed the Visual Studio project files as yet. I'm testing it on Linux too, so I'm not sure how I'm going to do that just yet.


Proto article series on creating a programming language - Roadmap

Posted by , in Rasp 13 January 2011 - - - - - - · 652 views
Rasp, programming language
There has been a lot of interest on the forums about creating custom programming languages. Since I have done this, I was thinking of doing a semi-retrospective, semi-rewrite to illustrate how to build a working programming language interpreter. I was considering doing this for quite some time, but I didn't quite have the motivation to do so.


I'm going to start with a basic Lisp syntax, using a hand rolled parser. Integrating a proper parser is a hurdle that I don't want to place too early in the process. I do plan to do it eventually so I can use a nice custom syntax. Most of my initial effort will be concentrated on getting the interpreter up to scratch. Its working title is "Rasp", which is an ugly mix of my user name and "Lisp".

Type System

I haven't tied down all the details yet, but I'm aiming for a semi-dynamic language, with optional explicit but otherwise inferred strong typing. That is, a function can be written without mentioning types. If a variable are used in a context where the type is known (e.g. passed to a library function or explicitly typed) then the type will be inferred and an error occurs trying to invoke the function with an incorrect type. Types will be be inferred recursively, so a generic function calling a second generic function which calls a typed function will have the types propagated all the way back. In certain circumstances, I expect the type will not be deducible. For the moment, I'm going to do something similar to "autoboxing" where in such cases the program will generate type errors at runtime rather than compile time. A variable would be strongly typed, once given a type (explicitly via declaration or implicitly through first assignment) it would not be legal to assign it to an unrelated type.

Some or all of these ideas might be compromised if they end up contradicting each other, or if they overly complicate implementation or finally if they just aren't nice to use. In any case, almost none of them will be present early on. Hopefully it won't be too difficult to add them later.

Advanced Topics

Some of the more advanced things I'm interested in investigating are automatic type decomposition to enable "data oriented programming" without imposing a large burden on the programmer, or possibly an explicit way of separating the physical arrangement of the data from the logic arrangement, to put the programmer in charge of their data layout. Other ideas include a hybrid approach to memory, using RAII where possible and garbage collection only where cycles can occur. I think the type system I'm considering might cause the compiler to be unable to infer a useful type, it would end up inferring something like "Object" in managed languages, though I'd prefer to omit such an arbitrary base class from the language if possible. To achieve this I may be forced to use explicit types when defining data types. I'll need to investigate.

I'd also like a language that helps programmers with multi-threaded code, or at least doesn't hinder them in quite the same way that other languages do. The plans I have for this are more nebulous at the moment, we'll see how it goes. Maybe something like language support for transactions, which can be rolled back and made a critical section.

I'm also thinking about an alternative to exceptions and error codes, or possibly merging them together - for example: checked return codes, the compiler will reject code that does not test the return value of marked functions. Investigate some kind of language support to ease the burden of passing error codes through a function call hierarchy, which might be aided by the inference engine I'm including. We'll see.

Long term goals include optimising the implementation to the point that people might want to actually use it, and eventually JIT compilation using LLVM. I would consider targeting a prewritten VM but it don't think it will allow me to get to some of the juicier advanced topics.

Coming soon

But the first few iterations will be very simple. I threw together an interpreter yesterday using my old "Lisp" project as a base. It lacks a parser. I'll get something simple working for the weekend, during which I hope to publish (or at least write) my first "article". I am currently testing it by building a raw instruction list and executing it. The first iteration will support integer literals and calling arbitrary C++ functions, hopefully even in a nested manner.

I started from scratch, not because I want to but because that is the best way to demonstrate the iterative process over the series of articles. Even stripped down to quite basic functionality, the base code is not small. I believe it is about the smallest useful size that will give me a good bit to talk about without being overwhelming. Hopefully it will be about the size that my intended audience can manage.

I know I can get it to the point where my last Lisp language was, which was reasonably powerful but with glaring omissions, notably user defined types. I should be able to get a few articles out until that point, then I can start braching into some of the topics I mentioned above.


The main complication is that my time is divided because I'm working on a game with a friend at the moment. We're getting close to a potential test of a gameplay mockup, we're aiming to have the program ready by the end of January and possibly conduct some tests in the months following.

Stay tuned,
-- rip-off

New game idea

Posted by , 15 September 2010 - - - - - - · 395 views

I've had an idea brewing for some time for a new game. It is roughly like Civilisation, but more abstract, hopefully simpler and with a few ideas of my own I'd like to try out. I'm aiming for a proof of concept at the moment. So I'm not going to worry too much about the non-military aspects of such games. Diplomacy, economies and other such mechanics will come later, if necessary.

The basic idea is a space conquest game. This has definitely been done before. You have planetary systems you can conquer, and you build fleets using them and conquer more. There will be a simple galaxy generator that might populate 50-200 planetary systems (depending on the scale you might choose).

The abstractions are just removing lots of special cases. In most similar games I've played, you can build a wide variety of units (often accompanied by a varied research tree). I intend to replace this with a simple power/disposition system. Basically, variable statistics. So a particular fleet might have an offensive or defensive disposition, or neutral. It might have a fast or slow disposition, or a heavy/light one. Some statistics might be naturally exclusive, for example I might disallow fast/heavy dispositions. The power is basically a combination of the size, disposition and relative technology levels.

It will be turn-based, but each turn will be divided into two phases, decision and simulation. Orders are given during the decision phase. The combat is resolved in the simulation phase. I also intend combat to be a multi-turn process. Planets are captured by laying seige to them for a number of turns. Two armies facing each other will do damage based on their dispositions, only if at least one is in the aggressive disposition will notable combat take place. Two fleets both engaged in an offensive stance should be resolved fairly quickly, with victory mostly based on the power difference between the fleets. If one army is neutral and another is aggressive, the neutral fleet might fall back rather than take excessive damage in a single turn.

The inspiration for some of the interesting ideas come from recently reading The Forever War. I really liked his description of the implications of relativity on interstellar combat. One simple example is that the human space craft travel to the enemy space that a long time has passed for the aliens. This means that the humans are facing technology which literally didn't exist when they set out. I don't believe I can replicate the ideas in the book exactly, but I can offer mechanics which have similar effects.

It will obviously be necessary for fleets to travel faster than light. My ideas are still forming, but one is to drop the relative technology levels of fast moving fleets (in the absence of logistical support perhaps). Another might be to allow the enemy players see the fast-moving fleets from further off. This is obviously artificial - the speed of light forbids this, but this is a game! The point is to design a mechanic

Another idea is to make the galaxy change over time. So the planetary systems will rotate around the centre of the galaxy, but also around each other. This is partly the reason for a separate simulation phase. While individual star systems might have little effect on one another, galactic features like black holes and globular clusters might have noticeable local effects (which I will probably exaggerate for effect). I might simplify the gravitational interactions by grouping areas that are close together. Getting this to work will be the main technical challenge I believe. I will probably have to simulate thousands of non-populated star systems to give the system some stability. I would have to at least draw them anyway to create a nice background effect to give the impression of a galaxy. I'll have to generate stable galaxies, where very few collisions will occur over the lifetime of the game. In particular, care must be taken to avoid the entire galaxy collapsing toward a single point. If it is infeasible to simulate gravity, I might just go for a very simplified system where the different star systems rotate around the centre of the galaxy at a fixed rate. But because different star systems rotate at different speeds, the same dynamic galaxy will be created.

My experience with the critter game taught me that I've a lot to learn about game design. This will be a huge test for me. I don't know if I can make a good strategy game in a ever-changing world. It sounds like an interesting idea, so I am eager to try it out and see if it is any fun. It sounds like a bit of a nightmare though, you have to plan X turns down the line when your planets and ships are all in constant motion. Add to this the various real and theoretical/imaginary interstellar features that can be included, the aforementioned black holes and globular clusters, but maybe supernova, wormholes, nebula. I will include anything that has a bit of character, and can act as strategic key points. I'm not too concerned about realism, I will scale any feature to fit the game, even if it doesn't really make sense. I might even include new ones, such as massive objects which have an inverse effect to gravity. These might be pre-populated features or might be created by the users, I'm not sure yet.

I don't look forward to writing AI for such a system though! I expect it will be hard enough for a human to meaningfully plan ahead in such an dynamic environment. The interface will present a challenge. For example, if you order a fleet to move to a point that will take 10 turns, should that point be relative or absolute? Did the player want the fleet just to approach the galactic core, or did they intend that it end up close to a particular resource of interest. The strategic value of certain areas will change over time as they move. A once important planet might end up moving to the wrong position and become isolated and useless. This could feed into the economic system in the long term, if I take it that far.

I've only barely begun work on this project. The working title is "Conq". This post is intended as a roadmap for future development. At the moment it is a top-down 2D game, but when I look at video's like the Infinity Game Engine by Ysaneya (included below), I keep thinking how cool it would be to do this in 3D. Imagine a fleet surprise attacking - from perpendicular to the galactic plane!

Infinity Video

UFEC pre-results

Posted by , 27 April 2010 - - - - - - · 335 views

The deadline for UFEC feedback is tomorrow. Hopefully that means the results will be available shortly, perhaps before the end of the month depending on how busy Lesan is.

Giving feedback on other peoples games is hard. Being game developers, we all know the trials involved, the hacks, the programmer art, the frantic cutting for impending deadlines that seem to come at just the wrong time in your work and/or personal life.

Overall, I think I was reasonably fair (but then again I would, wouldn't I?). All the games had positive sides,

I think that fang's Lord of the Elementals was the best of the bunch. A good and original idea, tied in well with the theme and polished too. The only complaint would be that the AI is too simple, once you understand the game it is too easy to win. Some proper AI, or a network play mode, would add some much-needed challenge.

I believe ne0_kamen's Forest Defense was the next best. Tower defense isn't too original, but I really liked the sound of the ideas in his thread, they seemed to play off the elements very well. However, the delivered version didn't quite live up to some of the more interesting ideas (a pain I know all too well), but the gameplay is solid enough. The main weakness is the variety, which is apparently been tweaked in his latest version.

Erik Rufelt's Origin of Aliens is a fun game, but a bit too unfinished, with some difficulty issues (which may be as per design) and some stability ones (which probably aren't part of the design). The elements were weaker than the other games, I thought.

I had high hopes for XDigital's Cycle, I even helped produce a Windows executable, but unfortunatly I found the game unplayable. This might have been a bug in the Windows port, but the game doesn't provide enough feedback to enable strategy, I ended up just clicking randomly because I couldn't tell the state of the board. I imagine it is similar to being taught to play blindfold chess, without first knowing the rules of chess. The game certainly looks like it had a lot of work put into it, so I would like to play an improved version if it becomes available. If the quality of the loading screen and menu art is anything to go by, there could be a good game there.

As for my own game, I don't know what to think. The elements came out a lot worse than I hoped. The polish just isn't there. The gameplay was still in flux, and its actually quite a messy game to play, too easy with spikes of insane difficulty. The graphics were ok, but inconsistent. The sounds might be the strongest part, given that no other games included them!

I hope to get some interesting feedback. I'm a solid programmer, but I don't have much experience in game design, and it definitely showed. The opinions of others could be vital for my next project.

I have some similar sized projects in my mind, but I think I might let them ferment some more. I might do some rapid prototyping of small games for my next project or two.

October 2016 »

2324252627 28 29