• January 7, 2014

    Awakening: a game that never was

    Back in the day, together with my good friend Alexander Lentjes we would spend many, many hours developing games that we hoped would take the world ...
  • June 27, 2013

    Lightmap baking in Unity does work

    So you've built a wonderful terrain with lots of trees and other models on it, and now you'd like to bake a lightmap onto it? You've probably found th...
  • June 27, 2013

    Removing grass from a terrain in Unity

    Using terrains in Unity brings you several advantages, one of which is the possibility to scatter trees and grass or other foliage over the terrain wi...
  • 3D Studio Max Office Furniture models
    June 14, 2013

    3D Studio Max work – High-poly fur...

    I recently created some office furniture models in 3D Studio Max 2010, and I'd like to share the source models here for download. The models use mostl...
Next
  • 3D Studio Max Office Furniture models
Previous

Developing a generic count() method for Idiorm/Paris

The minimalistic object relational mapping libraries for PHP, Idiorm and Paris, are wonderful stuff. They have a very small footprint and make your code a joy to read. They allow you to build queries using method chaining, avoiding tedious string concatenation. They’re safer than string concatenation too, since they use parameterized PDO queries under the hood.

And yet, minimalism comes at its own price. Not everything is possible with Idiorm/Paris. Still, whatever seems impossible could very well result from my not understanding the libraries’ potential, or SQL for that matter. Read more


Developing a REST-powered AJAX table control with the Slim Microframework and AngularJS (3)

Developing an REST-powered AJAX table control with the Slim Microframework and AngularJS

Welcome to the third part of a hands-on tutorial on writing reusable user interface components with AngularJS. In this tutorial, we’ll write a table control that asynchronously loads data from a server, display it, and allows the user to sort the data by clicking table headers. The sorting is done client-side. We’ll show how to write a REST-server in PHP, how to define custom HTML elements in AngularJS, and how to setup a controller for the elements. To top it off, we’ll write CSS for our table in such a way that it can be dropped into a user interface in a snap, and scales fluidly with the space allotted to it.

The third part of this tutorial adds CSS to style the output we already have, and adds automatic (client-side) sorting to our table control.

Don’t forget to read the first part and the second part of this tutorial.
Read more


Developing a REST-powered AJAX table control with the Slim Microframework and AngularJS (2)

Developing an REST-powered AJAX table control with the Slim Microframework and AngularJS

Welcome to the second part of a hands-on tutorial on writing reusable user interface components with AngularJS. In this tutorial, we’ll write a table control that asynchronously loads data from a server, display it, and allows the user to sort the data by clicking table headers. The sorting is done client-side. We’ll show how to write a REST-server in PHP, how to define custom HTML elements in AngularJS, and how to setup a controller for the elements. To top it off, we’ll write CSS for our table in such a way that it can be dropped into a user interface in a snap, and scales fluidly with the space allotted to it.

The second part of this tutorial focuses on AngularJS. With a RESTful web service in place, we will now set about writing a new HTML element for our dynamic table. (Read the first part here).
Read more


Developing a REST-powered AJAX table control with the Slim Microframework and AngularJS (1)

Developing an REST-powered AJAX table control with the Slim Microframework and AngularJS

Welcome to a hands-on tutorial on writing reusable user interface components with AngularJS. In this tutorial, we’ll write a table control that asynchronously loads data from a server, display it, and allows the user to sort the data by clicking table headers. The sorting is done client-side. We’ll show how to write a REST-server in PHP, how to define custom HTML elements in AngularJS, and how to setup a controller for the elements. To top it off, we’ll write CSS for our table in such a way that it can be dropped into a user interface in a snap, and scales fluidly with the space allotted to it.

The first part of this tutorial introduces AngularJS, and takes you through the use of the Slim PHP Microframework and the Idiorm and Paris ORM libraries in order to write a RESTful web service, which we’ll need for our table control to talk to.
Read more


Awakening: a game that never was

Awakening - the game

Back in the day, together with my good friend Alexander Lentjes we would spend many, many hours developing games that we hoped would take the world by storm. Unfortunately, we were both 12 and our skills were not nearly sufficient to develop anything good (actually, I’m speaking mostly for myself here). At the time, our great example was Space Quest III, and we desperately wanted to make a clone.

We had made several forays into developing a 3D-animated adventure game (called The Pirate Encounter – and it was actually conceived before The Secret of Monkey Island), but after piles of unfinished prototypes we decided to do a text adventure with static graphics, like the games that Level 9 used to produce at the time. Our company was (and still is) called Procurion 9.

The game was Awakening, and I have recently been able to decode its BSAVEd 4-colour CGA graphics. These were done by Alexander Lentjes, where he was limited to four (very ugly) CGA colours and had to use a self-written graphics package that only allowed him to plot one pixel at a time (there was no flood filler…). By the way – the application I wrote to load BSAVEd CGA images can be found here.

Read more


Online Tools

I can see blonde, redhead...

Websofia presents a couple of online tools that can be handy when you’re examining hacking scripts on your web server. Often, you’ll find that malicious code is encoded using either base64_encode or str_rot13, and possibly gzip-compressed. You could scan all the files on your web server looking  for base64_decode, str_rot13 and gzinflate, but you’ll get a lot of false positives in the bargain. When you need to know what the encoded code actually looks like, run it through one of these tools to find out. Saves you having to write the scripts yourself.


Writing your own toy operating system: first and second-stage bootloaders together

I can see blonde, redhead...

It’s finally time to put together all the code we’ve seen so far and make it work – although if you’ve been programming along with the past few installments of this series, you may already have done so. In the last few sections, we looked at the Intel 80386 processor’s protected mode and what’s required to get to it.

In this part, we’ll take a short break and put everything we’ve done so far together to see it run. Might as well have a little payoff from all the work, right?

This article is going to repeat all the code presented in the previous articles to see how it all goes together. You can read through it, or you can grab all the source code here.

Read more


Writing your own toy operating system: Jumping to protected mode

I can see blonde, redhead...

In the last section of this tutorial for writing your own toy operating system, we discussed memory (again) and focused on the 21st address line (the “A20 line”) that must be enabled before we can have access to the full 4GB of memory. This is a prerequisite to entering protected mode.

In fact, all we’ve done in the last few articles is prepare for entering protected mode. We’ve set up a global descriptor table (GDT), an interrupt descriptor table (IDT) and enabled the A20 line. All that remains is actually jumping to protected mode where we’ll finally be able to execute 32-bit code so we can focus on our kernel.

Read more


Writing your own toy operating system: Enabling the A20 line

I can see blonde, redhead...

Here we are again, with yet another step in the process of building a second-stage bootloader for our own toy operating system. In the previous sections (here and here) we learned how to create and set up the global descriptor table (GDT) and the interrupt descriptor table (IDT), which the CPU uses to access and control memory and execute interrupts calls. Both of these structures are necessary to switch the CPU to protected mode.

We are now actually close to reaching that holy grail now. Only a few more preparatory steps are necessary to switch to protected mode, which will finish off our second-stage boot loader and allow us to start writing our kernel in C (which will be a relief from all the assembler code).

In this article, we will talk a little more about memory (we had already done that extensively in the past), but there’s a final hoop we need to jump through in order to have the the full 4GB of memory at our kernel’s disposal. Read more


Writing your own toy operating system: Setting up the Interrupt Descriptor Table (IDT)

I can see blonde, redhead...In the last section (part 7) of this tutorial for writing your own bootloader for a toy operating system, we looked at protected mode. In particular, we examined the global descriptor table (GDT), which is a structure the CPU uses to determine access to memory and to allow a flat memory model, rather than a segmented one like in real mode.

We analyzed the structure of the entries in the global descriptor table, and looked at some code to set up a simple GDT with three entries, which is all we need to run our kernel. In this section, we’ll look at another, but very similar structure: the interrupt descriptor table (IDT). But before that, we’ll need to see what interrupts actually are and what they are used for. Read more