Sunday, February 10, 2013

Some progress on the book

After a week a furious reading, I finally reached chapter 7 of the book. On the way, I learned a good amount of things.

The first of these things is lots of syntax for  inheritance relationships:

Class CustomActor extends Actor;
self.EatAPancake();
super.ClimbMountEverest();
who refer respectively to declaring an inheritance relationship, getting the reference to the instance calling the code, or calling the superclass' implementation of a function. No big surprises there.

There is also lots of specific syntax for variables themselves:
  • local is used for declaring temporary variables while inside a function; note that you can only declare local variables at the beginning of the function, like in C.
  • config which I previously talked about;
  • const which is for constant variables, unsurprisingly and like many other languages out there

A LOT of specific syntax for functions:
  • event for events (mostly, just functions called from the native C++ code);
  • simulated, client, server, reliable, unreliable are all modifiers that are used for multiplayer functions;
  • const, NoExport, latent, iterator for people who can use native C++ code with the engine (i.e. people who pay for the license. Other people can use the ones already created, but not declare new ones). Out of these, latent means a function only usable while in a state, and iterator is for subroutines.
  • native is pretty straightforward, and obviously subject to the same limitations as before;
  • singular to prevent the function from being recursively called and thus prevent potential crashes from infinite recursion;
  • exec which is for functions that can be called from the console and for player input functions.
There might be more. I'm pretty sure I saw some final (non reeimplementable, I assume) and coerce (??? remember to check the doc for this one) laying around.

Also, there's a pretty cool implementation of states: by using the state keyword inside a function, one can define a set of functions usable only by this state. The state changing is as simple as calling GoToState('StateName'); and there are some useful BeginState and EndState functions. Of course, redefining a Tick function there is the obvious thing to do (it's the update function, same as Update in Unity). Having previously implemented a state machine in C# for the Barreleye project, I'm more than glad this is already there. Oh, and they can be "subclassed" :)

And finally, learning about Kismets has been pretty fun. Kismets are a sequence of events that can be created in the editor itself; it's visual programming for designers. With patience, one could probably write a game entirely in kismets; however, it would get complicated really fast, in addition to the kismets being run on a layer on top of UnrealScript which makes them slower. Also, kismets are valid only for the level they're created on.

Since Kismets only became clear after actually working with them, here's an image of a kismet I made with the book's help (note that it also includes a kismet created from UnrealScript code :)):

There. Only 3.5 chapters to go!

Saturday, February 2, 2013

The theme is out!

...well, one could argue it's more gameplay than theme. Either way, it's going to be pretty interesting:

"No gravity, no friction"

Annnnd...go! Interestingly enough, it's a theme I considered before, because of a Donald Duck comic.
Other news, I'm done with the second chapter of the book. It wasn't much, really, especially if you already know programming languages. The one thing I learned is mostly syntax, and special keywords:

var int numberOfShoes;

is for regular variables, whereas

var() int numberOfShoes;

is for variables that need to be accessible within the editor. Also,

var config int numberOfShoes;

is for variables that are loaded from the config files. Note that the editor value takes precedence over the config value.

Here's the part where I'm wondering whether this blog will turn into a technical blog, to which I answer... I do what I want ;) but I'll definitely post stuff that I find interesting, whether it's programming or design, or anything.

Next time we'll talk about design!

Tuesday, January 29, 2013

isProjectSetup = true;

A lots of steps for amazon employees, a kinda big step for me: I received the book that should help me get started! It's called "Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide" and it's written by Rachel Cordone.

So far, so good: I finished the first chapter, installed everything and created a new project with the UDK. I also created my first custom actor, added it to the example map, and made it print a nice Hello World message in the log. Traditions have been observed.

Well now! Time to delve deeper into UnrealScript, and concurrently, to start thinking about a game idea. I found some video game name or theme generators, some being more interesting than others:

http://videogamena.me/
http://dl.dropbox.com/u/9894614/ludumthemes/themegen.html
http://iq212.com/generator.php
http://www.generatorland.com/glgenerator.aspx?id=132&rlx=y

I might go with the second one, since the problem with the other ones is that they might be slightly too descriptive, and I want my creative freedom so I can do my own crap (which hopefully will get better as I practice ;) but I've seen and heard enough that I'm not expecting my first 10 or 100 designs to be awesome).

Monday, January 21, 2013

Getting Started

Hello there! Welcome to this blog.

The objective of this blog is to keep track of my project this semester while I dig into the Unreal Engine, learn how to use it, then start making games with it. I will have roughly three weeks to learn about it, then it's game-making time! A game every three weeks, for a total of 3 games, until the end of the semester (some gamejammers would say that three weeks is too much, but I have plenty of other work to do :)).

My first tasks: order a book about the Unreal engine, download the UDK, and find a random game name generator to help me pick themes.

This is going to be fun :)