RocketTux: Download and Play Like a Normal Program!

Yup, you no longer need a master’s degree in Compu Fu to play the game! How about that, eh? 🙂

Thanks to the mighty kind folks who created Node JS and NW.js, I was able to package the open source Chromium web browser along with the game, allowing it function like any other Windows or Linux program. Simply download the zip file, extract it, and run the game from its folder!

20MB of game data, 185MB of web browser based “game engine”…

It’s important to note that I am still very much developing the game, so I have yet to implement all of the features and functionality. That said, I have completed the collecting of coins and items, and all the level themes are unlocked for testing, so there is fun to be had. There’s a video at the bottom of this post where I demonstrate playing this part of the game. If you have a GitHub account, feel free to post any issues you find with the game, otherwise you can share your feedback in an email.

Download and Play
Windows 7/8/10: 64 Bit, 32 Bit
Linux: 64 Bit, 32 Bit
Previous Releases

Installation & Requirements
Download the file for your operating system, extract it, open the created folder, and run RocketTux.exe or RocketTux, as you would any other Windows or Linux program. The game should play well on any recent PC/laptop/Chromebook that has hardware accelerated graphics, 2GB RAM, and a dual core CPU. To give you an idea, it’s a little slow my old Core2 Q8200 quad core desktop that has 8GB of DDR2 RAM and a 1GB Nvidia Geforce 450 graphics card, yet it plays great on my Intel based Chromebooks. See this document for help with running RocketTux on a Chromebook.

Currently I am working on completing all of the level sections for bump up to version 0.5.0, as I just recently completed the sprite sheet (save for room I left for minor details I may find I want later. I can be so OCD…). These are actually really fun and easy to create using the Tiled editor, so time and inspiration are all that are holding up release 0.5.0!

I will create a new download zip file for each major “point release”, while the master branch of the GitHub repository will remain in step with my development. You should be able to clone the repo and build an up to date release at any time, as I intentionally won’t push commit changes that break the game. Along those lines, there won’t be any further changes to the file structure of the game, apart from adding new music and possibly new/different sound effects, so it should continue to “just work” for all of us. Yay! 🙂


Recent Video:

Older Video:

JavaScript: Flipping 9 Pages of 25 Icons in Groups of 5

I tried to make the title relevant to the general JavaScript programmer, but this is something that I recently had to do for RocketTux, so that will be the context of the post. But, what the heck does that title even mean? Well, have a look at this picture…

As you can see, I have highlighted 5 rows of 5 icons. Those are the 25 icons I needed to manage, conveniently stored in a PhaserJS sprite group so I can easily show/hide them with a single groupName.visible = true/false; and so on. Putting the icons into a single group is WAY easier to manage than declaring each icon as its own sprite, provided one can wrangle the logic involved. Let me tell ya, in this case, wranglin’ these bits was like wrestlin’ an angry bull in a well greased pan! In fact, I found it immensely helpful to break out the o’l pencil and lined paper to sort it all out!

The window is always on the screen, just hidden until the user clicks the button to “open” the window. This allows the initial sprites to be reused by positioning them one time and later simply flipping the “tile” they point to on the sprite sheet. So, when the user clicks the Next or Back buttons, the logic only needs to pull data from tables (arrays) and update some variables. In this case, here is the table of data for what icons are used per group of five icons,

You may notice that there are 45 groups of 4 numbers. That’s because the cost for these 45 different “Cubimals” always involves a certain amount of coins and then various values of 4 other items. That being the case, I don’t need to worry about changing the first icon in each row, so why bother wasting data by having an entry for it in the icon table.

Finally, to fit all 45 of the Cubimals on the screen, I needed to divide them into 9 “pages” that the user can flip through. What the user sees as “pages” are in reality a bunch of mental gymnastics that happen in the background, as you can see in the function below that fills in the data when the window is opened and the back/next buttons are pressed.

By a country mile, the hardest part of writing this function was the management of the //Cost Icons, which are the subject of this blog post. Having a look at how this part of the function works, it basically goes through each of the 25 icons and updates them, with the exception of the ones for the coins in positions 0, 5, 10, 15, and 20. It pulls the correct group icons per Cubimal based on the cubPos in RocketTux.cubCostIcons[cubPos][mod – 1] and individual icons based on mod – 1.

That’s all fine and dandy, but there are some “gotcha ya!”s in there, such as dealing with the fact that we need the 0 position in the RocketTux.cubCostIcons table as well as the rest of the positions. This meant that I couldn’t just do currentPage * cubPos, because the currentPage also starts at 0 – doing this would fill every Cubimal’s item icons on the first page with the ones from the first entry in the RocketTux.cubCostIcons table. That’s no good! Starting currentPage at 1 would complicate the matter of pulling data from the description and quantity tables, while also overshooting the RocketTux.cubCostIcons table length by 1, so I had to work with it as starting from 0.

To fix that problem, outside of the loop I had to put a condition “if the current page is 0, then cubPos should also be 0, otherwise cubPos should be currentPage * 5”, as you can see in the highlighted area below,

With that wrinkle ironed out, the for loop will pull and place the data correctly!

This is the kind of thing that probably seems very simple many programmers, but can trip up we hobbyists. It’s also the type of problem that is hard to find examples for, because it’s woefully difficult to describe and thus equally difficult to search for on the web. Hopefully this post will serve as at least one way a person can do this kind of thing!

Importantly, when you look at the code you can see that the functionality to which I am referring is written in plain JavaScript (as apposed to PhaserJS or another API/Framework), as it’s really just a matter of manipulating tabular data. This means the concepts are applicable to a general audience, which is nice.

Anyway, hope this was helpful!

Ps. Cubimals were part of a game called Glitch, created by Tiny Speck. When they shut down the game, Tiny Speck was kind enough to release all the artwork for the game into the public domain!

RocketTux: My Development Workflow

RocketTux is a web browser game based on the Phaser JavaScript/HTML5 framework, consequently the overall process of making the game isn’t the subject of detailed online tutorials. To fill in this gap, I decided to make the following video that demonstrates my general workflow when developing the game.

RocketTux is developed using an AMD FX-8320 based x86 64Bit PC running Linux Mint 17.3, using the following software:

Google Chrome (Runtime/”Engine”)
Phaser (Pixi) JavaScript framework
SlickUI framework
GIMP (graphics)
Tiled (level section layouts)
Audacity (effects and sound editing)
Sunvox (music production)
Git/GitHub (version control)
Based on artwork from SuperTux and Glitch.

You can download the source code and read the documentation on Github.

Introducing… RocketTux!

I’ve been working on this open source, HTML5/WebGL game since the spring of 2017. I had planned on being much further along with it by now, but I got distracted by other projects… Anyhow, it has actually been in a playable state for a while, so I thought it was high time that I added it my website!

You can read more about it on the RocketTux page under the “My Games” menu option or just click this link to visit the page. All the links and details are there, including a video walk through of the game.


Programming: The Importance of The Groove

Every good post starts with a deep breath and a long exhale, right?

Most people have their own workflow and accomplish their goals at a pace that is right for them. That seems to be the natural way of things. Personally, I am the kind of worker who excels at stepping onto the highway and driving nonstop to the destination, fuel be damned! This is especially true of my programming projects, for the simple reason that in order to make a complex piece of software, one essentially needs to load all those complexities into his brain and move them around, kind of like one of those jumbled up picture squares that the inevitable health conscious neighbour would give us on Halloween instead of candy. Manipulating all of that information and knowing the constructs and concepts inside and out is “The Groove” and, at least for me, it is the most important aspect of successful programming.

In May of this year I started working on a new project, RocketTux, with the idea that it would be a stepping stone toward creating HTML5/JavaScript games rather than slogging away at C++/Lua based MMO emulator mods or Python/Blender related projects. I put a fair amount of effort into creating a simple, yet effective workflow, using tools that “just work” in Linux Mint 17.3 and that I am already comfortable with. All was going well and I made quite a bit of progress until… Updates to my Legend of Hondo project and helping out with the Tarkin II project happened. Hello mental train wreck, how nice of you to obliterate my house of awesome!

Now, a couple months hence, I am sitting here picking through the rubble of my RocketTux groove, essentially relearning both the software framework and my workflow all over again. And, it sucks. And… it’s my fault.

Losing the groove due to dividing my time between multiple projects is 100% the result of poor discipline on my part. I am self aware, I know how I work, I know how I create, I know how I design… Most importantly, I know better. Truly, I do. For me to actually achieve a goal, I need to work at it exclusively until the damned thing is complete!

Now, this doesn’t mean that I must work on a project at the expense of everything else in my life. Rather, it simply means that I need to confine my thinking, pondering, dreaming, designing, and other cognitive processes used for hobbies to a single project at a time. Focusing on one project is a lot like reading a novel, where you can read a few chapters, put the book down and go to work, then read some more when you get home later, easily picking up from where you left off, because the story is fresh in your mind. Because… you were “in the groove”!

“Respect the groove, reward the world!” – words I need to live by! And you can quote me on that. 🙂

Now with that said, as much as I would dearly like to hang up my SWG/SWGEmu modding hat for good, I started something with Bio-Engineering that I would like to finish. It’s something for me, by me, and one day I might have some fun using it! Unfortunately, in typical SWG/SWGEmu fashion, some of the work is super duper whooper tedious (14+ client/server files to add a single new BE pet…), which translates into “will take an ass load of time, while also being very, very boring in the process”, so I have been reluctant to continue on with it; I WANT to be working on RocketTux, but I lost that groove and replaced it with the SWGEmu modding groove again. *sigh* So, I may as well “go with it” and finish the Bio-Engineer mods that I started. Once they are finished though, I am hanging up my Legend of Hondo hat indefinitely and yes, that means I will not finish the project. Honestly, I would rather create HTML5/JavaScript side scroller games, because they are both more accessible to end users and astonishingly more enjoyable to develop.