Jump to content
  • entries
    707
  • comments
    1173
  • views
    436292

Update

Sign in to follow this  
Programmer16

82 views

Ok, I thought I understood and had frame-rate independant movement implemented correctly, but it seems that if I disable VSYNC in MalykAI it becomes quite horrible.

There's also the problem with right-movement not working correctly even though it has pretty much exactly the same code as moving left (which works correctly):

void UserEntityController::MoveLeft(float TimeScale)
{
if(ControlledEntity->AllowInput)
{
if(ControlledEntity->VelocityX == 0)
ControlledEntity->VelocityX = -((ControlledEntity->Speed) * TimeScale) * 3;
ControlledEntity->VelocityX -= ((ControlledEntity->Speed) * TimeScale);
ControlledEntity->FacingRight = false;
ControlledEntity->Running = true;

if(!ControlledEntity->InAir)
ControlledEntity->SetAnimation(EntityAnimations::Running);
}
}

void UserEntityController::MoveRight(float TimeScale)
{
if(ControlledEntity->AllowInput)
{
if(ControlledEntity->VelocityX == 0)
ControlledEntity->VelocityX = ((ControlledEntity->Speed) * TimeScale) * 3;
ControlledEntity->VelocityX += ((ControlledEntity->Speed) * TimeScale);
ControlledEntity->FacingRight = true;
ControlledEntity->Running = true;

if(!ControlledEntity->InAir)
ControlledEntity->SetAnimation(EntityAnimations::Running);
}
}







I got bitmap fonts fully implemented, including horizontal and vertical alignment and a color-table coloring system (like I had before; you do ^#0-9 to choose a color.) I allow the user to supply a base color in the function to simplify things (since you may not always want default white text and you don't always have color characters in the text.)

I'm thinking I'm going to stay up and start porting MalykAI code because I really want to see how it turns out with the new code-base. We'll see.

Anyway back to work for me.

PS: There'll be screenshots of my different projects coming soon. Especially dftGUI, Xna5D.GUI, and OpenXna RPG (which I should probably put on SVN tonight or tomorrow morning.)

Edit: Well, I got about 3 files ported and I've decided that I'm doing a total rewrite. My map system is so freaking messed up it's not even funny (fixed map size anyone?) It seems that I fell back into an old habit of mine while writing MalykAI (that being writing chunks of code when I needed them instead of thinking ahead and writing all the code that I know I'll need and then writing things that I run into.) I've also decided that I'm not sleeping until it's totally rewritten, so I better get to work.
Sign in to follow this  


3 Comments


Recommended Comments

Quote:
It seems that I fell back into an old habit of mine while writing MalkyAI (that being writing chunks of code when I needed them instead of thinking ahead and writing all the code that I know I'll need and then writing things that I run into.


Ah, we all code in dopey things that work for the short-term but cripple us for the long-term. We're all human. Well.. *pats cybernetic arm*

Share this comment


Link to comment
@linkofazeroth: Shush, it was after 5 in the morning.

@hopedagger: Yea, it's just annoying to find yourself doing something you worked so hard to stop.

@cybernetic arm: [lol]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!