Posts Tagged “Code”

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 »

Finished porting what I had done so far for Thar Be Jewels from C++ to C#. It wasn’t as much work as I had expected, however I was forced to redesign the structure of the program into a more workable object-oriented one, which is good. I hope to keep to a standard of “Try not to write hacky shit code”. It’s been working so far.

So that took a couple of hours which included learning more about XNA and C# in general.

I also added a thing since I was bored that creates coins that fly drop from where you click. Eventually, this will be used for when you create a row of 3 gems, coins will drop from where the gems were. A purely visual thing, but it adds to the polish of the game so it’s relatively worthwhile. It works by creating a 2d vector for the position, and another for the velocity of the coin. Gravity is then added to the velocity.Y each tick. It works pretty well and looks relatively cool. Video:

Comments 1 Comment »

My new year’s resolution: To code, and release at least one piece of software every month during 2009. No matter how small, or how useless.

Stay tuned for me giving up on this sometime next month.

Comments No Comments »

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 »

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 »

Introducing, the one and only, the spectacular, the awesome, the…. something else that’s cool, PerthAcademy.net!

As I mentioned yesterday, my school’s new site was nearly ready to go live. Well, now it is :). I ordered the hosting at around 1PM today, and a few hours and a few (about 7) mugs of tea later, we’re now here! Comparing the old version of the website to the new one is much like comparing a small mouse to a Fararri; the later is simply better.

I would blog more fully about this, however my DVD just finished burning, and I hear Jack Bauer calling my name…

Comments 3 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 »