Category Archives: Uncategorized

EXPURGET – Postmortem (Ludum Dare 34)

startgame1

Last week I decided to participate in my first game jam, Ludum Dare 34! I had no prior experience in doing game jams before LD34. To my surprise, I actually published a game in 72 hours and I didn’t even feel disgusted by the result! The resulting game is called EXPURGET, a fast paced arena shooter where you must survive an onslaught of vicious alien lifeforms. I like the game, so I slapped the word “demo” under the name, because perhaps I’ll expand the concept in the future. EXPURGET was published as a Ludum Dare entry just four hours before the Jam Entry deadlines. The entry feedback has been tremendously helpful and I appreciate all the comments because they will aid in my improvement as a game developer. The weekend was an interesting experience, so it seemed like a good idea for me to do one of these “Postmortems” many developers like to do after game jams.

First, the tools I used for EXPURGET

  • Godot v2.0 as my game engine
  • LMMS as my audio sequencer, along with ZynAddSubFX as my primary soft synth
  • Photoshop CS6 for art/graphics

Why I decided to do my first game jam

The simple reason I wanted to give LD34 a shot was to exercise my game design skills. I came to realize I would exhaustively work on game concepts for months or years and ended up with a game that I did not think was fun. I’m confident in my knowledge of programming, so it was clear to me that I was lacking in my ability in game design. Creating a game in 72 hours seemed like the perfect way to prevent me from working on unnecessary details for months and design a fun game quickly.

I would argue that you can’t exactly “teach” game design to someone. Game design is basically how a game “feels”, the mechanics, and how well the visuals, programming, and music all mix to create one cohesive experience. Everyone has their own opinion on how they think their game should feel and what the player should be thinking when they’re playing their game. That opinion is generally formed by the designer’s experience with other games they have played in the past. (Whether or not a game designer should have immense experience with countless video games is a bit out of scope for this postmortem).

Chances are, if you grabbed two different people and told both of them to design two different games with a given set of rules and mechanics, the two completed games will feel very different to each other. Ludum Dare is in fact a great example of this. We’re given a theme to derive a game from. Two themes won the vote in Ludum Dare, one of them was “growing”. A lot of developers immediately had the concept of planets and flowers growing (just look at the entries!). Although many of them had the idea of plants growing, all the games feel radically different from each other. Therefore, game design is very much a personal expression.

What I think went well in EXPURGET

game2

  • The art resulted in something much better than I imagined. I do not try to be an artist and I consider it one of my weakest skills in game development, so I try to focus on my strengths like programming and music. This year I seem to have adopted a style of 2D art that works for some fictional settings. It is basically vector art, but I paint over it with some very rough brushstrokes. A key aspect to the art is cutting the edges off of the simplistic shapes to give it an “imperfect” and rough look. Once I saw the art for EXPURGET becoming more attractive, It really motivated me to continue working. Feedback on the art was more positive than I imagined. Ultimately, I think the art contributed tremendously to the aesthetics of the game.
  • The dialogue in the intro of the game is something I really enjoyed. I didn’t have enough time to draw characters for the two people conversation in the intro, so I used distorted circles and the color of the text to indicate which character was talking. It was an efficient solution I think. To my pleasure, a comment on the game’s entry noted the meta/self referencing in the dialogue.
  • Incorporating both themes of the game jam is something I’m pleased with. Out of all the themes that could have won, “Two button controls” was probably my least favorite. I was tired of the lack of control schemes on mobile games, so I was displeased to hear that it was one of the themes that won the vote. After an hour of brainstorming at the start of the game jam, I made it work out. The other theme that won the vote was “Growing”, which I had absolutely no ideas for until the final 24 hours. The idea was that the monsters would grow visually and in strength the longer the player survives the onslaught.

What I would have improved in EXPURGET if I had more time

  • Monster getting stuck on top of the player’s head is the main criticism I get on the game and I suppose it’s a fair one. The final hours of development was spent on getting enemy A.I. to at least work, making it work well was an after thought. The monster in question was actually supposed to shoot projectiles at the player, and not jump or fly in the air. I scrapped that idea, because I didn’t have enough time to program enemy projectiles and test them out. Basically, I knew about this issue before I submitted the game so my quick fix was to make the collision box for the player’s bullets taller, so if the monster got stuck on their heads they could at least shoot it. This turned out to be a solid fix for me, but I think some players didn’t catch that they were able to do this.
  • The speed of the player’s movement and rate of fire is too slow. In the final hours of development, I had to grind just to get the enemy A.I. to behave properly. The result was that the enemies were very fast, yet the player would fire bullets too slowly and did too little damage in time. I would have increased the fire rate if I had more time to test.
  • Challenging the player to reach difficulty 50 without testing if it’s possible wasn’t a good idea. With my best effort, I can only get to difficulty 40.

Conclusion

I couldn’t be more pleased with my first game jam. The most important thing I’ve learned was that the core of your game should be easy to conjure and fun from the start. If you have to go through months of heartache and suffering to find the fun in your game, take a step back and reconsider what you’re working on (unless you have reasons why you’re not trying to make your game “fun”). The essence of your game should be there from the start, thus any other ideas will then derive from it. I’m looking forward to participating in future Ludum Dares and other game jams, and perhaps collaborating with others.

Thanks for reading. You can follow me on Twitter (@xodene) for updates regarding EXPURGET and others game.

Transitioning Stellar Blitz into a racing game

Hey look, finally a blog post for Stellar Blitz!

What’s new? Everything.

The first implementation of Stellar Blitz was a multiplayer twin stick shooter for mobile devices. It was buggy nonetheless, but it kind of worked. You join a battle with up to 4 players around the world and you shoot their Hubbles. The prototype was fine to play but after a few months of taking a break from development while working on Stellar Alien’s REMIX update, Stellar Blitz didn’t exactly spark my creative drive.

Twin stick shooters are cool, but I don’t think they’re very suited for touch devices. I believe I’ve done a decent job in the past in making touch analog sticks work well but casual gamers still seem to have a lot of trouble with them.. That’s a problem because, in mobile game development your core audience is mainly casual gamers so you really have to cater to them if you want anyone to play your mobile game.

When I returned to Stellar Blitz development, I knew I wanted to change the game mechanics drastically. So I thought of making Stellar Blitz into a multiplayer racing game and so far I really like the idea. I have many ideas for competitive racing game design and this seems like the perfect project for me to implement those ideas. A racing game really makes sense for mobile rather than a twin stick shooter as well. The controls can be a bit more simplified, so it will be easier for casual gamers to understand initially. This doesn’t mean the gameplay will be dumbed down, but it will be easier for  casuals to get into and more competitive players will be able to find depth in the gameplay.

We’ll see how it goes but I think making Stellar Blitz into a multiplayer racing game is a great idea. I have been hacking on the networking code the past 48 hours and I think it will work out well.

Stay tuned!

Updates – Stellar Alien/Combat – Licensing Expo 2015

If you haven’t heard the stellar news, Stellar Alien was recently updated on Google Play and the Amazon App Store. This was a much needed update as there are tons of new and juicy improvements to the overall game. Finally, iOS devices should (hopefully) be receiving this same update in the next week as it is awaiting review from Apple to be updated on the App Store.

A tale of debugging an annoying launch crash.

It took sometime to get the game ready for iOS because it was crashing on launch and it was only crashing on iOS devices – not Android. So this was a frustrating problem to debug but, luckily I reviewed the crash logs and the cause of the crash was because I messed something up in Ludei’s Cloud Compiler. The app was compiled to include Facebook Integration and while I had provided a Facebook App ID for Android, I did not do the same for iOS. Ouch! And that caused me weeks of misery trying to determine what was causing the crash. I don’t think the application should crash due to the absence of an App ID, so I hope Ludei finds a better way to indicate such an error rather than the application crashing. CocoonJS continues to get better with each version and Ludei’s customer support is fantastic. I suspect inconveniences like this will cease as the platform continues to mature.

Stellar Combat still exists

In other news, I am still hacking on Stellar Combat but it is indeed a difficult beast to tame. Network programming is difficult.  I’m not sure how well I developed the client code. I’m fairly confident in the server code base, for I have not had to touch that code in months (I say if you haven’t had to touch code in a while to fix bugs/improvements, it’s probably decent code). In contrast to the client code, which I have refactored multiple times and continue to struggle to get right. This project is starting to get to the point where I ask “Is JavaScript right for this?”. But that’s a fine question to ask really. It means this is challenging me as a programmer and that’s interesting.

Licensing Expo 2015 – I’ve got a booth!

expo

Finally, much of my time recently has been occupied by the upcoming Licensing Expo 2015 in Las Vegas, Nevada. Yup, Starbli’s got a booth there. V193, write it down! I’m going to be there, and so will Starbli and all of his friends. It’s really exciting because I am hoping to expand Stellar Alien, its world, and all of its characters into different forms. A grand effort was put into developing every character’s personality in Stellar Alien, and making its massive universe super cool and unique. I’ve got an insane bucket list of the kind of things I’d like to license Stellar Alien to. If you’re attending the Licensing Expo 2015, come by the booth, say “Hi”, and check out all the neat stuff that will be there. T shirts, tablet giveaways, animated shorts for Stellar Alien, and other new info on the amazing universe that Stellar Alien is set in. Can’t wait to attend!

 

Thinking about controls for mobile games

Why is designing controls for a mobile game so darn difficult? Compared to designing controls for a PC game, touch controls are very limited. On the PC, you have two methods of interactivity:  a Keyboard and a Mouse. An English keyboard will have at least 28 keys to choose from, and standard mouse will have 3 buttons. This allows tons of possibility for control schemes, which makes the PC a very attractive platform for sophisticated games.

And then there’s mobile devices. iPhones and popular Android devices do not include a keyboard, only a multi touch screen. You can touch and swipe. That’s about it and I find it very diffcult to design games with such a limited control scheme. If you take a look at the app stores charts, you’d assume other app developers are having the same issue. How many infinite runners and “match four of something” games do you see? Either developers are having a hard time coming up with intuitive controls on touch devices, or somebody creative hasn’t came up with a new control scheme.

So when the time came to redesign the controls for my first game Stellar Alien, it was a challenge. Stellar Alien is not an infinite runner and the play can move in all directions, so the controls can’t be a “one touch to do one action”. There’s also a shooter game mechanic in some levels, so there will be times where they would prefer to use two thumbs for play. The first thing that comes to mind  is why not mimic analog stick controls? You can move in all directions, you can easily add more than one sticks. The problem with them is that many users don’t like them and casual mobile gamers won’t “get them”.

The prominent complaint is that the on-screen stick controls take up too much screen space therefore players can’t see the game view very well. That’s a legitimate issue, especially on mobile where you don’t have much screen space (although a trend in mobile devices right now is so to make the phones bigger, so that’s nice). So a solution a developer would have for that complaint is to make graphics for the stick controls transparent. But I question why should we show a graphic at all for touch stick controls? It’s just more visual clutter and it’s distracting. I’ve seen developers argue that players should see a graphic for the controls so that they’re aware where to touch, and I agree with that, but when a user is using the controls there’s no need to show a graphic. They’re engaged in the gameplay, so they would want to see the game view in full.

In Stellar Alien, the controller graphic hides when the player engages in game play

With that said, I decided for Stellar Alien I would mimic analog stick controls and show a graphic when the controls are not being touched, to give the player a visual on where the controls are located on the screen. Then, when the controls are active I hide the controller graphic completely, so they can enjoy the game view in full. I like this control implementation, and I think the most subtle of things can improve a game’s controls. The controls in Stellar Alien are still far from perfect, and I still think developers can come up with better control schemes for touch devices. But for now, I am satisfised.

Mobile game developers, how did you implement controls in your game? Share your knowledge and leave a comment.

Stellar Alien REMIX: The Biggest Update Yet

Hey all,

The new Stellar Alien update is here, and this “remix” is better than the original! After two months of revisioning the game from scratch with a completely new engine, music, art, animation, and even added some story dialogue in there! Really happy with how this update turned out, as I got more than I expected done.

Download the remix at Google Play

store2

store1

Everything’s new, but here’s a list that show’s just BIG changes:

The BIG Changes:
-New and fresh high quality graphics!
-New menu designs
-New mission system
-Revamped level designs
-Story Dialogue
-Smooth, revamped controls!
-Introduces Roxas, Starbli’s mentor
-New Music / Sound Effects
Again, these are only the BIG changes, the whole game is changed! Enjoy. Your feedback is appreciated.

Stellar Alien v2: Massive Update – New Animations

Recently I’ve decided to take a break on Stellar Combat and work on not just improving, but also rethinking core gameplay aspects of my first game Stellar Alien. Stellar Alien was published two years ago when I was 14 years old. As a programmer I’ve gained a lot more experience in those two years,  so I decided Stellar Alien needed a facelift.  We’re not just talking about a few minor updates here and there:  I’ve completed rewritten the source code, added brand new animations, new game mechanics, levels, and controls. It’s almost a new game, yet the core mechanics are still there.   But they are now complimented by more intuitive ideas.

sheet

Starbli’s animation frames

 

The first update I did for this new version of Stellar Alien was making new animations for Starbli. Animations, even if they’re really crappy tend to help any game a ton. Stellar Alien’s initial release didn’t include any animations for Starbli (or anything really). He was just a static image through the entire gameplay. To begin clearing the stench of an amateur-feeling in your game, taking the time to include sprite animations comes a long way.

How do you go about making sprite animations? Well, there’s so many methods I doubt I’d be able to list them all. Everyone has their own workflow for how they get their sprite animations done. Some use Adobe Flash, others will hand draw every single animation frame.

For me, I already had experience working with Adobe After Effects for video composting. After Effects has some fairly decent keyframing abilities while allowing me to import my sprite’s PSDs and animate them on the fly. Once I am done animating, I could just export composition to a PNG sequence and play the sprite sheet in JavaScript. It’s an efficient workflow for me. I suppose I could do the same thing in Flash, but I find After Effects surprisingly more intuitive than Flash for keyframe animations, even though AE wasn’t initially intended for sprite animations.

So yeah, After Effects for sprite animations is pretty sweet, especially if you’re already comfortable with the program. There’s more updates in this new version of Stellar Alien that I will talk about more in detail in a few weeks, stay tuned!

Let’s try: Pixi.js – Stellar Combat Updates

Alright so there has been a lot of changes to Stellar Combat’s user interface, along with lots of code refactoring. But I’m most excited about the GUI changes. The game is starting to feel really slick and responsive as I’ve also added a lot of tweens/animations to the interface.

Compare the old interface with the new:

Old:

Screenshot_2014-03-09-18-39-11

New:

Screenshot_2014-06-25-17-30-00[1]

I think it looks better, right? Leave a comment and let me know.

But wait, the game was kind of running poorly

I wasn’t satisfied with the game’s performance after many attempts trying to get the FPS to not drop down significantly for long periods of time. The bottleneck seemed to be my rendering code. I use the canvas API and tried to optimize the rendering code but the FPS still gets slaughtered down quite a bit after a few matches. There were a couple of other optimizations I could’ve done but I’ve been taken away by the crazy amount of work this game needs other than speedy rendering code. (I’m one person, and I still have a life outside of making games!)

Atlas, a beautiful Pixi comes to the rescue!

I’ve decided to try out pixi.js, a 2D WebGL renderer. The API was simple enough and I really like that the maintainer of the project tries to keep pixi.js strictly a rendering engine. I feel like that keeps the project focused on doing one thing great and that’s rendering. So far I’m liking pixi.js a lot but I’m not finished with adding pixi.js to all of the game’s scenes so I’m not sure if I will get the performance improvement I’m looking for. I’ll do another post later this week to let you know. Either way, it’s nice to have the rendering code abstracted away from me so I can focus on perfecting the networking code!

Stellar Alien Android Update v1.0.2

Stellar Alien v1.0.2 patches several bugs that have been crawling around for a while now. But they’re squashed! There’s also a new share button after you complete your level to share your scores. Using CocoonJS’s socal extenstion, the browser-based code I used for the Facebook API didn’t need modification while migrating to the mobile application. Good stuff.

Update summary:

Version 1.0.2:
-Now brag to your friends on Facebook about beating your high score! You can share your score on Facebook with the new Facebook intergration.
-Fixed bug causing game credits not to stay on the screen.
-There should be a noticeable performance increase.
-Several bug fixes

_____________________________

In other news, I’ve been hacking on my multiplayer game using WebSockets the past few days. Hopefully after I squash these bugs I can give a preview and share some of the networking issues I’ve faced so far.

Lies Your JavaScript Haters Told You

After 18 years, It’s a bit hard to believe that JavaScript expanded so much. From what seemed like a little toy language that appeared in 1995 that could add interactivity to Netscape’s web browser, to the concept of “AJAX” that some say revived the web in 2005, to the HTML5 specfication providing powerful APIs for JavaScript and fast JavaScript implementations popping up since 2009…

JavaScript has shaped up to be quite a decent tool.

“Or maybe JavaScript is just to get something done fast and never look at it again, because JavaScript is just crap.”

That quote just grinds my gears, and I’m the one who wrote it! But it’s commonly said by someone who usually has some gross misconceptions about the JavaScript programming language, even after many years of widespread use, with no sign of the popularity ever dying down. And note that I’m not trying to say that JavaScript is perfect, every language has its faults and JavaScript is by far no exception. I could get some buddies and we could write a book on how much we hate writing and reading PHP.

But if you’re gonna write JavaScript, let’s make sure you don’t have some of the biggest misconceptions about the language in your head, so you can confidently write software.

“Dude, JavaScript is just Java’s little brother.”

Oh yeah, you saw this one coming. Some people reading this might be thinking “How can people still think that?”, but it turns out an overwhelming amount of people do think JavaScript is a smaller, simpler version of Java. Especially newcomers. But it’s simply not true.

JavaScript is not Java’s little brother, it is not Java’s sister, it is not Java’s Cousin, it is not Java’s second cousin, it is not related to Java in anyway besides the unfortunate fact it has “Java” in its name. and I must clear up this insane misconception before anything else, because many of the misconceptions I’m about to correct are directly related to this one.

And so if JavaScript has hardly any relation to Java besides them both inheriting C’s syntax, why does it have Java in its name then?

The answer is that it was probably a marketing ploy. At the time when JavaScript was designed over at NetScape by Brendan Eich, the fellas at NetScape asked Eich to design another programming language for web scripting to rival the Java Programming Language, as Java Applets were taking the web by storm at that time. (which you can see today, JavaScript actually won the resulting battle of the languages of the web)

Eich decided he would want to make a functional programming language, with semantics similar to Scheme and with object oriented programming inspired by Self Programming Language. But Netscape also requested Eich to make it “look like Java” so other programmers can easily adapt to it.

While Eich did successfully make JavaScript look like Java, he also decided he wanted to be sneaky and keep all the juicy traits derived from Scheme and Self, which in my personal opinion, are some of the best parts of JavaScript.

As a result, JavaScript is now a dynamically typed, prototype-based object oriented,  functional programming language with syntax that looks like C…Basically, JavaScript is a little confused and you must understand this to confidently write software in it.

May I also add that technically, we should be referring to JavaScript as ECMAScript, the name it was given since the language became an ECMA Standard. But the name hasn’t really caught on much, mainly because I think everyone else thinks it’s a lame name I guess. JavaScript is more known to the masses. And if it helps, consider JavaScript, JScript, and ActionScript as “implementations” of the ECMAScript standard.

“Javascript performance is too slow for games.”

So when I tell someone on the Internet about finishing my first game Stellar Alien in JavaScript, I can see their faces of horror and disgust through the text they respond with, often reading “JavaScript? That’s for scripting web pages, it’s far too slow for any real games”, or something like that.

The performance of JavaScript in general is determined by how fast the JavaScript engine your user is running is, and the past few years the performance of these JavaScript engines have increased greatly. Consider Google’s V8 engine, which is used in Chromium and Node.JS. V8 compiles your JavaScript code into optimized native machine code, unlike JavaScript engines in the past that simply interpreted JS code. V8 also tries to optimize the compiled machine code at runtime as well, dynamically. As a result, JS is a lot more faster these days, with speeds close to Java 7 according to some benchmarks.

So you may be thinking, “Great, V8 is fast. But what about IE, Firefox, and Safari, which don’t use V8?”

Well it turns out just about… all of them use a similar technique V8 uses. In fact, SpiderMonkey, the JavaScript engine Firefox uses is often shown to beat V8 in benchmarks as Spidermonkey uses a JIT Compiler to compile your JavaScript into native machine code. Safari’s Nitro JavaScript engine also compiles your JavaScript into native machine code, and so does Microsoft’s Chakra JavaScript engine used in IE since version 9.

Okay, I think I made it pretty clear that while JavaScript is delivered in plain text, it still gets JIT compiled by JavaScript engines into native machine code. But how well does JavaScript handle graphics? I mean, the performance can’t be that good since it’s running in the browser, right?

I’d probably agree with that statement in 2009, when most browsers used the Software Rasterizer for HTML5 canvas. Using the CPU/Software for the graphic calls will definitely be slow. If JavaScript is going to have any hopes of being a choice for game development it needs hardware acceleration. And it does today, since a few years now.

HTML5 canvas is hardware accelerated by modern browsers now, notably Chromium/Chrome, Safari, Opera, IE9, and Firefox. So the performance increased drastically now that it runs on the system’s GPU. Microsoft did a great job with their hardware accelerated canvas in IE9, because under the hood it uses DirectX for rendering. I’ve even noticed my game running faster in IE9 than Chrome. Also, don’t forget HTML5 canvas is a relatively low-level drawing API. It leaves a lot of stuff for you to do on your own that will drastically increase performance. See this article about implementing dirty rectangles in your game, and also about using multiple canvases (which helps A LOT and leads to the concept of having “layers”).

Let’s not forget about WebGL, the JavaScript implementation of OpenGL. WebGL has been performing pretty well so far, and will be the lowest level you can get as far as graphic APIs go in JavaScript. We also should remember WebGL is actually a 2D drawing API (that’s also capable of doing 3D of course with a bit of Linear Algebra) so consider it as a second choice for when deciding on a 2D rendering solution for your HTML5/JavaScript game!

“JavaScript has broken variable scoping, or none at all!”

So what’s the deal with JavaScript’s scoping? If you take this snippet for example:

Well that was weird. The next question is “Does JavaScript even have variable scoping?”. I’m not going to lie, the code snippet above suggests “no”, JavaScript does not having variable scoping as you would see it in Java or C, which have something commonly known as “block scope”. But as we established a few misconceptions ago, JavaScript isn’t anything like C or Java and just because you know those programming languages doesn’t necessarily man you know much about JavaScript.

JavaScript doesn’t have block scope which is commonly seen in programming languages that have C-like syntax. JavaScript has something called “function scope” rather than block scope.

To fully understand, let’s see this code snippet here:

Does it make a bit more sense now? There is no block scope in JavaScript, but there is function scope. This simply means that variables declared in functions using the “var” statement can only be accessed within that function. Variables declared in blocks of code like an if statement are added to the global namespace. That’s why we were able to log “string” when it was declared within the if statement block.

Knowing this about JavaScript’s variable scoping, you can create private data that cannot be modified by another’s code by encapsulating the data in a function, and many other interesting code patterns. See the popular Module Pattern.

Final Thought

I use JavaScript because it’s a very expressive programming language and I like its dynamic nature. It feels very loose and free and It’s the language I know best.

Like any other programming language, JavaScript has flaws and its initial poisition as “that little language that thinks it can beat Java in the fight for interactive web” leaves many programmers skeptical that JavaScript can be used today to write good software. And it’s different from what many are used to programming in, so naturally people will be hesitiant to write software in it. What I think is the bigger issue is how JavaScript basically lies to the programmer. The language dressed in a C-style syntax, but as you write programs in the language and undress it, you’ll find semantics derived from Scheme and Self.