Gruugruuu (dorf) 2008.Nov.10

Five weeks overdue… If it wasn’t for Grue’s constant nagging, I probably wouldn’t be here now.

Just now I noticed that I did enough work to post all this time, but didn’t bother to.

It’s late, so I’ll make it fast and boring

What’s up, doc?

- Now with nice and working splash screen (the logo at the top of this page) and main menu

Aftershave r66: Main menu

Aftershave r66: Main menu

-Rewritten the font system, now uses BMFont files, now is easier to use and a lot more powerful.

- Implemented the base for a debug console. For now, just a text writer, this is a screenshot with some data pulled out of nowhere

Aftershave r66: Console mock

Aftershave r66: Console mock

- Added joystick support

- There are a couple of transition effects… But they should be implemented in a better way, for now the are copied inside the states that use them.

On other news

I resumed the work on MapedPrime after a long recess.

  • Started reordering code, separating roles. My first objective is to allow multiple document editing
  • Removed (I hope that for the last time) the dependance on Zlib.net (I wrote a wrapper for using the real Zlib)
  • Reimplemented the flood fill (I have to test it and merge it back into the trunk)

The future plans are:

  • x86/x64/PowerPC Linux/Unix/MacOSX compatibility (the main reason of Prime)
  • Multiple map editing
  • Plugin based codecs
  • Intellingent image importing (like psd2map)
  • Complete UI overhaul

So, comments, ideas, anything is welcome. And, probably this week I’m back in #sancho to waste my time

Just a little idea sharing. For a little Verge-related experiment I’ve been doing (and losing due to crashes) this last couple of days, I decided I needed to implement a state machine validating system.
Well… Tada!! Somehow ready, in C# (I just need to add a delegate to do something when entering the state, but that’s a kinda special case.

And with C# 3.0 lambda expressions, this should be a to use. So, this should also work quite easily in Python, now that I think of it.

    //A nice state machine generic validator in C#
     public class State<T>
    {
        protected LinkedList<KeyValuePair<Predicate<T>, State<T>>> transitions { get; set; }
 
        public State()
        {
            this.transitions = new LinkedList<KeyValuePair<Predicate<T>, State<T>>>();
        }
 
        protected virtual State<T> GetTransition(T t)
        {
            foreach (KeyValuePair<Predicate<T>, State<T>> trans in transitions)
            {
                if (trans.Key(t))
                    return trans.Value;
            }
 
            return null;
 
        }
 
        public virtual void AddTransition(Predicate<T> condition, State<T> state)
        {
            transitions.AddLast(new KeyValuePair<Predicate<T>, State<T>>(condition, state));
        }
 
        public bool Process(IEnumerator<T> it)
        {
            State<T> current = this;
            while (it.MoveNext())
            {
                current = current.GetTransition(it.Current);
                if (current is FinalState<T>)
                    return true;                
            }
 
            return false;
        }
    }
 
    public sealed class FinalState<T> : State<T>
    {
        public FinalState()
        {
            this.transitions = null;
        }
 
        public override void AddTransition(Predicate<T> cond, State<T> s)
        {
            throw new NotSupportedException("A final state cannot have transitions");
        }
 
        protected override State<T> GetTransition(T t)
        {
            throw new NotSupportedException("A final state cannot have transitions");
        }
 
    }
Necromancy 2008.Sep.23

I halted the project for a while, you know? Kinda temporal thing, between a breakup, a lot of study and other things. And also, I discovered I was stumbling here and there with the game, and advanced some little things in the engine, but without a solid idea of the game. This week I started to draft the script for Aftershave, and from that, was born the idea for the intro.

Aftershave: Intro teaser

Aftershave: Intro teaser

In a style that probably many of you will find familiar, a little teaser of the intro. Actually this is a half-mockup, the art corresponds to one of the screens, but it isn’t running in the engine yet. Someday later this week I’ll try to post some more screens, and maybe some fancy on-engine intro sequence.

From now on, I declare this day the I Failed Because I Did Not Update day!

I’ll just tease you with some old art, that may or may not be used for the game.
(more…)

A couple of weeks ago (little after my last update) I started to get sick of working on this engine. The whole coupling-but-abstract things was making the design of the game a lot like most Java or C# thing: over abstracted, unnecessarily complex, and too object oriented (because, yes, there is such things as over-engineering). I was getting caught in trying to develop a jack of all trades engine, and not focusing at all on making games, which is the fun part. So the first thing to do was to join both codebases into one project, sticking with Tao.SDL, because I was using SdlDotNet without getting advantage of any of the extra features.

And some little bugs were cleaned up: it was looking blurry, because the view was 1px smaller on each side than it should.

aftershave 

Text with glory

The text rendering engine if finally well written. Now it supports both ASCII and table base character codes, variable and fixed width fonts. The data is a pair of a texture that contains all characters, and a file containing the data in JSON. (Maybe this  could be replaced by Mungo files…)

Just press Tab on any moment to see the debugging text at action.

 

Note we changed the server address:

Builds: svn://belcrant.endofinternet.net/aftershave/aftershave/builds
Code: svn://belcrant.endofinternet.net/aftershave/aftershave/trunk

(user: anonymous / pass: anonymous)