787 reputation
415
bio website zackthehuman.com
location United States
age 27
visits member for 4 years, 4 months
seen Nov 23 at 7:15

Game programmer by hobby. Actively developing an NES-style platform game in C++.


Apr
17
comment Sprite Animation Best Practices
@MajidFouladpour We're talking about different things. The answer that I'm giving here only applies to sprite-based animations. This has nothing to do with 3d models vs. 2d sprites. The OP is most certainly referring to 2d animation rather than 3d.
Apr
15
comment Sprite Animation Best Practices
@MajidFouladpour I don't think that kind of limitation exists using this technique. You simply have different AnimationData objects for each "viewing angle".
Jan
8
comment Is there a sound library for C to generate sound samples from code?
I personally find this question a good question. Since I like to program retro-style games it is hard to find resources for things like this without being part of some obscure community.
Nov
8
comment Creating a retro-style palette swapping effect in OpenGL
Thanks for the update -- this makes it clear for me. One more clarification: the OpenGL example says that either texture could be in "any format" or "a format of your choice". In my case, all textures are GL_RGBA since I'm using SFML and SFML loads textures as GL_RGBA. Is it still possible to use a shader with two GL_RGBA textures?
Nov
8
comment Creating a retro-style palette swapping effect in OpenGL
I'm sorry, I wasn't clear in my original comment. I'm familiar with indexed colors and how they work, but I'm not clear on how they work within the context of a shader or a 32-bit texture (since those aren't indexed -- right?).
Nov
8
comment Creating a retro-style palette swapping effect in OpenGL
I'm having some problems getting this to work for me, mostly because I don't understand how the index in the color is determined -- could you possibly expand on that a bit more?
Nov
7
comment Creating a retro-style palette swapping effect in OpenGL
This is a pretty good idea. I actually had thought of this a while back but it didn't come to mind when I posted this question. There is some extra complexity with this since any sprite that uses this kind of composite-texture will need a more complex drawing logic. Thanks for this awesome suggestion!
Oct
22
comment SDL blitting multiple surfaces at once
Are you sure that your calculated X values position the image in the visible area of the screen?
Oct
4
comment MarteEngine Tile Collision
@opiop65 You need to invoke the Grass constructor at least once like the code near the end of my answer. Since you never call the constructor, the static data is never given a value other than null.
Oct
4
comment MarteEngine Tile Collision
I agree. This seems like it should be migrated to SO.
Oct
4
comment MarteEngine Tile Collision
I see that you instantiate the Grass.grass image in the Grass constructor, but that constructor never gets called, so the statement grass = new Image(res/grass.png); is never executed.
Oct
4
comment MarteEngine Tile Collision
I think the problem is that the constructor for Grass is either 1) not called (leaving Grass.grass as null) or 2) called after the code that you posted above, so it hasn't initialized anything yet. I will update my answer with more information.
Sep
25
comment How can you put all images from a game to 1 file?
I'm using PhysFS for my current project and I love it. I don't always need to regenerate my content archive file; I can just drop an updated version in the search path and BAM! It works.
May
25
comment Algorithm for constructing the corners of a regular, n-sided polygon
This goes without saying, but you'll also want to guard against the case where n * 2 * PI == 0 or you'll have one unhappy polygon :(.
May
25
comment Issue with removing sprites on collision
This appears to only remove a maximum of one sprite per call, even in the case where multiple sprites may intersect the specified rectangle. Is that the desired side effect of this function call?
Jul
10
comment How to render images/textures in shape/polygon form?
+1 Unfortunately for the OP this is the correct answer. It just isn't possible without writing custom classes or modifying the SFML source.
Jul
9
comment How to render images/textures in shape/polygon form?
Griffin, I answered this when you asked on SO. The answer is the same as Josh's...
Jun
12
comment Recreating retro/NES style physics with intentional imprecision
@Maik I am interested. I had implemented something to handle this yesterday but had some odd things happen. Thanks for following up!
Jun
11
comment Recreating retro/NES style physics with intentional imprecision
@Maik You sir, are a gentleman. Thanks for the help. This will get me back on track.
Jun
11
comment Recreating retro/NES style physics with intentional imprecision
Yes, this is most likely the solution that the original uses. My project doesn't split the high and low values, though. Is there a way I could do this with a float or fixed point type of structure?