Posts Tagged “csharp”

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 »

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 »

Lists are so beautiful. They’re like… “whoah” and then I’m like “whoah” and then they’re like “Ok I know exactly what you want to do with your code now, I’ll go ahead and let you do it without getting in your way at all ^_^” and then you’re like “whoah”. Mental stuff.

Comments No Comments »