Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
112 lines (58 sloc) 3.73 KB
Sat Apr 21 20:18:00 CEST 2012
To viewers: I'm borrowing code from my LD 22 entry, 'alone'. But I'm trying to learn from my mistakes. This time, I'm separating Display from MainUI. The UI system will be abstract, and will only use SDL under the hood
Sat Apr 21 20:22:35 CEST 2012
I've decided to abstract display and input into a separate library, since I like the 'Input' class from my LD22 entry but I feel bad to just copy/paste it into my new one :) You'll see how easy it is to make a new ooc library.
Sat Apr 21 20:25:23 CEST 2012
Turns out I have done quite a lot of ooc bindings in my time :) or at least forked/improved on others (@fredreichbier, @eagle2com, others I forget here, sorry!)
Woops, it's not the SDL version I thought it was. That's better. I actually have push access to eagle2com's repo.
Sat Apr 21 20:51:10 CEST 2012
Separation is done, lib is here!
It's now time to code the basic structure of the game. We have to make a few gameplay decisions here. I like to start with a small prototype and work from there,
so we'll have to find a few basic interactions that still make an interesting game.
So you are the all-encompassing force: I'll code a single-player game for now, and see about adding bots before the deadline, and maybe true multi-player later,
but that's asking for trouble :)
So for now, you have a few "real estate agencies", and each of them own some property. You can adjust the price of the rents, and see where people go. Obviously
most people will go for the cheapest rents. Not all citizens are created equal, though: some of them have a better income, or just different spending priorities.
Let's try to modelize that correctly.
Sat Apr 21 21:58:08 CEST 2012
I've shown a few ooc tricks: the compiler tries to find function definitions for you, and since I was stuck on a missing import, I had to use --allerrors.
Not proud of everything in this compiler, but it shows that it's not that hard to work around.
Sat Apr 21 22:02:57 CEST 2012
Hooray, it compiles!
Sat Apr 21 22:05:00 CEST 2012
Was kind of expecting a segfault here, lots of code added. Will debug now, brace yourselves!
Note that the SDL window stays, because gdb did break on the segfault
By default we have no line info, but.. that's what the -g flag is for.
Let's clean with -x first.
So apparently we're trying to update a null level. Yay!
Having the line numbers in .ooc is pretty neat.
Sat Apr 21 22:08:15 CEST 2012
Splendid, it runs! Not much is happening now :) We'll try adding a few types of sprites,
but first let's catch the 'exit' event, because right now clicking on close, or killing
the window is not gonna work. That's one of the peculiarities of SDL.
Sat Apr 21 22:16:10 CEST 2012
So apparently events are not correctly relayed. Let's investigate that. I think it's just
because poll is not called!
Much better :) With debug enabled we have some info about what's going on. Let's display text!
(Fun, it segfaults whenever pressing a key. Something's definitely wrong, hehe)
Sat Apr 21 22:32:15 CEST 2012
Was not correctly clearing and blitting the screen using SDL + Cairo, now we can get events
and display stuff. Yay!
Sat Apr 21 23:13:52 CEST 2012
Apparently fonts are not loaded correctly, let's try to debug that.
... well, that was easy :)
Sun Apr 22 17:33:11 CEST 2012
Decided to change the type of the game from simulation based on long-term decisions to... a tower
defense! Watch out :D