Dev Blog 21 - I Actually Wonder If We Have Any Kind Of Character Limit For The Titles Of These Posts. Now Is As Good A Time As Any For Me To Find Out, I Guess - And Yes, I Am Capitalizing Everything Here Manually, We Don't Have Some Kind Of Auto Formatting To Do It All For Us. I Know It Isn't Correct Title Case, But I Do It Like This Because I Think It's Funny, So Get Off My Back

Have you ever seen a nonogram before?

nonogram

It’s a simple, yet satisfying kind of puzzle to solve. You’ll be familiar with it if you’ve ever played Picross!

I’ve been surprisingly obsessed with them for the past week or so.

big nonogram

I wonder if I can find some way to incorporate a nonogram into a level. Yes, I can see it now… invisible floors, aligned with the blocks of the puzzle…

Wait, that’s stupid. Nevermind.

Let’s jump into the update!

Art, art, art.

desert ruins

heavenly chamber

terror grounds

The stage backgrounds get better and better each day. The incredibly skilled artists from Skymap have allowed me to dedicate my time to LEVEL DESIGN!

Speaking of level design… I actually want to level with you all here.

We’re going to be showcasing far fewer new levels from here on out.

A LOT of levels have been spoiled here in the dev blogs, and it would be kind of a bummer if we told you about EVERYTHING we were going to have! There ought to be some surprises. But with the pace picking up in so many other ways, we can surely still fill the dev blog out with plenty of awesome content.

For example, look, guys, look!! Our greatest accomplishment, SEESAWS!!!

seesaws

…Well, actually, we just got started on that. We’re still in the refactor, but approaching a playable state again! And we’re at the point where we can start implementing new mechanics for playtesting purposes. Soon, you will hopefully get to see me playtest some of the fancy new levels that I’ve been showcasing and unable to play.

Moving on, would you like to see what CraftedCart wrote for us in this blog? Because I sure would!


Un-modding Unreal Engine

One of the things we did quite a while ago was modify Unreal Engine a bit to use SDL2 on Windows to handle controller inputs - the reason for this being that Unreal only handles controllers that make use of “XInput”, whereas we wanted to support “DirectInput” as well such that a wider range of controllers will work with the game.

A quick-ish primer on XInput and DirectInput

You’ve probably heard of “DirectX” before - it’s a collection of code libraries and APIs provided by Microsoft to handle various multimedia tasks. Most likely you’ll be familiar with DirectX as that thing games need in order to render frames, but that’s just one component of DirectX: Direct3D.

Anyways, DirectInput is a library that’s been in DirectX since version 1 in 1995 - you can use it to get a list of connected controllers/joysticks, figure out what joysticks/buttons they have, and take it from there.

XInput came along in 2005 as a new way to handle controller devices. While perhaps easier to work with (mostly in the sense that you don’t have to deal with input mappings any more), it’s a fair bit more restrictive about what it supports - most notably: XInput seems to revolve around the idea of every controller looking kinda similar to an Xbox one. It’s still not too hard to find controllers today that don’t support XInput as well: take the DualShock 4 for example - that only works with DirectInput.

So… despite Microsoft’s lack of DirectInput support (it’s deprecated now!), we still consider it important to support controllers that don’t look like an Xbox one. SDL2 is an interface I’m familiar with and nicely wraps up both DirectInput and XInput into an easy to use API (and with SDL2 being cross-platform, if we run into similar “not-all-controllers-work” situations on macOS/Linux, it wouldn’t be too hard to use SDL2 for those platforms too).

Our implementation

When I first went about implementing this, I figured it’d be nifty to modify the engine for it. Oh if I modify the engine, I can hook SDL2 input right into Unreal’s input system - wouldn’t that be neat?

Weeelll that never happened. SDL2 support was added to the engine but I just wired the game to grab controller inputs directly from there instead of routing anything through Unreal’s input. Besides, I’m, not sure how that’d even work given it seems Unreal doesn’t support arbitrarily shaped controllers in its input mappings.

What ended up happening is the controller code ended up being a big source of crashes that I was always hesitant to look in to, since modifying it often times would require me to recompile half of the entire engine - safe to say, that is not a quick process.

So… just a couple of days ago I trashed the Unreal Engine install on my Windows box and downloaded a clean copy right from the Epic launcher - one without our modifications. A new plugin was created and I ported over all the modifications I made to the engine over to there. A little bit of initialization/shutdown glue later, aaand the game now builds with a stock engine! That should also help with debugging crashes when it won’t take an hour and a half to recompile changes.

And Brandon can now hush about builds taking so long since you don’t need to compile the whole engine any more. :)


Before I go, I’ll leave you with a secret, just between you and me: I think emojis are stupid. Write an emoticon instead :)

Thanks for reading, and see you in July.