It figures!

Today I thought I would do a spot of programming. I decided to give the supplied windows form controls a wee try since my own code was not very fast. After some amount of research (along with a lengthy period of trial and error) I had some buttons (made from PictureBoxes) which looked just like my buttons with the same behavior, ie; images changing when up and down. I was pretty pleased because I maged to wire some events that allowed me to use just one event handler to change all button images. It was very cool.

Then I started messing about and dragged on in top of another.. hangon.. the transparency works but when the top control gets redrawn by windows.. it first erases a rectangle where it will be positioned.. and then draws its actual image! Arghhh!! After a lot more research (plus trial and error) I discover that you cannot truly make windows forms controls that can be overlapping with full transparency! There goes half a day πŸ˜€

The other half of the day was spent fucking about with PictureBoxes more. My new idea was to use a PictureBox again because they actually have 2 images.. a background image, and an actual image. I made a test and it looked all good.. until I started drawing int the thing! So it turns out that these things just don’t work as they should.. or at least the way I think they should.

There goes today and not a lot to show for it.

When we get handed out our assignment for real this coming week I’ll ask the tutor if we are able to use anything like WPF (Windows Presentation Foundation) which from my reading today.. fixes all of those nasty issues that I’ve been facing.. but I’m pretty sure there will be another pile of microsoft dogshit to step in no matter what I use.

I’m really getting better at c# though and at the end of the day.. that’s what it’s all about πŸ™‚


What the proverbial…

I worked on my programming assignment again today. I spent quite a bit of time trying to get bitmaps rotating but gave up because it’s just so sloooow! I could also not get anchor points (handling the bitmap by it’s center) working unless the bitmap was positioned at the top left of the screen.

I whipped up some test images and started to get them moving about the forms area and oh my.. the performance is total shit! Even just a couple of moving objects causes it to frame out so there won’t be much animation happening.. and I wanted particles and everything. After some thought there should only ever be two cards moving at any one time in the game so that will work.. albeit they will move about in a jerky manner πŸ˜‰

Oh well, I made Window, Button, and CheckBox classes today (yes another GUI framework LOL) and got those working. I have code to test a couple of hard coded buttons and checkboxes and tomorrow I’ll add the code that manages clicks and event handling for an entire window.

When I was testing my sound code I discovered an interesting thing. When you play any windows SoundPlayer.. any other SoundPlayer stops! I guess that is totally logical because who in their right mind would ever want to play more than ONE FUCKING SOUND EFFECT?!?!?!

I should have guessed there would be more stupidity with windows SoundPlayers when I first started toying with them.. where I quickly discovered that they contain no functionality to pause, change volume, or change pitch. Again it’s pretty logical because who in their right mind would ever want to CHANGE THE FUCKING VOLUME OF A SOUND EFFECT?!?!?!

Ahh microsoft.. you really have outdone yourself this time πŸ˜€

The solution to my sound issue was to employ a Windows Media Player control that plays the music (of course my project has music!). That works pretty well and hey.. you can pause and change the volume of the music which is all good.

No Project Management or Systems Design and Analysis today.. I’m having way too much fun programming! I’ll have to spend some quality (hmm.. poor choice of word there) time on them very soon πŸ˜€

Project Management

Now that I have submitted my project charter (or brief) I am to begin work on my actual Project Plan, where I plan everything in detail. I was going to start on that today but umm.. I got sidetracked programming πŸ˜‰

I created a method that draws all of the sprites that are attached to the stage (snap again.. Gideros has one of those too!). The method isΒ  recursive so it draws all children of a particular sprite and that sprites children and so on until every sprite that is visible, has an image attached, and is in some way attached to the stage is drawn. I’m happy with this function.

I have added code so that each sprite can have opacity and basically now work like Gideros sprites where you just call setAlpha() to set the opacity of the sprite. I have some basic scaling implemented too and I’ll need that for card flipping in my assignment.

Over breakfast Claire said I should include my Antix Development splash screen but for that I’ll have to make images able to be rotated and handled by another anchor point than their top left pixel. I got the rotating working but am having a little trouble with the anchor points.. I’ll work on those tomorrow πŸ™‚

I feel that sometime tomorrow I’ll get to my Project Plan.. until then it’s programming, programming, and more programming. Can you guess what my favorite course at PolyTech is yet?


Hey, can you guess what I spent the days doing? Again? Yep, programming!

I am becoming more comfortable with c# and have been hacking away at my Intro to OOP assignment which in case I didn’t tell you before, is a card game. We don’t get the actual assignment handout until next week but it seems that the assignment is the same every year. We had a handout from last year and it looks pretty good.

In the handout there are some game suggestions and one of them is Memory.. where you place all of the cards face down randomly and select pairs until they are all gone. The player with the most pairs at the end of the game is the winner. In my opinion.. of all card games.. this is the most basic easy one to do.

I’m currently planning to make a game called Go Fish.. I’m sure you have all heard of that! If not then head over to this web page and have a read. I think the game has enough complexity to both challenge me and also impress the tutor (fingers crossed) with my newly found elite c# coding skillz! Speaking of those..

Today I revised the TexturePack class and recoded a lot of it. I’ve now created another class called TextureRegion and now instead of just storing Rectangles, the TexturePack stores a HashTable of TextureRegions.

Did I tell you about HashTables? Well they are like Gideros tables where you can just stuff things into it using a name as a key and the TextureRegion as the value. This makes it trivial to get a TextureRegion from a TexturePack because you just say like.. give me the TextureRegion that belongs to “myCoolImage.png” and it just magically appears for you! Magic! Oh.. I already said that πŸ˜€

I created a SoundBank class today also which is a lot like my Gideros one where it is a collection (actually.. a HashTable again because they are so fucking awesome!). What I discovered whilst creating this class is just how totally sucky Microsofts SoundPlayer class is! This thing can load, play, play looped, and stop a WAV file.. and that’s it! There’s no way to change the pitch or volume of the WAV file, and you can;t even pause and resume playing of it! What a useless effort Microsoft!

After today’s efforts I now have a windows form that I can draw non flickering graphics into at 30 frames per second. I’m pretty happy with how it is going but I’m sure it will all begin to unravel once I start to draw many graphics into the form every frame.. fingers crossed πŸ˜‰

I made a Sprite class today too and I need to expand that tomorrow and sort out the code to iterate through all Sprites and their Children, and their Children, and so on and so forth until they are all drawn to the form in the correct order. Should be fun πŸ™‚

Let’s not discuss the nightmare today that was the introduction in Systems Design of
“Interaction Sequence Diagrams”. Oh my!! I almost felt myself getting the urge to smash through the window and plummit to my death 3 floors below! Yes!! Those fucking thigngs are that bad! πŸ˜€


Today was a pretty good day in Introduction To Object Orientated Programming class. As the tutor was going through some code with the class I had basically written the rest of the program before he had started talking about it. I think I’m getting the hang of this C# stuff πŸ˜‰

I had Systems Analysis and Systems Design today too but they really were not very enjoyable.

This evening I started creating my assignment program for Intro to OOP and the first thing I created was.. a TexturePack class which operates just like the one from Gideros! Next on my list is a Sprite class πŸ˜‰


Today was Project Management lab and we were introduced to Microsoft Project 2016.. but really.. not in a good way. The tutor ran through a crash course on the projector that the class struggled to keep pace with and then.. it was off to do internet exercises.

Unfortunately the exercises were to put it mildly.. shit! The dates it used were fucked and then there were mistakes and omissions. Worst of all.. they were not beginner exercises at all! It appears the tutor had not reviewed the material before unleashing it on the hapless students.. which I am a member of!

Anyhoo I managed to struggle through it but on man.. I have to say.. please strangle with great glee anyone who added to the putrid code-base of that ugly fucking creation that is Microsoft Project! There’s fucking silly shit that has probably never been updated since Project 95! Man.. what a pain in the cunt to use!

Ahh well, I have the hang of some things and will hopefully be able to avoid the really shit stuff πŸ™‚

No House!

Today we learned that Leonie and Shelley missed out on another house. Man it’s a pain in the rear end for them! When we brought our house we certainly looked at a lot of crap places but the process of purchasing the house wasn’t too bad.. especially since nobody else was even interested in it πŸ˜€

Anyhoo, coffee group today, followed by a bit of Poe and then some school work (boo hiss) πŸ˜€