Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 May 2013
Offline Last Active Nov 01 2015 11:06 AM

Topics I've Started

Internal space ship gravity (Unity3d)

05 October 2015 - 01:21 PM

Hello to everyone!


I have some problems with internal ship gravity in my unity3d game. I have a ship that can move in all directions and also rotate.

And I have a game object with character controller which represensts my FP Character.


How do I properly calculate gravity for my character?


I've tried to use rigidBody.AddForce(), but there is a problem with friction - when my ship rotating, after a few seconds character start sliding.


Does anybody know how to calculate gravity like in Pulsar: Lost Colony game?


Thanks in advance,


Render huge user indexed primitive with multi textures

01 March 2015 - 02:01 PM



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,


Test tileset (like Dwarf Fortress)

09 October 2014 - 07:29 AM



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



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




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   12 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,