Tuesday, 7 June 2016

Alone: A Finished Project

It has been almost a week since the digital fair, and now would seem like a good time to have a final update.
The digital fair was largely successful and plenty of people was able to see the project (though I must admit our station was not in the best location and our display not the most flashy.) Since the last update, a lot has changed: placeholders are taken down and actual images put up... too much to list actually, the game is essentially finished.
None of this would be possible, however, without the help of friends.
Now for a brief rundown of the technical stuff.
Scene transition: an integer variable that changes every time the player touches the right most side of the screen. The player is then promptly teleported back to the left and the background will change if needed while monsters change their active states.
Platforms: there is only a single platform in the game (what? bad level design? have I not stressed enough times that the most important part of the game is the poem?) and it never moves. Fairly simple to implement (interaction between player and the platform, however, took a lot longer).

Attacking: No screenshot for this one, you probably won't look at it anyway. It's fairly patched up and is implemented within the monster class for ease. Not the most rigorous way and hurtbox for the wolf is weird, but nonetheless worked.

Everything else is relatively simple, it just takes a while to place the images and music in the right places, all hard coding stuff.
The end result is something like this:


Currently, it is impossible to kill the final reaper. This is because the game strictly follows the story of the poem and in the end the character will die.

Enough of the boring stuff, let's move on to the actual digital fair itself!

We left the school to go to the fair at about one and arrived around 2. After setting up, we had some time to go explore Science World then proceed to eat pizza. Around 4 o'clock is when more people start showing up, and that's when the real show begins.

The handsome young man on the right is my partner Alim, the less handsome person on the left would be me.
It's Alim's first time looking at the finished game
The number of people who visited our station isn't too bad as our project wasn't too flashy. We only had a laptop, two speakers, and a projector. The projector, however, was pointed at a vending machine which faced the other way from where the visitors would come, and it was essentially useless. :(


Alright, that's a few pictures to give you an idea of what's going on. A few things that I learned/realized: younger audience members do not care much for the poem elements and rush through the game expecting this to be a full fledged game, often leading to some degree of disappointment. Older audience members instead have trouble avoiding the enemies while reading the poem, though they are able to understand that the poem and the atmosphere are the most important parts of this "game". On the poem side of things, I was able to find more meaning in this poem as I progressed in making the game. Some elements, whether intended or not, allowed me to have a different look at the poem. I started off thinking that this poem did not really have a theme, and my goal was to make the atmosphere as dark as possible. Towards the end, however, I was able to realize that the theme can be "no matter your actions, you will have to face death sooner or later." Of course, there are other ways to interpret the poem, such as making the best out of the worst (not dying on the way to the shed and fighting till the end), and it varies from person to person. I must say though making a game from this poem has allowed to me understand it a lot better.

In conclusion, combining poetry and gaming is an idea with great potential. While this project is relatively simple and experimental, I can envision full fledged games (not just some point and click choose your adventure thing) based on stories and poems. Given enough time, a whole genre of games may even be created whether it be for education or entertainment. We'll just have to wait and see.

These caution wet floor signs are made to look like bananas? Amazing.

Saturday, 28 May 2016

Alone Update: Object Collision!

A small but very important addition has been made: The game now knows when you are getting absolutely wrecked by ghosts and wolves and you will lose health when touching an enemy.
Up next is the changing of scenes, maybe platforms, and then attacking. When that is finished, all that left will be to put in the graphics and hopefully sound!
A desperate koala tries to escape flowers and penguins.

Wednesday, 25 May 2016

Alone: An English Project

Wow I haven't been using this blog much at all! I almost forgot about it. Logging on today, I realized that I have two nerding out drafts that I'll hopefully finish sometime before the end of the school year. Anyway, into the main points.

For an English project, I am tasked with creating a game based on a poem written by a classmate(apparently in less than 20 minutes, impressive huh?) This poem is called Alone and it looks something like this:

This game will be for a technology fair sometime soon, and I have all the reasons to make it really good. Some background information though I am only an amateur programmer with almost no experience in game making(For a French project I made a point and click game that feels like its stitched together, though it worked pretty well.)  After a bit of thinking, I have decided to make a platformer type game instead of perhaps a choose your adventure game that was first envisioned. The poem itself limits the game play quite a bit as I cannot find any part of the poem that can be made into a game. In the end what I had in mind was a game in which the player would walk across the screen and encounter several enemies along the way, perhaps some ghosts and wolves, fitting the mood. Trust me though, it looks REALLY good in my head. I used wpf on visual studio and experimented with Images and the Dispatcher timer, not too shabby actually.
Currently ~100 lines of code in the Mainwindow class
Now for the specifics.
Probably really messy declarations, just made all player related things static because there will only be one player. I am using a few of the Windows default images for place-holders, as you will soon see. The commented out portions of the code involving rect and prect represents the (more than likely failed) attempts at a lazy and non-math solution to object collision.
The timer tick event is triggered every 5 milliseconds (wow I thought I set it to 15 milliseconds) as seen in Mainwindow(). This essentially updates the locations of the Image objects every 5 milliseconds. In addition, this event will also check for user inputs, namely the A, D, and spacebar keys. I had the W and S keys to move the player vertically, and eventually commented them out once I implemented jumping. The jumping was actually quite tricky to do and took quite a while. Since no collision exists, I had to bound the player's Image within the canvas' borders. Since the movement isn't continuous and a high velocity would exceed the bottom edge, a lot of changes had to be made before the player was able to fall to a fake gravity while jumping.
Another part of the failed attempt
Quick! Sneak in a picture of the xaml file to look cool!
Hard to have a game without enemies, up next is the monster class(only ~80 lines, as I don't have to stuff everything in here).
Note the public variables, I was too lazy to make accessor and mutator methods.
Monsters follow a similar scheme, with their independent DispatcherTimers that tick every 15 milliseconds. While not entirely obvious from this picture alone, there are two types of monsters(for now, as I have yet to find anything else fitting for the poem): wolves and ghosts. Ghosts are pretty slow and will follow you in the 2D plane while wolves can only move at a fixed height, albeit with a faster speed. The idea is that the player will have a weapon (maybe a branch?) that allows him/her to fend off the monsters but still giving him/her the option of avoiding combat and just jumping over them.
Monsters in their most natural habitat
The result looks something like this:
The koala is a jumping player, the penguins a ghost, and the flowers a wolf.
As this is stationary, one probably can't tell that this thing works, but trust me it does.

The next step is collision. I had some experimentations with Rectangles and realized that they are not the same as Rects, so that was the failed attempt. As I browsed the internet for an elegant solution to collision, I saw a comment suggesting that wpf isn't a game maker. It is right. Wpf made games are probably going end up feeling like a lot of the problems are covered with a band-aid instead of solved. So, naturally, I turned my eyes to Unity. With about half an hour of playing around I was able to get gravity to be applied on one sprite while not on the other, perhaps I should be watching some tutorials.
Is all my wpf work going to waste?
So now it seems like wpf is a backup plan in case Unity fails. Moving forward I am waiting on some art from my friend. If you are an artist and would like to draw a few things, perhaps the background or the sprites (don't worry they'll be silhouettes, I can't ask too much of someone who is working out of the goodness of their hearts), please contact me by commenting down here somewhere. The background will just be a general dark blue and dark red sky with maybe a dark forest closer to the ground. Somewhat like the game Limbo. 

Anyway, this is a pretty long post and here is hoping that this project will end well. 

In Unity there is strength. 

(Start it at 1:14, embed not treating me well.)
Ironic isn't it? Alone is the name of the game.

Tuesday, 27 October 2015

Nerding Out: First Experiences with Payday 2 (+ Introduction!)

(This was typed over the course of a few days and some things may have been missed as train of thought derailed)
Well I guess this will be the pilot post to this blog, I suppose I should do a little bit of introduction, since no other information about me is provided at this moment.

This blog is created mainly because my English teacher requires us to have a blog for certain assignments. That said, however, I will try to blog about subjects that I'm more enthusiastic (oh good spellcheck is enabled, I had to type saf to find out) about, and will tend to be more casual in grammar and writing (as you can clearly see from the amount of parentheses used already) in these less serious and professional blogs. Why don't I create a new blog just for my own purposes? I'm way too lazy for that and maybe some random classmates wanting to reference other classmates' blogs stumble upon this and well, become a hardcore gamer? I know I know that's not a really good or valid reason but I just don't feel like spending time making and keeping track of two blogs. I don't just want to write this in a private journal or something because that feels like a waste, and what if some random guy who likes games finds this blog?

As you can probably tell I can get off-topic quickly when I'm in my casual mode, so you might have to endure walls of text filled with pointless ramble.

Now, let's get to the topic that I've been meaning to talk about, hopefully I can get a few pictures in before I publish this, so you can just tl;dr it. (tl;dr sounds like a great column(series?) on this blog, by the way does anyone know how to make actual separate columns for posts?)

Here's a little quick backstory. My friend and I've been playing a few games together, namely Minecraft (with tekkit classic mod), the art therapy levels in Portal 2, and a tiny bit of Risk of Rain. Due to our rapid progression (lol equivalent exchange), however, we had no more games to play (He refuses to play a lot of CS:GO so that's a bit of a problem). He then found Payday 2 on 75% off and long story short we bought the game with the Game of the Year dlc pack. We've played a few hours together and I played a few games alone and here are my thoughts on a so far.
Portal 2, a great game for killing your friends.
First, let's talk graphics. I'm not a big on graphics (I've gone through some old games, C&C Red Alert 1 anyone?) and Payday 2 definitely meets my standards. I wouldn't call the game gorgeous but it won't give your eyes cancer if you stare at it for too long.
Probably pretty good graphics for a game made in the 90s.

I feel like the music comes after the graphics so I'll lightly touch on it. I'm no musician but the Payday soundtracks definitely pumps me up during police assaults, and sounds fine when the popos (I've really grown fond of that abbreviation after playing that game for only a day) aren't on my tail. I have so say though mixed with a lot of other sound effects, character lines, and noises, it's hard to miss a lot of information (it's not until I read the wiki today that I found out cloakers made a special sound). Nothing major though.

I'm going to talk a tiny bit of the interface, namely the main menu. I STILL HAVEN'T FOUND OUT HOW TO START A LOBBY WITH FRIENDS WITHOUT GOING TO CRIME.NET AND LOOKING FOR AN EMPTY CONTRACT, IS IT JUST ME? Ahem. That aside, the keybindings are a little strange. Who in their right mind puts their primary weapon on 2?

Finishing off with gameplay, I think I already have a pretty big wall of text. I'll start with stealth because that's what my friend and I have worked on for a little bit. It's not immediately obvious what one is supposed to do in stealth, maybe that's because I didn't go through tutorial playing with a friend, or perhaps it's supposed to be the learning process. Anyway, starting off in Jewelry Store(the easiest map I've done so far, with no cameras), I think it was my friend who first figured out that we were supposed to quietly take down the guard (we had one spawn inside and one spawn outside for our first few tries) outside in the back alley and then go inside to kill the other guards and crowd control by spamming the f key. A really interesting mechanic that adds some pressure into the game, for if a civilian wasn't controlled for long enough, they'll just pick up their phone and call the popos. In the end you tie as many civilians as you can and start grabbing loot back to your van. This was really interesting because I've never played anything quite like it(maybe I don't play enough games of this genre). The closest game I can think of on the top of my head is Hitman: Absolution, but I tended to go loud in that game anyway. For loud, you can treat it as any generic fps with some additional elements such as police assault added. Interesting death system with custody and bleedout, with the option to trade hostages if available. Nothing too special about loud, but maybe I haven't played too many loud maps.
Essentially we robbed this jewelry store over and over again :)

All in all Payday 2 is a great game to play with friends. I can probably get many many more hours out of this game before I get bored of it. If you have the spare time and money and want to try this game, by all means (though the sale is over and you might want to wait a bit for another one.) Hopefully  I got everything that I wanted to say out and if you have any questions comments concerns queries qualms just leave a comment or something.