I moved to a new URL! Check it out!

posts filed under: otter

Otter Updates 0.9.6

Otter Updates 0.9.6
Otter is slowly approaching the big 1.0.0 moment, and I've been tinkering with it little by little trying to fix bugs that pop up. I've also been using the dev branch so you can see my updates as I make them. Otherwise the default branch is supposed to be the "stable" one, and every once in awhile I merge the dev branch in with the default one.

Here's some of the recent changes and fixes!

* Text now has CenterTextOrigin() in an attempt to find the center of the actual text, and not the full bounding box.

* RichText also now has CenterTextOrigin()

* Fixed Text bug that would cause text to jitter when the height of the tallest character was changed.

* Fixed the same issue in RichText.

* Tilemaps have had some improvements in their performance for looking up tiles.

* Tilemaps can now use Enums for their layers.

* Fixed bugs with accessing tiles out of range in a Tilemap. Tiles are now automatically clamped inside of the limits of the Tilemap.

* Tilemap GetTiles() will return a list of TileInfo objects for every tile on a specific layer.

* GridCollider now has a Clear() function

* GridColliders can now load collision data from a Tilemap, using a specific layer on the Tilemap.

* Fixed a bug with not updating Graphics when their alpha was changed.

* Game's "SmoothAll" value should now actually affect Textures. Considering changing this to a static value on Texture.

* Fixed crash bug with Surface's SaveToFile() function.

* Updated the Glide Tween Library to the latest revision.

* Updated the documentation.

That's all for now. If you have any issues you can post on the forums and that'll be the easiest way to get help. Hope everyone out there is having fun with the engine!

More Otter Updates

More Otter Updates
I've gotten myself into the bad habit of procrastinating on my game project by working on Otter some more!

I just pushed another wave of updates on the journey to the big 1.0.0.

* Text and RichText's rendering positions have been changed. The default origin will now be the top left most position of any text, instead of allowing for "bleed." This should make it simpler to deal with.

* The Tilemap class got a few updates including a performance boost for clearing tiles, and a final pass on tile layers. Everything in the Tilemap class should now be usable as intended.

* Documentation fixes and updates across the board.

* Debugger has been updated to adjust for the Text updates.

So at this point I think the only thing that's left is fixing whatever bugs come up. So if you hit any bugs in any point in Otter then please let me know on the forums!

Otter Updates

Otter Updates
Things are moving along for Otter, my SFML.Net based game making framework!

I pushed a lot of changes this week that is bringing it closer to the big version 1.0. I overhauled a lot of the code in the Graphics classes, fixed some bugs, and updated all of the documentation for mostly everything. I also went through and cleaned up a lot of the code and organized it into nifty regions.

Right now my plan is to just keep testing things for awhile yet to make sure there's no crazy show-stopping bugs before I publicly announce to the world that it's officially version 1.0. Some of my recent changes have not been tested that thoroughly yet, and there have been a few bug reports popping up that I've been fixing up, so I can only imagine there are more bugs lurking in the shadows.

As far as sprite batching goes, I decided that I'm holding off on official sprite batching support until after version 1.0. There is some stuff set up in the back end of things to turn on sprite batching, but there are a handful of bugs that need to be resolved first and I don't think I'm going to be able to get them squished quickly enough. Aside from that, my performance tests seem to indicate that sprite batching isn't really that helpful anyway.

If you're using Otter and encounter any bugs, you can let me know on the forums or directly on the BitBucket issue tracker.

Incoming Otter Updates

Incoming Otter Updates
Sorry for the total lack of posts over the past week. I guess I have gone into a heads-down mode for the updates I've been working on for Otter.

About a week and a half ago I went in and tore apart a lot of the code for Graphics and the sub classes. This resulted in rendering being totally messed up for awhile as I tried to figure out a good way to batch sprites using common SFML RenderStates.

So far this seems like a fruitless effort, as even when I have basic sprite batching working the performance remains exactly the same. If anything right now the bottleneck for rendering just seems to be iterating through all of the entities to render, so for now I'm going to hold off on officially supporting sprite batching until version 1.1 or higher.

I did make a pretty big breakthrough on Sunday and finished the last of the collision detection functions. The last ones on the list were all using the PixelCollider class. Some of the functions could be optimized better, but for now this will work for a version 1.0 release sometime in the near future. I don't imagine seeing the PixelCollider class being used that much anyway.

For the time being I'm going through every single class now and organizing it and documenting it (if I haven't done so already) Soon Otter will be a very neat organized package of code all set up with fancy regions and comments. Then that will bring me to the beta of (hopefully) version 1.0. If nothing goes horribly wrong, I would image Otter will be at 1.0 status in a few weeks!

It's not as exciting as working on an actual game, but there were some things lurking in the shadows of Otter that I needed to address before they came back and bit me later. Thanks to everyone that has been finding bugs and suggesting things for Otter! It's pretty awesome and terrifying to know that people out there are using the engine.

Flippy Flop Source

Flippy Flop Source
Yesterday I made a quick game called Flippy Flop using Otter. The whole thing only took me two hours or so, and the end result ended up being a relatively clean coded game.

I decided to add the Flippy Flop source code to the Otter source repository on BitBucket in the Examples folder. So now when you grab Otter you'll also get the source for the Otter Pong Game, and the amazing Flippy Flop.

Flippy Flop makes use of the EventRouter included in Otter. The EventRouter was originally authored by some smart Phoenix locals, and is used a lot in their Unity projects. Since it was just a C# implementation I grabbed and it stuck it in Otter. The EventRouter is all about following the Observer pattern. It can be a little weird to use at first, but I'm beginning to see the appeal of it.

(Disclaimer: There may be some bugs in the source for FlippyFlop. I didn't really check it over for memory leaks, which can easily pop up when using an Event system. If you don't make sure you're unsubscribing from events when objects are removed, or clearing the event router, you might find yourself in memory leak city.)

If you have any questions about Otter, or the source code of the game, check out the Otter forums or leave a comment below.

Otter Updates

Otter Updates
As I work away at my next project I'm also pushing some changes to Otter, which is my 2d game making framework that runs on SFML 2 and C#.

I didn't get to make many updates during the holidays, but now I'm back in the swing of things. Here's some of the latest stuff that's been updated:

Better mouse locking.
You can now lock the mouse to the center of the screen and use the delta mouse positions to track the cursor position. If you use this option you can still just use Input.MouseX and Input.MouseY normally.

Debugger fixes
The mouse unlocks when the debugger is opened, and I think I fixed some bugs with hiding and showing the debugger. The log will now look nicer when using Log to print multiple lines. Added quit to do the same thing as exit.

Session construtor public
Just in case you want to extend session, but I'm not sure if I want to keep it this way.

Updated SFML dlls
I found that someone made new builds of SFML so I was able to update the dll files to fix some bugs (like only being able to click on the title bar to gain focus)

Image shake property (still weird now though)
Images can now shake but this doesn't make too much sense because the shake is updated at every render call (instead of update)

Rich text documentation
Added some more comments to rich text

More Rand functions
Rand.Float() can use a Range now, and there's a method for generating a point inside a circle.

Util additions
Added some stuff to Util that may or may not be useful.

AutoTimer added
A utility component class that might be useful for some stuff.

Linux, OS X stuff
Merged in the .csproj file from Ventero for hopefully Linux and OS X support with Mono? I'm not totally sure how this stuff works but Linux and OS X should be easier to build with this new .csproj file and Mono.