I moved to a new URL! Check it out!

Dev Log: Otter Updates

Dev Log: Otter Updates
Over the past week or so I've been doing some various changes to Otter as I'm still trying to figure out the best way to add Entities to Scenes, and Components to Entities. Currently in the dev branch an Entity's Added function is not called until the Entity is actually added to the scene at the beginning of the next update, and now for Components their Added function is not called until it is actually added to the Entity which can occur at the start of each update.

For now I just did some minor updates and changes

* Changed how Entity.IsInScene works. Now IsInScene will return true if the Entity is in a scene, or queued up to be added to a scene.

* Added SetColor to the Color class. This is useful for changing all of the values on a color especially when using another color as the source values. Mostly used in cases where you don't want to Copy and create a new Color instance.

* Finally figured out how to get colliders to have separate constructors when using Enums as tags. Now you should be able to specify Enums as tags in the constructors of all colliders.

Doodle Post

Image

Moving the Console Window

Moving the Console Window
Just wanted to share a quick tidbit of code that's useful for making a game with a console window for debug information. A lot of times I want to launch my game and have the console window on a different monitor, or just out of the way in general. It gets super annoying to have to move it over every time I launch a game for debugging, but then I found that I can move it with programming!

I'm going to be honest and say I don't totally understand how this works. It uses DllImport to get some functions from the user32.dll in Windows and then uses those to move the window around... I think? It should be noted that this probably only works for Windows.
class Program {
static void Main(string[] args) {
IntPtr handle = FindWindowByCaption(IntPtr.Zero, Console.Title);
MoveWindow(handle, -700, 50, 1000, 1100, true);

Core.Game.Start(); // Start the Otter game
}

[DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]
public static extern IntPtr FindWindowByCaption(IntPtr zeroOnly, string lpWindowName);

[DllImport("user32.dll", SetLastError = true)]
internal static extern bool MoveWindow(IntPtr hwnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
}

I use functions to find the console window by it's name which can be accessed through the Console class in .net, and move the window by its handle. I give it a negative X coordinate because that pushes it onto my left monitor, so now every time I launch the game my console window appears and immediately gets pushed over to the left monitor. Neat!

Doodle Post

Image

Doodle Post

Image

Dev Log: Board Game Stuff

Dev Log: Board Game Stuff
Work continues a little bit on a board game prototype with some local Phoenix developer friends. Dave ended up making some amazing tokens for us to prototype with which makes the game feel a billion times more fun. Every week we have a play test and it seems like we're narrowing in on something that's actually a playable game.

Image


We've been using Google Sheets and nanDECK to prototype and print out our cards, and then sticking them into sleeves along with Magic cards to play with. I think having a total break from making games with code and complex art assets has been pretty fun -- it's a totally different experience than making a video game, and getting better at board/tabletop game design is something I really want to work towards.

Image


I'll get back to my main project soon I promise! (but now holiday travel season is upon us and that puts a giant wrench in everything too.)