Thursday, July 29, 2010

Getting things clear in my head: Game Design

Today I decided to do some design work, I find one of my biggest problems is getting a complex design clear in my head, and usually this leads to ambiguity, thus poor implementation, this kinda annoys me, because my ability to design must be far greater (or at least equal to) my programming skills if I want to advance to bigger projects.

So I sat down and asked myself "what is a game?", the following is a UML diagram that I wrote out, some of the notation might be a little wrong, but you'll probably understand where I'm coming from. (Hopefully the image will be enlargeable)


The above diagram is what I consider to be a game, I'm going to keep adding to this model, and eventually I may be able to build an engine out of it, one of my flaws is definitely design, sometimes I can't see wood from the trees!

Let's see what you make of it.


Thursday, July 22, 2010

Progress log, something different.

Throughout the rest of this relatively short day, I'm going to save up all of my progress updates, and add it to this blog, rather than constantly post on Facebook, lets see if this work, if it does, I'll do the same in the future :-)


15:47 - After hours of scribbling on my whiteboard and sipping tea, I've come up with a revised class design for generic "game", I needed to tweak and change a few things as my old design was suited to SDL (I had to write a lot of functions to cater for SDL's shortcomings), that means I have less coding to do, but at the same time, cannot use the SFML Classes out of the box because many things aren't included, currently been working out how to structure sprites, players and objects in a game, figuring out what SFML did and didn't do was probably the biggest challenge

16:32 - Started writing out the code for my take on a sprite class (an extension of the one SFML provides), the new one handles collision, and collision regions, most of the methods relating to collision are implemented , code compiles, but haven't tested the methods work yet, about to do that.

16:51 The collision works!
Note in the pictures, when the 2 rectangles collide, the are visible, when they aren't colliding, they disappear



17:22 A Slight hitch there, the region collision didn't work to start off, but I figured it out, I found out I was making the width and height of the regions the same size as the original shape, thus negating the effect of setting a region in the first place! it's fixed now and everything working fine


This post is getting a bit long, so that's enough for now, I've probably waffled on for too long now :P

Sunday, July 18, 2010

Next Week I'm getting Edjukated! & Birthdays!

I've decided that I'm being too complacent at the moment, I'm supposed to be developing lots of games/apps and building my website this summer, but much of my time is spent fretting over my main project, the GUI library (oh god, don't make me think about it again!)

This project is becoming the greatest regret of my programming pursuits, although I do want to finish it eventually, it's taking up way too much of my time, and since it's essentially a collection of code, with little tangible evidence of progress, I'm getting only small bursts of motivation from this project.

The website on the other hand is taking shape, I've started to get the hang of using the GIMP, and now I'm able to make what you might class as 'Art', but I guess we'll see how good it is when I eventually launch that.

But I detract from the primary purpose of this blog, and this is to talk about learning, over the next week, I will dedicate the majority of my time to learning some new languages/APIs/software, I need to break out of this cycle of complacency (a la, using SDL, and only the basic tools of GIMP, over and over again), therefore, my mission this week will be to read a book on JavaScript, look into the Multimedia Library 'SFML' and learn some more advanced features of the Image tool 'GIMP'.

Hopefully, by acquiring a new skill set, I will be able to make better quality things, more quickly, so that I can pass them on to you.

Oh, it's my birthday next week, turning 19 isn't exactly a big deal though, it's not like I'm legally allowed to do anything new, just another year older/wiser :P

Peace.

Tuesday, July 6, 2010

I guess I should keep everyone updated, I've been up to some stuff :D

So this is a rather informal blog, at least in contrast to the last 'write up' style blog, this one is just going to go over the stuff I've been doing during my holidays.

For about a fortnight, I worked on my GUI library, it's really taking shape! I have events implemented in a way that I'm really happy about (the interface between user and GUI is clean and easy to program), I've also implemented visibility and the ability to associate other controls with forms (the controls can even be forms! so you can embed them inside other forms!)

One major challenge I'm facing is how I'm going to implement text, for labels and captions etc, I can either use the SDL_TTF library or create my own bitmap fonts, neither option seems that great, but I'm not sure what other options I have, we'll see...

The second project I started on was working on the website, at the beginning of the week designing assets for the website (logo, navbar image etc) seemed like an impossible task, however, when I started to use the image editing software (I use GIMP), things got easier, and dare I say it, fun!

I've already made the logo and navbar and I'm going to keep tweaking them as I go along, I'm going to spend the entire week working on the website, then I'll flip back to the programming, A productive holiday indeed!.

As for just general life stuff, I'm ok, I keep waking up way too late, not getting to sleep till 2/3 in the morning, but apart from that it's all good, I'm kinda cool with just getting on with my stuff without interruption, It's kinda funny, I'm not even ashamed that I'm isolated, I kinda like it, taking a break from my social life seems like such a natural thing, and will make going back to uni all the more rewarding when it happens.

I hope you enjoyed my blog :-)

ProgrammerInProgress