NOTE: I wont be here for most of tomorrow, so I decided that I will use half of today, and half of tomorrow, and that will still end up as 48 hours. I hope that is allowed.

NOTE2: I will post the post explaining the game tomorrow, I just wanted to log my progress for today before I forget.

Alternate title for this post: “I FINALLY SQUASHED THE BUG!!!!!111!”, or “I am so bad I have to resort to unconventional means”.

I finally fixed the bug I was having with SpriteBatches, on my Mini Ludum Dare 48 game: Death Plot. See, I had a convoluted set up with a Sprite Class for general sprites doing the drawing for my player class. I then had the Player class call that drawing function, and then the Gameplay screen class, which is my main class, call the player one.
Much to my chagrin however, I was getting null exception errors, due to me supposedly not initializing the SpriteBatch using new. However, I was actually doing that.
Long story short, after trying multiple things to fix it, like initializing the SpriteBatch in the Game class, in LoadContent, in Draw, and pretty much everywhere, it didn’t work. I then scoured the internet for help to no avail.
So, what did I do to fix this? I moved the player drawing to the Gamplay screen class. From there it called Player.Position as a parameter to the drawing. Everything related to the player is in Player, except the drawing. It seems to be working perfectly fine now.
Anyway, I am tired, and due to school, I haven’t had much time. I got a movement system implemented, title screen art, game menus, and one of my two player controlled objects. I’ll finish the rest, as well as a design post explaining this game, tomorrow.

The Title Screen.

Follow my Twitter (Kerinova_xeon) for more about my development process.

Tags: ,

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]