# awesomefox5

Member

8

116 Neutral

• Rank
Newbie
1. ## Inhabitation | Development Thread

Over the last few days I've been working on the terrain generation, focusing on biomes, cave systems, and all that, and generally trying to make the world interesting to play in. I'm fairly happy with the first biome now, which I've imaginatively dubbed 'slightly mountainous'. The game basically generates from left to right, choosing it's biomes randomly in chunks until it reaches to end of the map. The maps themselves are generated based on parameters entered by the player when creating a new world. Here's a zoomed out example of one chunk in the landscape (dark brown is caves): As the whole world is made up of loads of different blocks each with unique parameters, I’ve built a system that makes it easy to both add new blocks, and to make the amount of time spent defining block behaviour as minimal as possible. Basically, I have an array of a ‘Block’ structure which is defined by a unique ID for each block. Then the world is built up as a 2d array of numbers, which each correspond to a block ID. When drawing the world or updating a block, a check is called back to the block’s ID from it’s Global structure. That way a load of lag is reduced as the world is just an array of numbers and not an array of structures. Everyone’s happy. For a load more info on this, and some more screenshots, check the blog: Inhabitation Development Blog
2. ## Inhabitation | Development Thread

The game you're thinking of is Terraria. It's a game that I loved but the developers stopped updating, so I decided to put all of the stuff I'd have loved to see in Terraria into my own game, and build my ow project around that. So as a rough concept it may appear to be a clone, but I'll hopefully expand features above that. Nonetheless, thanks.

4. ## Point relative to moving Origin

Right so now I've got: point1 = Vector2.Transform(point1, Matrix.CreateRotationZ(angle)); point1 += origin; Where point1 is the fixed point, and the origin is the well, origin. But this doesn't appear to do anything.
5. ## Point relative to moving Origin

I can't seem to get my head round this. If I have a vector with the coordinates of the origin of triangle, a vector with the coordinates for the fixed point which are, say, (triangleOrigin.X + 20, triangleOrigin.Y + 20), and the angle of the triangle, what am I applying the matrix rotation to?
6. ## Point relative to moving Origin

Hey there. I'm currently working on something in c# XNA, and I have a problem I've been stuck on for ages. I have an object which can rotate 360 degrees and can move all over the screen (any x,y coordinates), in relation to an origin on the texture (the center of the texture) . The problem I have is that I need another few points which are 'stuck' to the texture, and will move only in relation to my main object. So if the texture rotates 90 degrees to the left, the other points will all rotate around the texture's origin to stay in the same relative place. I can explain better with a picture (attached). Any help here would be appreciated. Thanks for reading, and thanks in advance.
7. ## Positioning along a line

Ah, thank you so much, that makes sense. I was puzzling over this for quite a while. Thanks again.
8. ## Positioning along a line

Hello. I'm currently working on a small project in XNA, and I've come to an issue I'd like to question. I'm guessing I'm just overlooking something or I'm being too complicated or something, but here's my issue. I have a line, AC, where A, C, and the gradient, can all change (A is fixed at the centre of a character and C is at the coordinates of the mouse). I can obviously calculate the gradient of the line with dy/dx. Heres my problem. I need another point, B, on the line to always stay the same distance along the line from A, while still moving with the rest of the line. For example, if AC's was horizontal, moving C to the right or left would not change B's position. However, if C where to be moved up or down, B would move accordingly, staying on the gradient of the line. There's an image attached,which gives an example where the distance AB needs to stay constant. Any help with this would be appreciated, and any other suggestions on how to get round this would likewise be appreciated. Thanks