Posts Tagged “jewels”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!
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. Oh lawdy, I have no idea what’s going on here:
Jan
01
2009
Thar Be Jewels! part 2Posted by z3rb in Project, tags: c++, Code, csharp, jewels, ProjectFinished 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: 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. This will also allow me to finish the damned thing, and much fasted than I would be able to in C++. |


Entries (RSS)