I moved to a new URL! Check it out!

posts tagged with: sfml

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.

More Otter Updates

More Otter Updates
Whoops! I really let myself go on the blog updating schedule. I've been still cranking away at some updates for Otter.

Image

The latest update that I've pushed includes some new stuff for rendering Images. Images can now be drawn by using only a specific source rectangle from the Image with the function Draw.ImagePart(). This resulted in me also making Draw.ImageWaveX() and Draw.ImageWaveY(). You can see those two functions in action up there in that image. Yeah, I know a shader can also do this, but I thought it'd be fun to do it an old fashioned way as well.

I've gone through and fixed some bugs in the new StateMachine<>() class as well. The new StateMachine<> lets you use any key you want to keep track of states, and if you use an enum for the states then it will automatically populate the states from the names of the enums and the matching names of functions. For example, if you have an enum with the name "Walking" the StateMachine will look for functions named "EnterWalking" "UpdateWalking" and "ExitWalking" to correspond with that state. This means less boilerplate code for getting a state machine up and running.

There's been some other minor clean up of bugs and I've been tinkering with things as I chip away at my next big project. The latest version of Otter is always available here. I wonder if anyone will use it for the upcoming Ludum Dare! That would be super cool.

Otter Updates: Rich Text

Otter Updates: Rich Text
The RichText class I posted about is now available in the latest update for Otter. That means you can do things like this:

Image

With just a string with mark up codes, like this:

"{shadow:2}I can levitate {color:f00}birds{color:fff} but {waveAmpY:5}{waveRate:5}nobody cares..."

Also included in the latest update are a bunch of minor fixes for things that I've stumbled across, and also a minor change in how the update loop works... if this breaks anything then I'll change it back, but so far it looks fine.

The other thing I added in these latest updates is the PixelCollider class. So far the PixelCollider can only work against other PixelCollders, BoxColliders, and GridColliders. I'll be adding the other types of collision soon, but for now that should be enough to get by on for most cases where you want to use pixel colliders.

You can find Otter on the internet, and if you're using it you should totally register and post in the forums!

Dev Log: Otter Rich Text

Dev Log: Otter Rich Text
Oh my GOD It's December already. Where has the year gone! I've been still cranking away at some Otter features in the little time I had this past week with Thanksgiving madness. Next up on my to do list is rich text! Check it out:

Image


I'll be making a push soon with a rough pass of this working. I still have some work to do to make it useable for stuff like typing out text, and proper word wrapping, but it's looking pretty good so far. It's going to have a lot of similar features to my never used or released bitmap font classes for Flashpunk.

I'm also slowly chipping away at my next major game, but we'll see how that pans out. I have a lot of prototyping to do, but adding features to Otter is always fun and also helps me out with prototyping stuff.

Dev Log: Just Otter Stuff

Dev Log: Just Otter Stuff
It's been pretty quiet around here lately. I haven't updated too often this past week because everyone on my twitter feed was talking about how amazing the new Zelda game is, so I had to go out and buy it, and then spend the next week completely engrossed in it. If you're still on the fence about it, I think it's the best Zelda game I've played since Link to the Past and Ocarina of Time.

Aside from playing Zelda I've also been chipping away at some updates for Otter.

Image


Right here you can see part of that update. Those red funny shaped objects are actually entities that have pixel colliders on them, meaning that they only collide where those pixels are. I know that pixel colliders usually aren't the best thing to do, and are often expensive on the performance side, but for some low res games they can be pretty handy.

I've also been going through and adding more image manipulation support. I've expanded the Texture class in Otter to allow for stuff like getting and setting pixel colors, as well as saving to an image. These are all basic SFML functions, but for the sake of Otter I've gone ahead and combined the SFML Image and Texture class into one thing.

Images, and soon other graphic types, will soon be able to be constructed from an otter Texture which supports all kinds of new loading techniques such as loading from a byte stream.

Just a few more things on my immediate to do list for Otter before I really start digging into an actual game project, yahoo!

All the King's Men

All the King's Men
Over the weekend I went to a local game jam in Phoenix to try out making a game using Otter. I was fully prepared to face the reality that Otter would have major problems preventing me from using it for this jam... but everything turned out way better than I expected. Check out the first game ever made using Otter!

Download


All the King's Men v1.0 - Windows (6mb)

Apologies to Mac and Linux people, I don't have a solid way to get builds for anything but Windows right now.

There's a readme included in the download that has some more info in it as well.

Screenshots


Image


Image


Image


What's Next


Eventually I would like to open source All the King's Men, but right now I need to figure out what kind of license I should use for it. Open sourcing a game is a little different than open sourcing a framework. I want to maintain control of the distribution of the game, but also allow people to look at and use the code for their own projects. Basically I just don't want people to edit the game slightly and then re-release it as their own work, or something sneaky like that. I'm sure whatever license I choose won't actually prevent that from happening if someone really wants to do that, but I guess I would still feel slightly better by using the right thing.

I also recorded a time lapse of the production of the game during the 48 hour game jam, so once I put that together I'll release that as well!

If you have any feedback then leave a comment, or stop over to the Otter forums.