After a month of silence you might think I’ve just, well, been silent. But I have NOT! No, instead I’ve been very busy with a test week. It didn’t keep me from making a game for march though.
The main reason I was so late was because at first the plan was to make an interactive fiction together with my friend Peter. We figured that if he wrote the story and I coded the story in Twine, we’d have it finished by the end of march. Needless to say that it didn’t really work out. Not that it was a bad idea, we had a great idea for a story and actually have the first few pages done. It’s just that, after the first week or so it dawned on me that when you make an interactive fiction, you really have to focus on the story; implementing the text in twine was not the hard work. We got rid of the deadline, and decided to give this more time. I realized I needed a new idea.
After two weeks of studying and preparing for my test week I could feel #1GAM breathing in my neck. To just get it over with nice and quick I signed up for the 1GAMCRUNCH. Doing that gave me two big advantages, one being that I would only need to spend a weekend on my game which gave me a lot of spare time for, I guess other things. Two is that I finally got the motivation to try out EaselJS, which I’ve been considering for quite some time. It’s a nice and accessible library of which I managed to get the hang of pretty quickly. I’m planning on using it more because it is free and just feels really easy and powerful to work with. The only thing I’m worried about is that it might go down the same road ImpactJS went. For those who don’t know, ImpactJS was free at first but went commercial after some time. If that happens to EaselJS too all the hard work I put in it learning it might go to waste. For now I think I’ll just hang on to it, and keep my eyes open for alternatives.
So, the game I made for #1GAM March is Flippin’ Frenzy, a game in which you can express your dissatisfaction of the crumpled rabid society and express your rebellion by disobeying orders from crates and flipping them over. LET’S START A RIOT!
Flippin’ Frenzy in action.
Play the game here: http://dl.dropbox.com/u/65227065/FlippinFrenzy/index.html or take a look at the game page. If you’re interested in the source, I will be publishing it on GitHub soon.
Operation Get Out is finished! After a month (and a little bit) and a long last night it’s finally done. The last 2 days were the most stressful. Some function I made at the very beginning (a line-line intersection function) turned out not to be working when the parameters become big numbers. So I had to stay up late (and get up early) to fight the bug and find help on internet. Luckily I made it before the (extended) deadline. So here it is!
The game in action
Featuring three levels stuffed with thrilling sneaking action and intense moments of fear for discovery, one extremely helpful tutorial and a half-assed raycasting and FOV-system. Get it here!
Or take a look at the game page. If you have any comments or critics, feel free to post a comment! Everything is welcome.
The first level I designed for OP GO. Looking back, maybe I should’ve built a level editor…
I’m done with the game’s “engine”, so now I have to focus on polishing the game’s looks and adding content. As for content, I finished designing the first level! You can see it in the picture. Since I don’t have that much spare time I haven’t made a level editor, so that’s why I’m using just plain pen and paper. There will be five levels total, including a tutorial that will showcase the broad collection of enemies and tactics that can be used to beat the game.
Typing a post on a smartphone is NP-Hard, man.
IT’S SO FABS
Was a FABS day today, making some solid progress on the game AI. Expect a blog post about it soon, mwuahahaha. Or follow my progress on the repo: https://github.com/bobismijnnaam/sgoat.
Next on the list: raycasting! Much to my suprise, it wasn’t that difficult. So I won’t be ranting today. I’m so glad it all worked out nicely, I expected this to be a very difficult task. Not so difficult that I couldn’t finish it, but I was kind of worried about the time it would take me to finish it. To be honest, testing the system I coded for raycasting was harder than actually coding the system itself, haha. At some point I had to hop back and forth between on-screen- and world-coordinates and messed up a few lines. That, combined with the fact that sometimes my brain switches around variable names (for example l1x turns into x1) gave some unexpected results. After an hour of explaining how the code works to my rubber duck and making a special function for converting on-screen- and world-coordinates the prototype worked.
“A picture says more than a thousand words.” They say. Well, to lift the word count of this blog a bit, here are some “pictures”.
The red line represents the ray. The blue cross indicates the point of collision.
It also works with the borders of the level!
And it indicates where the collision occurred first. This is important, because there occurred two collisions here: one with the border and one with a wall.
It’s nice that implementing raycasting was really easy, because I can now finally move on to the interesting part of my project: the AI! The AI needs raycasting for their field of view. Later on I will (hopefully) also be using the raycasting system to display the field of view of the guards, and also maybe the field of view of the player. But I’ll only be able to implement that if I have enough time. So we’ll see.
Damn, that was a lot of work. On schedule today was sliding collision. This was on schedule because, ofcourse, it is weird if you can walk through walls and can’t slide past walls. I have always struggled with collision, though I’m not sure why. I have implemented a lot of collision detection systems in my prototypes in the past, but every single time I have had major problems with it. For some reason I didn’t have a bad feeling about the task at hand when I started coding this morning. I was almost looking forward to it. Nostalgia I guess. Naïve nostalgia.
I ended up coding for almost the whole day, working for a long time on a system that in the end is incredibly simple. I’ve tried about 5 different systems for (rectangular! -.-) sliding collision detection. And altough I got the collision detection working (with more work than expected), getting sliding collision working seemed like an impossible task. At some point I lost hope, because I had already tried 5 collision systems, all of them not working properly (altough the code looked perfectly fine. It’s depressing). I decided to take a break, go outside for a moment and buy some drinks for tonight. When I came back I had a striking epiphany. A true “EUREKA!” moment.
So I got back to work, and in mere minutes everything was working as intended. It turned out I was hopping back and forth between floating point numbers (numbers like 4.89) and integers (round, natural numbers like 2, 6 and 800) in an important function. That function in turn somehow messed everything up. All five of the systems couldn’t handle this little error. Which is ofcourse, expectable. Lesson learned.
I’m exrtremely happy but also extremely irritated at the moment. Collision detection gets to me every single time. I guess you could say collision detection… Is my kryptonite.
It’s halfway february and just like last month the end of the month is steadily coming closer. And altough I haven’t written any blog entries, I have been writing code. I’m working my way to finishing the core of the game so I can start adding some levels and polish the game with (hopefully) better graphics and ofcourse a gripping ambient soundtrack! Here’s what I’ve got so far:
OPGO in action. Rectangles are walls, the circle is the player.
This contains the very core mechanics that I will need for my game: movement of the player, a system that manages the walls (adding, deleting, rendering, etc.), and collision detection. I’m still far from done though. Things like sliding collision, AI, sounds, and a level selection system still need to be implemented. But the core is there. I’m optimistic about when I’ll finish the game because next week I have a break from school, which means I’ll (probably) have a lot of time to code 🙂
Lastly, you might see that on the top of the screenshot it says “Scapegoat”. Well, I had this really cool idea for a game where you control a goat which wants to escape but has to sneak past farmers guarding and patrolling the area. I had to go for a more minimalistic approach because I won’t have a lot of time for graphics this month. That’s why I changed the name to Operation Get Out so I won’t have to pay much attention to graphics. Cheap and lazy, I know haha. It’s an assignment for my computer science class so that’s why I’m less motivated I guess.
Until next time 😉