2,064 reputation
414
bio website electronicmeteor.wordpress.co…
location Chicago, IL
age
visits member for 3 years, 4 months
seen 2 days ago

Web developer by trade, but at night I'm just another hobbyist game developer working on tightening up the graphics in Level 3.


Jan
19
comment What is the simplest way to calculate distance in a 3D environment?
A good example would be when you have to sort many objects by distance. Actual distance may not be as important but the relative order is.
Jan
13
comment 2D Smooth Tile Lighting
Vertex lighting is good enough if you are fine with angled linear gradients. The caveat is that you have to flip the triangles in some of the quads for the lighting to look correct. See this article, in the section Details Regarding Meshing for an explanation.
Jan
12
comment C# xna/monogame ghost trail effect
By default the Spritebatch defers rendering so all sprites are rendered in as few calls as possible. It can support up to 2048 sprites (XNA 4 implementation) before it is forced to start a new batch. If you use the same texture with the same sprites, you won't need to optimize a lot.
Jan
11
comment How can I build Minecraft-style light propagation without recursive functions?
By "storing voxels as columns", do you mean in a way that makes it easy to iterate in the Y directions? The way I loop through voxels, to check visibility, build meshes etc. is "For every Z in every X, start at the topmost Y with a solid voxel and continue downwards." Don't know if this matters but the chunks are not cubic, they actually 32x32 with 256 in height.
Jan
5
comment How can I approximate an “opening fan”-transformation?
The complexity of doing this depends on if the object is actually shaped like a fan, or you have some other type of shape that you want to have this fan-opening behavior.
Jan
1
comment Advanced Cellular Automata to generate caves
Connecting nodes could also be done with Delaunay triangulation. It tends to avoid making paths that are very close to other ones in angle.
Jan
1
comment How can I make A* finish faster when the destination is impassable?
If you are storing traversed nodes in lists, you might want to use binary heaps to improve speed.
Dec
30
comment MonoGame: Draw thousands of quads without hardware instancing
@NickWiggill Hardware instancing hasn't been a high priority feature for MonoGame contributors unfortunately. He could use one of the frequent dev MonoGame builds to try to extend OpenTK through there.
Dec
29
comment Collision Direction Detection
Is distances.at(2).x a typo? There only seem to be two Vector2f objects stored in the std::vector so I assume you are trying to access index 1 and not 2 for the vertical movement (as with your code for pushing down).
Dec
26
comment Implicit Functions and extracting an isosurface
@MarkA.Ropper, yes, since essentially you are creating a terrain that will only have one vertical value per 2D coordinate. To add overhangs or caves you must implement 3D noise functions with all values. Subtract from the surface for caves or add to empty space for terrain with overhangs. It is more expensive to iterate over all 3 dimensions, so you need to add some fall-off values to reduce the area to compute. See here for an example.
Dec
22
comment Placing tiles on 2D Simplex noise
Here's a useful starting point from this site. And a question with a more detailed answer. Such questions on procedural tilemap generation have been asked several times before.
Dec
16
comment How can I compute a “steepness” value for height map cells?
Wow, that is simple. Then I realize is actually quite similar to the partial derivative functions in HLSL which solve the same problem!
Dec
16
comment Insufficient memory on creating vertex buffers
Thanks for the added explanation, and some good info in that XNA thread too. This I found especially telling: "a vertex buffer always needs to be stored in a single 'lump', and can't be broken up throughout RAM, filling in the gaps as it were. You can come far far closer to filling my GPU's 256MB using many 1MB VBs than you can 4 64s." It sounds like larger, but proportionally fewer VB's will be less likely to throw the exception. In that case I can either 1. reduce the amount of voxel chunks or 2. have several chunks share one VB. The latter one would be tricky to apply but it could work.
Dec
15
comment Insufficient memory on creating vertex buffers
I think I'm hitting an internal limit with vertex buffers, since these crashes happen more often with more chaotic-looking 3D shapes made with 3D noise functions, instead of a terrain that is made with combining 2D noise at different octaves. Also the problem goes away when rendering less chunks at a time.
Dec
15
comment How can I prevent text rendering from looking ugly when in motion?
I would store the text location in a Point structure and then pass it to a Vector2 in the DrawString call. Point is specific for 2D space location using integers.
Dec
12
comment Insufficient memory on creating vertex buffers
That's very possible, especially since 3D noise data produces more complex meshes than a 2d height map. I estimate around 1GB of memory used in all the meshes. My graphics card has 2GB of VRAM.
Dec
12
comment Insufficient memory on creating vertex buffers
@SeanMiddleditch actually, I've done a lot of optimization for working out what cubes are actually visible from outside so I add only the visible faces to the vertex buffer. The crashes seem to happen when I exclusively use 3D noise functions to generate the meshes, but not when using 2D noise as a way to make a heightmap.
Dec
12
comment Insufficient memory on creating vertex buffers
That's what I want to know, if 1024 buffers is too many.
Mar
11
comment Making efficeint voxel engines using “chunks”
The ideal setup is that you make a single draw call per chunk, not per voxel. As Byte56 stated below, each mesh is an entire chunk. With that system in place, you'll have to experiment with chunk sizes for performance trade-offs. Smaller chunks: less expensive updates per chunk, but more of them in a given space, and more draw calls. Larger chunks: more expensive chunk updates but fewer of them and potentially fewer draw calls.
Mar
4
comment Making Procedurally Generated Top-Down Landscapes Interesting
Maybe by not faking 3D he means a true top-down projection? Technically the Zelda screenshots use a oblique projection for the vertical axis.