Pages

Friday, July 14, 2017

A friend asked me why he would want to be Mulletman? Who wouldn't want to be Mulletman? I quipped. But... who is Mulletman? he asked. And I thought for a second, Mulletman is more than a backup hero, he is more than the guy you call when Batman's sidekick Robin is busy. Sure, he doesn't manifest any super hero powers, he can't fly, but who can?

Everyone needs to know that Mulletman is more than his legacy hair style. Let me tell you about the man, Mulletman buys a lot of shoes, like seriously, a lot, because he wears his shoes out by kicking ass. Second, the blood on Mulletman's hands is never his own. And third, it's time to reveal his name, Hank Steel, and he is just an average hero from the 80's.

Thursday, June 15, 2017

The primary goal of this Tutorial is to introduce C# developers to SDL2 development. The secondary goal is to provide existing SDL and SDL2 developers with a SDL2+C# quick start guide. I recognize that this is pretty niche, which is why this might be the only tutorial on the subject that doesn’t require some fat middleware framework.

What does this tutorial demonstrate?

Using SDL2 with C# obviously, but, when it’s all over, you will have a window that can display images, play audio and accept input, and this is a great combination for game development.

What development tools am I using?

I am using Windows 7 with Visual Studio 2013, because that’s what I use, but don’t worry, my projects run on MonoDevelop and the mono runtime without modification.

What is SDL2?
“Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.”

*Important:Make sure that you force your application to run either 32bit or 64bit depending on the dll packages you download, otherwise you could get the following error: "System.BadImageFormatException".

Get Coding:

Once I do this, I don’t want to ever do it again, so I’ll be making an object that manages everything for me.

Now run your application, you should see your image being rendered in the top left corner. If not and there aren’t any errors, there are some causes, but most likely you made a typo in your image loading filepath.

Run your application, weird crash, something about vs host. Weird.
Go to your bin directory and run the compiled exe. Works fine. Weirder.
To fix this, go to your project settings, go to the Debug tab, and select “Enable native code debugging”, now your project will launch from the editor without error.

14. Now we have images and sound effects, but we need a way to input instructions. This can be done a lot of good and bad ways. We will do it the simplest way, well, sort of, it’s the flattest way. Writing a complete input system is way out of the scope of this tutorial, so I’ll demo simple gamepad input.

Inside of your core class, after you initialize Mix_OpenAudio, add the following.

SDL.SDL_InitSubSystem(SDL.SDL_INIT_GAMECONTROLLER);

NOTE* For those of you who have used SDL2before, I’m initializing the game controller as a subsystem rather than inside of the SDL_Init arguments, because adding the game controller mysteriously crashes SDL with the C# bindings and I’m not super interested in figuring out way, I’m satisfied with the work around.

Back inside your Program.cs’s main function.

After you loaded the sound, lets set the controller with the following.

IntPtr gc = SDL2.SDL.SDL_GameControllerOpen(0);

This function will use whatever controller you have at index 0, in my case, index 0 is the only controller I have plugged in.

If everything worked correctly, every time you press A, your ears are blasted with noise. Way to go.

-----

In conclusion, you now have a very compact C# SDL2 system capable of displaying images, playing audio and capturing gamepad input. If there are any problems, please feel free to post a comment.

... And if you scrolled to the bottom because you don’t like to read. I have attached a zipped project file. And, if that’s not enough, I have also attached a my LudumDare 38 Compo entry which would have seriously benefited from this tutorial, because for some crazy reason I decided to learn how to do all of this during a 48 hour game jam.

Wednesday, May 10, 2017

I forgot about my blog again. True Story. It reminds me of
my second, or maybe third, year at the University - A little over half way
through the semester I forgot about school, like seriously forgot, I was so totally
consumed with my projects that I didn’t even think about school, let alone go
to class. Weird. I know. So, long story short, I received an email from an instructor
reminding me of his class final, I about shit myself, thanks to that guy, I
didn’t miss any finals, and I passed all my classes.

FAQ.

What about Mulletman?
Mulletman and the Molemen, my Ludum Dare 38 Compo entry, is likely the final
Mulletman title.

Did you finish any games?
Yes, I finished a couple Mulletman games. Yes, I know, you haven’t played any
of them, but, trust me, it’s alright, you haven’t missed anything.

Did you release anything?
Nope, I suck at most things life related.

What have you been doing?
Making bad games and taking care of infants. Oh, and I replaced my carpet with
hardwood floors, so

I know how to do that now.

What are you going to do?
As for the future, I’m terrible with predictions, like, really bad.

What about new games?
Yeah, so, actually, that’s going really well. I dumped all “game development”
middleware, xna/unity… great choice, I wish I had done it years ago, like
almost ten years ago. I was a lot more productive before middleware.

I want to know about your new games, NOT your technology!
Oh, right.
I have been spending a lot of time on new designs. I think they are cool. Games
I would actually want to play. I’m working on a prototype cyberpunk rpg, it’s
edgy, it’s pixel-y, I like it. I want to release a demo before I actually
finish the game, something for people to play and give me feedback.

Sunday, November 30, 2014

The things I do for your love... So I finished Super Mulletman as planned, and it sucked. And that sucked. So I trashed all the levels, most of the enemies, rebuilt the player and swallowed my pride. Here is your first look at Super Mulletman (do over).

And for those of you die hard fans (are there any?)

Here is almost eight hours of me working. Sorry, no audio, twitch muted the audio, something about sharing the copyrighted music I was listening to.

Sunday, October 20, 2013

I forgot to tell you, my dedicated readers, that I made a new game. Bang, it's out there. It will be released on xbox live indie games some time in the next few days. Here is my full play through of the uncensored version. Maybe I'll make a real trailer a little later.

I have been looking into developing for the Wii U lately, I picked up a retail console, it's a nice device, I think it has a fantastic future, especially for developers.

However, my gamepad stopped working, dead, like RMA dead. It wouldn't charge, turn on, unplugging the battery had no effect.

Here is the deal, I think it's the AC Adapter, I think it's actually a smart charger, and for whatever reason, mine messed up while my device was plugged into it. I imagine if you are reading this post, it's because your gamepad doesn't work. Unplug your charger from both your gamepad and the wall socket, wait thirty seconds, plug the charger back into the wall and your gamepad. The power indicator should turn yellow and your device should turn on when you press the power button.