I moved to a new URL! Check it out!

posts tagged with: csharp

Dev Log: Animations

Dev Log: Animations
Finally got back into C# yesterday and refactored a bunch of my drawing code. I'm basically trying to take SFML and wrap it in a framework that resembles Flashpunk. Last night I got some animations working and I tested with my simple tilemap, and a familiar face from Offspring Fling!

Image


SFML is still proving to be super fun and easy to work with so far, especially since I'm using C#. Also for you C# developers check out Glide, which looks to be a super neato replacement for TweenLite in AS3. I'm planning on implementing it into my framework soon.

I've also been trying to figure out if texture atlasing is necessary with SFML and I can't seem to find any resources on the matter... that is one of the items on my to do list for this framework!

Dev Log: SFML C# Progress

Image


Nothing too exciting for a blog post today unfortunately, just a quick update on my SFML C# progress. Over the weekend I was able to add tile maps roughly following the tutorial right on the SFML website about using vertex arrays for custom shapes.

It was surprisingly straight forward to get a tile map with custom vertex arrays rolling. My first attempt actually involved using a render target. I rendered all the tiles directly to the render target, then used that target as a texture for another sprite. In theory this works well enough but the size of render target's is limited by the video card. On my main PC workstation I can make a render texture of 16000 something pixels, but my laptop can only handle 8000 something pixels, so this seemed like a dangerous way to do it. I switched to the vertex array thing and now I am super excited to try out different applications of the vertex arrays.

Still on my list of things to do are animations, tweening, collisions, and texture atlas support, as well as Ogmo Editor support. Plus probably a lot of refactoring. When the framework is lookin' better I'll release the source publicly so people can laugh at my code and help improve it or use it.

Screenshot Saturday: SFML C#

Image


Working on my C# framework for SFML.NET. C# is actually really neat and I've been having a lot of fun with it! Although I'm getting to the tricky parts now... gotta implement some stuff like animations, texture atlases, and collision next! I just found out how easy it is to use shaders on render textures in SFML too, so I'm pretty excited to start messing around in shader land in the coming weeks.

Dev Log: SFML C#

Dev Log: SFML C#
At this point I am becoming an expert at making test applications full of randomly colored squares.

Image


This was made with SFML.NET and right now is just a quick framework put together loosely based off of Flashpunk. I don't have anything concrete yet, just a basic system of Scenes and Entities, but I'm having fun putting this together so far.

One thing I'm worried about is access to cool libraries. In AS3 I make use of TweenLite and AS3Crypto a lot. I'm really surprised there isn't a big "go to" tweening library for C#. I found some C# tweening classes with some help from Twitter, but they're mostly just "here's the code, good luck" type things. I was really hoping for something more like TweenLite with a bunch of demos and test applications to try out. (I know there's tweening options for Unity in C#, but since they are built with Unity integration they don't really help much without going into the core code and tearing it apart which I don't really have the know how to do.)

I think for now I'll move forward with this while also working a little bit on my AS3 project still. If I can actually manage to make a playable thing with SFML C# in the next two weeks or so then I'll call it a success.

I am both loving and hating this period of experimenting with new stuff, haha!