I moved to a new URL! Check it out!

posts tagged with: fna

Otter FNA Progress

Otter FNA Progress
Sorry for the huge gap of silence. I got back from Game Developers Conference at the beginning of the month and then some kind of super heavy depression hit me hard. I'm starting to crawl out of it and making some progress on things again. Starting to get really annoyed at my brain and will probably have to take this a little bit more seriously in the future. Maybe some kinda doctor can help me out or something. Anyway!...

One of the projects I'm spinning up more now is a new version of Otter that uses FNA. FNA is an open source implementation of the XNA framework. A lot of people seem to think that XNA is somehow dead but with the advancements of things like FNA and Monogame I don't believe that to be true at all. As long as Game Maker wont let me use C#, and as long as using Unity for 2d is a gigantic pain, I'll be sticking with my current plan of making my next game with FNA.

The beginnings of Otter FNA in a somewhat broken state can be found on Github. I'm migrating over from Bitbucket so that hopefully more people can contribute and discover Otter. I personally really like Mercurial and Bitbucket, but the bigger audience is definitely over on Github.

The framework is somewhat useable right now, but has a long way to go. It's missing a lot in the realms of graphics and collider types still as I port those over from Otter SFML as I need them. I'm going to be building it out along side a game project. More on this as it develops, but I don't have as much time as I usually do because of another secret project that I'm involved with.

Dev Log: FNA Tiles

Dev Log: FNA Tiles
Been working a little bit on getting tile maps set up in the FNA version of Otter along with a quick platforming movement test.

Image


I'm still wrestling with some issues in FNA that I'm sure are totally my fault, but so far things have been working pretty nicely. Understanding the whole sprite batch drawing thing is still a little bit tricky for me, and I'm hoping that I can wrangle my familiar engine api into something that doesnt perform like garbage. Trying to manage when I should be calling End() and Begin() is a little bit more challenging than I hoped, and I don't want to just be calling them both for every single draw if I can help it.

I've hit a weird snag with my initialization process and render targets, and I think it's related to some kinda weird race condition that I can't pin down... but probably more on this in a future post.

FNA and SDL Events

FNA and SDL Events
I've been poking away at the new version of Otter which will be using FNA instead of SFML. At first I thought it would be super easy and cool to use the XNA "state" systems for input. Stuff like KeyboardState, MouseState, etc. The problem with this though is that at lower framerates this way of detecting input can totally miss inputs.

I couldn't find any examples on how to plug into FNA's SDL event loop, but I eventually stumbled into something that worked. All I knew was that I had to use SDL_AddEventWatch. So here's a quick example on how to use SDL events with FNA:
SDL_AddEventWatch((data, ev) => {
var sdlEvent = (SDL_Event)System.Runtime.InteropServices.Marshal.PtrToStructure(ev, typeof(SDL_Event));
switch(sdlEvent.type) {
case SDL_EventType.SDL_KEYDOWN:
Console.WriteLine("keydown: {0}", sdlEvent.key.keysym.sym);
break;
case SDL_EventType.SDL_KEYUP:
Console.WriteLine("keyup: {0}", sdlEvent.key.keysym.sym);
break;
}
return 0;
}, IntPtr.Zero);
I added this code in the Initialize method of Game, and I'm now getting my own key up and down events. Eventually this will be hooked into my input classes and I should have the same input functionality that SFML Otter has.

State of my Brain

State of my Brain
Progress on things has been pretty weird lately. I've been all over the place with what I've been working on and how I've been spending my time. I'm struggling to find things to talk about on the ole blog so I figured I'd write up just a bunch of thoughts and feelings that are bouncing around my noggin.

Super Sky Sisters
I've been feeling like this game is "almost done" for the past year. It's always felt that I'm one bullet point away from finishing it, but each bullet point reveals two or three more that I then have to work on. It just doesn't seem like the game has enough stuff for it to be called "finished." That and I'm also struggling with a lot of anxiety about the game.

Honestly what I really want to do is just release it on itch.io and call it a day, but I feel like I'm missing possible opportunities to do way more with it. Steam, Humble, maybe actually trying to get any sort of press for it... but all of these things make me feel incredibly anxious. I would be perfectly happy just quietly releasing it on itch, but am I just screwing myself over by doing that? I mean I do have to make money on my work otherwise it becomes pretty difficult to eat, but right now the thought of putting Sky Sisters in front of a potentially huge audience makes me feel pretty uneasy and I'm not sure exactly why.

These feelings of weird social anxiety that somehow carries over to my work is probably the biggest reason I haven't hurried up and finished it. My anxiety and "introvertedness" just gets stronger and stronger all the time and I'm not sure how to fight it! Whoops this part isn't exactly about Sky Sisters anymore.

Dev Log: FNA Primitive Progress

Dev Log: FNA Primitive Progress
In between Super Sky Sisters tasks I'm chipping away at some basic stuff using FNA. One of the tough things to get out of the way early is drawing primitives so I've spent some time getting that up to par with how Otter does it currently.

Image


Circles and rectangles are in and working with camera movement as well. I also went ahead and put in camera zooming and rotating as well so that it matches the functionality that Otter has currently. Primitive outlines for both rectangles and circles is working too! The tough stuff I have coming up is figuring out the best way to do Tilemaps and transformations of a bunch of sprites all at once... basically Otter allows you to do things like create massive graphics, such as Tilemaps, and then give them their own scale, rotation, origin, color, etc. This doesn't seem as straight forward in FNA as far as I can tell right now, but hopefully I'll stumble across something.

Other than that,I've started messing with some basic collision detection which I plan on reworking a little bit from Otter. I'm trying to make it a little bit more organized this time around now that I have a chance to rework things from almost scratch.

The plan going forward is to start up my next game using this framework, and keep Otter SFML online "as is" and probably clean up some stuff to mark it as version 1.0.

Dev Log: Early FNA Experiments

Dev Log: Early FNA Experiments
While I'm taking a sort of break from Super Sky Sisters I've been messing around with something called FNA which is a recreation of XNA but in an open source style with maximum portability in mind. It differs in Monogame in that it tries to be as close to XNA as it can possibly be and doesn't branch off into its own thing.

Why FNA? I mean, I'm totally not sure. The only thing I can concretely say is that it's been recommended to be from developers that I highly respect. People often say that XNA is dead because it is no longer supported by Microsoft, but there is still a huge community of people making games with XNA and that is driving things like Monogame and FNA to exist. I feel a lot better about using something that seems to be more in the forefront of game development back ends.

One major point of FNA that I like is that it's only a csproj or a bunch of dll files. No need to install project templates or content pipelines or any of that stuff. One of my goals with Otter is to make it as easy as possible to get something up and running without having to install anything if possible, and I believe FNA is the best bet for something like that.

Image


I've made it mostly through the first pass of text rendering, I've managed to get some basic shader stuff working, and now I'm working on getting primitives to show up. These are the three things that I'm most scared of so if I can get them out of the way it may be smooth sailing from there.

Basically when I do start getting serious about my next game I want to be working in something that has the possibility to be ported to other platforms. SFML does have that potential but it is not used very much in the game development community, so less people are familiar with it, and that means when it comes time to port I'm kinda up the creek without a boat.

More on this as it develops! You may even catch me working on this on one of my fancy game dev streams (warning: it's all programming and not super exciting.)