Archive for the “Code” Category


The frequency of these posts is ridiculous. Oh well.

In this latest version, I’ve fixed the swapping of gems, and added in where the explosion things should be. The video is worth watching due to the SURPRISE ENDING!


This video also contains the game’s theme music, “The Curse of Captain Morgan” by Alestorm. Used with permission from t’band!

I’ve also decided against using the mouse for input, it’s just too much effort to code. Instead, you can use either keyboard or xbox 360 pad.

The scoring in this will be different to PopCap’s original Bejeweled; instead of a straight-up score, your score will be generated based on your “points per second”, and each game will last between 2 and 5 minutes, depending on how testing goes in terms of how long it takes to exhaust the number of moves you have. Another difference between this and PopCap’s will be that you can swap a gem with the one next to it, even if it doesn’t create a row of 3. This is mainly because I’m too lazy to write the verification code for it. Oh lawdy.

It’s my plan to have the game playable by Sunday, thereafter it’ll just be polishing, adding menu screens, the help screen, et al. Shouldn’t take as much as the “alloted” 40 hours.

Comments 1 Comment »

Oh lawdy, I have no idea what’s going on here:

I made the particle thingy better though, I accidentally had coin.velocity.Y = MathHelper.Clamp(coin.velocity.Y, 0, 10) which was silly, it’s now -3, 10, with gravity set to 1px/frame^2 so the coins jump up initially which looks way cool.

Comments 1 Comment »

I’ve just started porting the 447 lines of code I’ve written so far for my Advanced Higher computing project from C++ to C#. It shouldn’t be too much work, especially since the languages are so similar anyway, and 450 lines really isn’t a lot of code in the first place. The reason for this is that I’ve been teaching myself C# over the past week and have fallen in love with it. Not having to worry about my own memory management code is lovely, lists are lovely, the language is just lovely. Also, C# has Microsoft’s wonderful XNA framework, which is just lovely to work with. Lovely.

So, build No. 33 (latest) of the C++ version looks like this, anyway:

TharBeJewels build 0033.

TharBeJewels build 0033.

This will also allow me to finish the damned thing, and much fasted than I would be able to in C++.

Comments No Comments »

Introducing XVib. Oh dear.

Comments No Comments »

more soon.

*fades out like a ninja*

Comments 1 Comment »

I’m writing a basic platformer using DirectX and Box2D. It’s not going to be anything flashy, just a test bed for a potential future project that will probably never happen.

So far I’ve made a really basic mapping system, the map is declared as a 2D array, 32×32. I decided to do it like this as it’s easy to impliment, however it certainly has its drawbacks.

I’m going to try to (one I get a player and an enemy in the game world) make a weapon that causes explosions because explosions are cool.

Went back to school on Tuesday, as predicted, is shite. I hate school so very much.

Applying for a job @ teh library lawl.

etc.

Comments No Comments »

So I reckon I’ll write myself a simple wrapper for Box2D that renders with DirectX. It shouldn’t bee too hard I guess.

So, that potentially incoming.

Comments No Comments »

According to the changelog:

1.0: Current Version
Fixed various misc bugs
CMD doesn’t open every time a CPL file is launched (woot!).
Added: TaskMan, DeviceMan, Display Properties, and IP Config.
Changed some UI stuff
Added CMD and TaskMan to the Taskbar menu.

Download: zip | 7zip | rar

Have fun ;)

Comments 2 Comments »

Over the last day or so i’ve been working on a small application called Enablr; basically it will open CMD and a few WinXP Control panel functions directly without having to navigate them, thus removing the need to access the control panel. “Why make that? you can get to the controll panel you crazy fool!” you may ask, well, I made this for school, where we’re allowed access to very little.

For this project, I’m not releasing the source code, and the Binary is licenced under Creative Commons Sharealike licence (give the app to your friends! :D!).

Enablr Screenshot

This release only has a couple of options as it’s merely a proof of concept release, sometime soon there will be a full release with alot more RAW POWER :). I recomend you read the readme. You’ll need the .NET framework version >= 1.1 in order to run this.

Latest Version

Comments 6 Comments »

I’ve been playing with WordPress alot over the last couple of days; It’s certainly my faviourite blogging software for those who are too lazy to write their own.

Once great thing wordpress has is the Sidebar Widgets plugin. It’s a really simple way to arange things in your sidebar, and you can download/make and add more widgets, too. Well anyway, for the more code-addicted of us, there’s a Sidebar Widgets API (Application Programming Interface), so anyone who knows enough PHP can write their own Widgets.

Today I’ve coded my first Widget (I’ll release it later), What it does is gets a random quote from bash.org and displays it in the side bar. It’s perhaps not the ideal place to put bash.org quotes, as the sidebar is usually quite thin, and doesn’t have the space to display the quote (The reason I don’t have the widget in use here :)) however I couldn’t think of anything else to write. I’ll probably write an AudioScrobler parser/displayerer thing for the sidebar too, I know it’s been done allready, but coding it yourself is alot more cool :).

Comments No Comments »