1,973 reputation
818
bio website jgallant.com
location Canada
age 33
visits member for 2 years, 6 months
seen yesterday

I am a professional programmer extraordinaire. I was introduced to programming at the age of 6 on a Commodore 64. I enjoy making games.

My Homepage: http://www.jgallant.com

My Game: http://www.infinidrill.com/


Mar
7
comment Monogame/XNA Invert Screen Y Axis
Unity inverts the Y-axis. I personally prefer the Monogame convention, as it is the one I have been used to using since the 90s. You could write a wrapper that reverses your axis for you, but I would imagine this would most likely create a lot of grief. As Ben said, best to get used to it.
Feb
25
revised How can I create an array of GameObjects?
added 5 characters in body
Feb
25
answered How can I create an array of GameObjects?
Feb
10
answered How could I control an air hockey 's AI paddle?
Feb
5
awarded  Notable Question
Jan
17
comment Sprite collision with color?
@Nick Another idea would be to use the Rectangle as a first step collision detection, and then possibly run a per-pixel collision check only if the Rectangle collides. Per-pixel is really not an optimal collision check, but depending on the size of your textures, it might be fine.
Jan
16
comment Issue with Monogame resizing
yeah, sorry, I haven't tested this :)
Jan
16
revised Sprite collision with color?
added 128 characters in body
Jan
16
comment Issue with Monogame resizing
You are right. I modified the code. Might help.
Jan
16
revised Issue with Monogame resizing
deleted 156 characters in body
Jan
16
answered Sprite collision with color?
Jan
16
answered Issue with Monogame resizing
Jan
7
answered Floating point precision issue with Box2D
Jan
7
comment If SpriteBatch.Draw's SourceRectangle is null does a rectangle still get created?
The rectangle you are specifying to extract an image from a spritesheet has nothing to do with the rectangle you would use for hit detection. You will need to create a different rectangle for that. The X,Y coordinates of your destination rectangle starts from 0,0 of the source image. It is not relative to your game world at all.
Jan
5
comment If SpriteBatch.Draw's SourceRectangle is null does a rectangle still get created?
This isn't very clear. What are you trying to accomplish?
Jan
2
comment Using Box2D / Physics with Tiles?
The easiest implementation for this, is to store the Left/Right/Top/Bottom block neighbors inside each block object. Then, if any of the neighbors are blank, you have an edge tile.
Jan
2
comment Using Box2D / Physics with Tiles?
The code is actually quite complex. All the blocks are stored in a Quadtree data structure. At each timestep, the Quadtree is queried in the general area where collidable objects exist. In the above animated gif, this collidable object is a box2d Body. If a block exists in this area, we move a body at its location. In the above screenshot, it is taken a step further, and the world "edge" is calculated, and bodies are only placed on Edge blocks. There is also a mechanism in place to return Bodies that are no longer needed after every update.
Jan
2
revised Using Box2D / Physics with Tiles?
deleted 2 characters in body
Jan
2
answered Using Box2D / Physics with Tiles?
Dec
26
awarded  Tenacious