@ADAMATOMIC NO Compact it as much as you can. Dark matter grains. (Today)

The excitement of going to TIGJAM is almost overwhelming the anxiety of flying. (Today)

@EdmundMcMillenn Have a friend who works at Twitter. (seriously, the people that I know that have recieved name switches have connections.) (Today)

@goldbuick @celsiusgs Indeed. (Today)

@celsiusgs I'm speculating that Sony is adding KB+M support to all games on PS4 after reading my twitter! (Today)

@stijnlovedwdd After clicking a little rectangle on the upper left hand corner I found "Add file" hooray! (Today)

How can it be so difficult to just add an mp3 file to my iPad? (Today)

@ADAMATOMIC I thought you automatically get sales equal to your twitter followers! ᶜ(ᵔᴥᵔ)ᵓ (Today)

@Chounard @DiscordGames Huh, interesting! (Today)

@DiscordGames My end goal is to have everything I can packed in with the exe. (Today)

@DiscordGames Right I'm aware of texture packing for atlasing but that doesn't apply to wanting to embed or compress assets hmmm (Today)

@DiscordGames Oh yeah these are just raw PNG, XML, etc files. There's no content processing for SFML. (Today)

@DiscordGames Content processor? Hmm no all I'm using right now is visual studio C# express or whatever. (Today)

@MattThorson I don't like exposing all the assets because I want secrets and I like just distributing a single .exe file. (Today)

@AtriusUN I understood half of those words o_o (Today)

@DiscordGames Hmm is there a way I can do it where my assets are all bundled up into one file or embedded with the exe? (Today)

@MattThorson hmm yeah but ultimately I don't want a big "assets" folder bundled with the game. I want something like embedding with swfs :I (Today)

@infinite_ammo I use t.co/klLa4j88EJ for no particular reason other than they've been simple and easy to use. (Today)

Arrgh importing all of my assets into this VS C# project and marking them as "copy if newer" sure is annoying. There must be a better way! (Today)

RT @AsherVo: polish early. optimize late. (Today)

follow
search
posts filed under: general

2013 - 6 - 18 / 1:29 pm / general

SFML Text Pixel Fix

SFML Text Pixel Fix

Yesterday I posted about an annoying little bug in the SFML Text class which displays a stray pixel on the upper left hand corner of the first character of the string.

Right now the theory is that this section of code is responsible. After some discussion with some smart people, a temporary work around was found.

When the font texture is created, apparently it will create the texture based on the string that you're using. If your string starts with "Q" then the first letter of the texture will be "Q", and since SFML also creates a 2x2 set of pixels on the upper left of the texture, those pixels will be visible at certain positions because of pixel interpolation.

The work around is to first create a dummy text class that starts with a character that you'll never use. In my code I'm using a random ascii character. I'll probably never ever use that ascii character in my text, so if the white pixel is inside the character then it doesn't matter since I will never use it!

After the dummy text character is created then you're safe to create your intended text object -- as long as you're using the same font and character size, that is! So make sure for each combination of font and character size you're creating a dummy text instance. You never have to draw the dummy text, just draw your actual intended text.

This is kind of a sketchy work around, but for now as far as I can tell it totally works.

I posted a thread on the SFML forum documenting this as well.

No Comments

2013 - 6 - 17 / 2:51 pm / general

Dev Log: SFML Text Woes

Dev Log: SFML Text Woes

My most recent development is getting text working in my SFML based framework. Unfortunately I've run into some sort of problem with the text rendering though.

Image

Whenever I render text, there seems to be a tiny artifact that appears on the upper left corner for the first character of the string, but it only appears in certain positions. The artifact seems to be less than a pixel since moving it around the screen causes it to flicker on and off. In this example I'm rendering text 9 times, 8 times for the outline, and once for the center, and you can see the artifact also rendered 9 times in the top left corner of the Q character.

Image

This is happening independent of fonts, and characters. The only instance I have seen this not occur is when the text is never moving on the screen, or when the first character actually occupies the upper left corner of its bounding box (for example the Y character in Arial.)

Does anyone out there know what's going on here and how I can fix it? If it makes any difference, currently my framework renders everything to a render texture which is then drawn to the window... not sure if this has anything to do with it, but I've been running tests with just drawing SFML text straight to the window with similar results so far.

Programming!

1 Comment

2013 - 6 - 6 / 8:35 pm / general

Dev Log: Parallax and Repeating

Dev Log: Parallax and Repeating

Just churning away at my SFML framework that I'm building with C#. The past two days I've added parallax scrolling (similar to Flashpunk's scrollX and scrollY variables) to images, as well as the ability for images to repeat. The cool thing about the repeating is that it's being done at the base image class, so even animated sprites can be repeated across the screen!

Image

Also if you're working with SFML C# yourself, you should check out this TextureAtlas class written by Mark J. A. Smith. I have yet to implement something like this in my framework yet because I haven't really noticed performance issues, but using texture atlases can greatly reduce the amount of texture switching between drawing things, which helps a lot with performance.

Back to work!

3 Comments

2013 - 6 - 1 / 12:08 pm / general

Screenshot Saturday: Shaders!

Image

BEHOLD I have finally implemented a shader! (It's actually just the example blur shader that comes with SFML.)

Ever since I started working on Snapshot I've always wanted to take advantage of pixel shaders for 2d games, and now with C# and SFML I've been able to finally do it. I'm pretty excited for where this can take me, but now I have to actually learn how to write GLSL shaders which looks pretty tough...

No Comments

2013 - 5 - 31 / 2:45 pm / general

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!

4 Comments

2013 - 5 - 28 / 1:56 pm / general

Workstation!

Image

I've been kinda busy with other stuff lately so unfortunately I don't have any super cool blog posts lined up for this week (yet.) Hopefully I'll be diving back into C# and SFML next week, so for now enjoy the picture of my workstation. (Actually this was taken back in December, so there are some things missing.) This is what I've been using to work on games and watch speed runs for the past 6 months!

2 Comments

about

About

Hi there, my name is Kyle, and I'm a 27 year old kid with adult powers. I'm making video games and living the indie game developer life in Tempe, Arizona. Here you will find my thoughts, games, websites, doodles, and other stuff like that. I worked on Snapshot, Offspring Fling, and a whole bunch of other games. If you want to get a hold of me use the form on the bottom of the page, leave a comment, or just tweet at me. I try to post three times a week. Thanks for stoppin' by!

facebook

videos

Do you want to make a Let's Play of one of my games, or a just a video featuring footage of my games? You have my full permission to do so! Even if you are monetizing your videos, you still have my full permission to use any footage from any of my games. Go for it!

old sites

xerus kylepulver

contact

Your message has been sent! Thanks :)
SEND MESSAGE