From the Burrow

Android and Open Source

2012-08-23 22:05:00 +0000

I had an annoying realisation the other day that, while my computers run almost entirely libre software, the majority of the apps on my phone were not open at all.

Given the awesome fact that a huge percentage of mobile devices are now running an open source OS the fact that the apps aren’t is a bloody joke.

Luckily some great people have put together an ‘App Store’ which only contains libre software, its called (FDroid)[http://f-droid.org/]

There are some great wee apps and as the apps are made to be free there are no adverts either.

Enjoy!

Time to Grind

2012-08-17 11:20:39 +0000

Missed a day of posting here again but progress is being made.

I seem to be falling into nice rhythm with developing cepl. First I work through some tutorial to add functionality to cepl, then I spend a few days trying to find abstractions for what I’ve just done.

Right now I’m in the later of those two. I’m getting annoyed with having to remember what type of vector I am using when I run vector functions against it so I’m currently working on generic function which take care of calling the correct function for me so I don’t have to think about it. I’ve also got tired of writing:

(make-vector3 1.0 2.0 3.0)

..every time I need a new vector and having to make sure the numbers are floats. To that end I have made a macro v! so that

(v! 1 2 3)

..works exactly the same and the long version except for also handling type conversions.

Just me and my Monkey

2012-08-15 00:00:00 +0000

It works! Turns out it wa a very simple fix as the .obj files start counting from 1 wheras I expected counting from 0. One quick tweak later and we have this:

Love it!

Animated Sorting Algorithms

2012-08-15 00:00:00 +0000

Sorting algorithms..there’s a whole bundle of them each with advantages and disadvantages over the others. If you want to understand some of these method and have a fairly visual mind this site will probably be right up your alley.

Use that site and play around with different initial conditions and see which method works best. This can really be helpful along some terser text as a way of seeing what the author is on about.

I’m on call this week for work so I best go try grab some shuteye before someone calls.

Ciao

Slowly Slowly Glitchy Monkey

2012-08-13 00:00:00 +0000

Well I have tried loading an .obj model in cepl for the first time…and well have a look..

Not so good!..Its meant to look more like the grey version on the lower right. Seems like I’ve still got some issues with indexing or something, but at least its getting vaguely recognisable!

More to come.

SSH Taking ages to connect?

2012-08-12 00:00:00 +0000

I had an interesting little issue the other day where connecting to some servers was taking aroudn 15 seconds before showing a login prompt. Everything after that was speedy so I knew it wasnt going to be a connection time issue.

I ran the following to get verbose connection info: ssh -v servername

and saw this error: debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug1: Next authentication method: gssapi-with-mic debug1: An invalid name was supplied Cannot determine realm for numeric host address

It turns out that ssh is trying to use Kerberos (GSS-API). To turn this off we can simply edit our ssh config file.

# open up ~/.ssh/config # add the following line GSSAPIAuthentication no

And that fixes it!

Python and Emacs

2012-08-12 00:00:00 +0000

When I first started getting into using Emacs for all my editing I had major problems trying to get a decent Python setup working. I spent hours messing around on line getting nothing but a headache, it almost made me drop Emacs entirely. However after finding a couple of clearer tutorials I was able to bodge something together, but if I’m honest Its never felt good enough. Luckily it seems that some lovely soul has put together this!

In the author’s words, the goal is “collecting and customising the perfect environment for python development, using the most beautiful emacs customisation to obtain a really modern and exciting (yet stable) way to edit text files.”

Next time I do some Python hacking (i.e. when I can tear myself away from Lisp!) I’ll try this out and let you know how it went.

Hopefully this can help some other Python loving Emacs noobs get started with a really slick python environment.


In other news I’ve written a .obj file parser so I can read some 3D models into cepl (my lisp opengl experiment). I should have something to show you by the end of this week.

Goodnight!

Entity Systems in Games

2012-08-11 00:00:00 +0000

As I have been making good headway on studying OpenGL I have been starting to have a look into more of the things I will need to make real games using my tools.

One of the obvious first steps is working out how I will manage all the different types of ‘things’ (lights, boxes, triggers, explosions, hats..and err..BIG HATS) in the games and also how to defining and extending their functionality as easy and powerful as possible.

It doesnt take much googling to see that object-orientated programming is not actually the way to go. This seems strange at first as OO can seem a natural fit for defining types of object. I mean you can have something like this:

character
  |
  |__human
  |   |___soldier
  |   |___civilian
  |
  |__alien
       |____alien queen
       |____alien soldier

But it turns out that in real life, things change (who knew?!) and, as new type of object are need in the game, functionality that use to be specific to one class of game object has to be moved up the tree.

For example, lets look at out pretend object hierarchy above. When the game designers first added the ‘alien solider’ they wanted to let it be able to call re-enforcements, this is fine but the ‘human->solider” also has this functionality. As good coders we want to reduce code duplication but where do we put the ‘call re-enforcements’ functionality? The only shared class is the ‘character’ class so we would have to put it there…but now this means that the ‘civilian’ and the ‘alien queen’ also inherit ‘call re-enforcements’ even though they will never do this in-game.

It turns out that this kind of thing happens a lot, and you start getting classes (like ‘character’ here) which become dumping grounds for functionality. These classes are often called Blobs.

Ok so if this isn’t what we want then what other options do we have?

Well the one that is interesting me is called an Entity System. It detatches the functionality from the data which allows for composition of game objects in a way that is much more flexible than multiple inheritance …well rather than me doing a poor job replicating the articles I have read I will just link them below, hopefully they will help you as much as they have me.

Right I’m very tired now, Goodnight Everyone!

Ch-ch-ch-ch-modifications

2012-08-07 20:05:00 +0000

Well I’ve been very quiet recently and that’s mainly down the my mild addiction to playing with Lisp. I been beavering through Let Over Lambda which ia fantastic book on the crazy stuff in common lisp (code that writes code etc) which has been bending my mind plenty.

I’ve also got sick of how the opengl interface works and have gone on something of a spring clean. I’ve made some tools on top of the exisiting common lisp opengl library in order to make it a nicer to work with.

Its definitely not ‘lispy’ enough yet but pushing data into buffers, making vaos and managing programs and their uniforms is much easier now. I’ve got it all up on github though I wouldn’t recommend playing with it yet as I’m damn sure there will be some HEAVY changes before I’m happy with it.

Here is a quick video of me playing around with a small chunk of code which handles the rotation of the objects in the scene. Notice how errors don’t crash the program and I can simply recompile the offending function and carry on. Also note that the repl still works so I can mess around with the camera position from there.

I’m now bored of these little 3D whatchamagigs now so I need to write an importer .obj files so I can get something interesting up on the screen.

Ciao

Today's Blob of Inspiration

2012-08-07 00:00:00 +0000

Its’ wonderful just to see some of the people involved and their passion. Watch this after you have had your fill of the landing itself.

It really feels like the start of something huge again, the SpaceX docking had me tearing up and this just caps it off for me, Well done to everyone involved, I cant wait to watch the next few years of this.

Mastodon