Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

ultramailman

Member Since 13 Oct 2012
Offline Last Active May 21 2013 03:12 PM
-----

Posts I've Made

In Topic: Interpolation

17 May 2013 - 02:07 AM

The "The final touch" section of "Fix Your Timestep!" covers it a little bit:

http://gafferongames.com/game-physics/fix-your-timestep/


In Topic: Is this bad?

06 May 2013 - 09:33 PM

When you mean work with ints do you mean make all my floats into ints. Most SFML's classes I am using uses sf::Vector2f's.

Not at all, the position can still be float. Simply multiply the index by 64, and cast to a float.

In Topic: Is this bad?

06 May 2013 - 08:02 PM

I don't think it is bad, but I think it is better to work with integers. Assumming the position of a tile is the top left corner, then a tile at index (1, 2) should have the position (1 * 64, 2 * 64) = (64, 128). So the float position can be calculated only when absolutely needed.

So then the index of a tile would be calculated by
m_sfSelectedTileIndex.x = m_sfEvent.mouseButton.x / 64;
m_sfSelectedTileIndex.y = m_sfEvent.mouseButton.y / 64;

In Topic: A Super Mario Source Code

05 May 2013 - 12:17 PM

Thanks for sharing. I think those monolithic subroutines can be split into many smaller subroutines, to help readability.

passing pointers around is also something i like less and less, since its so easy to pass references around

Yes, but there is no pass by reference in C, so pointers will have to do.

In Topic: C++ 11 thread not working on CodeBlocks

03 May 2013 - 11:15 AM

I think clang implements all of c++11 now, but I am not sure if it applies for Windows too. Still, it is good to check it out!

PARTNERS