Reputation
827
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
1 6 15
Impact
~27k people reached

  • 0 posts edited
  • 0 helpful flags
  • 24 votes cast
Nov
8
awarded  Nice Question
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!
Nov
7
asked Creating a retro-style palette swapping effect in OpenGL
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
revised MarteEngine Tile Collision
added 149 characters in body
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.
Oct
3
answered MarteEngine Tile Collision
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.
Sep
24
answered When tracing how do I tell if I hit a wall or floor?
Sep
24
answered Collision and Graphics integration
Sep
21
awarded  Custodian
Jul
23
awarded  Yearling
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?
Sep
27
answered Anyone have a game UI recommendation?