• Create Account

# Muzzy A

Member Since 25 May 2007
Offline Last Active Jun 04 2015 11:15 AM

### In Topic: Basic Speed, Velocity and Acceleration. Am I doing it right?

05 January 2015 - 03:56 AM

It looks like speed should be called Force.  You're applying it to the acceleration which means it's a sort of force. Velocity already contains your speed. Just a little note.

### In Topic: Adding a scrolling camera stuck with the maths

27 December 2014 - 06:03 PM

You can just add or subtract the camera's position

an object is at position

```// Screen Coordinates
x = 300;
y = 300;
```

The camera's top left is at position

```x = 200
y = 200
```

Picturing this in your head you can tell it should render at 100,100 on the screen

soooooo

```objX - camX = 100;
objY - camY = 100;
```

For input....

You clicked the screen at position

```x = 100;
y = 200;
```

Cameras top left position

```x = 200;
y = 200;

// Coordinates in the world would then be...

x = mouseX + camX; // 300
y = mouseY + camY; // 400

gridPos = worldIsoGrid( x,y,widthHalf,heightHalf);
```

### In Topic: C# 2D Body Animation help

27 December 2014 - 05:43 PM

I was searching and didn't realize there aren't many free articles on this subject.

A Book:  3D Animation

You'll want a class like this

```class KeyFrame
{

Vector2 Position;
float Scale;
float Rotation;
float StartTime;

};

// Store all of your key frames into a list
List< KeyFrame > frames;

// To create the key frames, I suggest making a button to push to set the key frame
// You will have to set the time in which each frame starts
// first frame starts at 0 seconds, second frame may start at .5 seconds, the 3rd one at .65 seconds, 4th at 1 second... etc

// or you can set it up so that you can just set the very last key frame to the length of the animation and average out the rest of the key frames times from that

// Actually playing this animation you will have to store the total time elapsed in this animation, along with the current index.

class Animation
{
float fTimeElapsed;
int CurrentIndex;
List< KeyFrame > frames;
};

// You'll want to interpolate between frames to get that smooth looking animation

```

### In Topic: Programming a Level Editor

23 December 2014 - 01:36 PM

Having a level editor will make the creation of your levels go MUCH faster.  It will save you a lot of time to go out of the way to create the editor.  Making a 2D editor should take you no time at all. ( Assuming you're using C# Windows Forms for it )

### In Topic: What to do after the basics

23 December 2014 - 01:32 PM

There used to be an awesome guide to creating a text RPG called wrath lands that I was going to post here.  It brought everything in perspective of how you can use C++ for game programming for me.  But unfortunately it isn't there anymore

As it's already been said before create some simple little things.

A guessing game where you guess a number between 1-100, have a difficulty setting, easy you get 7 tries, medium you get 5 tries, hard you get 3 tries.

Try to create a text RPG, you don't have to make the full game.  But get it so that you have a battle system that works, and you can travel from town to town. Level up you skills.

Just search google for ideas to apply your skills to and learn.

Even to this date I still go to Project Euler to challenge myself.  It has a ton of logic problems and math problems to solve by programming.  And they're made so that you can't just come up with the answer in your head.

PARTNERS