Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Barrett

Member Since 11 May 2013
Offline Last Active Apr 09 2015 04:18 AM

Topics I've Started

Render huge user indexed primitive with multi textures

01 March 2015 - 02:01 PM

Hello!

 

I'm generating a huge terrain from my random-generated height map (based on perlin noise).

Map divided into squares. Each square must have its own texture (texture distribution based on biome and some render parameters).

All textures packed in atlas. Each square (which consists from two triangles) must be drawn with specified texture, taken from atlas

 

Question is how to set the atlas source rectangle for this squares?

 

Here is the fragment of code, where I'm setting texture position for each vertex.

 

Vector2 texturePosition;
for (int x = 0; x < width; x++)
{
    for (int y = 0; y < height; y++)
    {
        texturePosition = new Vector2((float)x / 32, (float)y / 32);
        VertexPositionTexture texture = new VertexPositionTexture(new Vector3(x, heightMapData[x, y], -y), texturePosition);
        vertices[x + y*width] = texture;
    }
}

As expected, texture atlas layed and looped on whole terrain.

What do I need to change in order to achieve my goal?

 

Thanks in advance,

Denis


Test tileset (like Dwarf Fortress)

09 October 2014 - 07:29 AM

Hello!

 

Is there anybody have a big tileset with small tiles (like Dwarf Fortress textures) with ground textures, objects and etc.

I need some dummies for testing my engine.

Optimal size: 16x16. But if somebody has tileset with tiles proportion 2:3 (8px on 12px) - it will be wonderfull and amazing!

 

Also, if you know resources, where I can find such a tileset - write, please.

 

Thanks in advance.


ASCII-graphic: using Console vs. API

16 September 2014 - 04:55 AM

Hello!

 

I'm writing my game with C# using ASCII-graphic.

Firtsly, I used a Console with kernel32.dll fast buffer and graphic output.

Here is imported function:

 [DllImport("kernel32.dll", SetLastError = true)]
        static extern bool WriteConsoleOutput(
          SafeFileHandle hConsoleOutput,
          CharInfo[] lpBuffer,
          Coord dwBufferSize,
          Coord dwBufferCoord,
          ref SmallRect lpWriteRegion);

But the color range for console is poor and I have endless problems with proper encoding settings.

 

Can you help me to find the best way of ASCII-graphic implementation?

Should I use a Console with proper settings (which I need to find) or using Graphic API as XNA, for example.

If anybody knows some libraries (with Console or XNA graphic) for ASCII-graphic, please, share with me!

 

Also, I'm waiting for wise advices.

 

Thanks in advance.


Sphere Looped World Map

10 July 2013 - 06:27 AM

Hello to everyone!

 

I want to start a little discussion about looped world map.

In my game I have a world map. It stores in memory as 2d-array of different cells with surface description. It is like an unfolded world map

 

WorldMap.gif

 

As I understand, when player stands at the top of map (on the northest point of Greenland) and tries to go forward, he fall in water at point marked with red cross

 

Attached File  WorldMap.gif   13.33KB   11 downloads

 

And player's move direction reversed (but for gamer all things normal)

 

Does anyone know the good implementation of cycled world map or some articles about it?

 

Thanks in advance,

Denis


World Map Render And Storage

17 June 2013 - 01:53 PM

Hello to everyone!

 

I've got a problem. In my game I have the skeleton of world map (map is random) with description for every cell - water, seaside, forest and etc.

The map is not small - about 50 000 cells. And I need to draw, for example, the large region of map. For example 5 000 cells.

 

Can you help me to solve this problem?

Is there any way to do it good?

 

Here some of my solutions:

 

  1. Pre-render the region of map and render additional regions, when player visit new location on map
  2. Render each cell every frame smile.png
  3. ????

Thanks in advance,

Denis


PARTNERS