The "The final touch" section of "Fix Your Timestep!" covers it a little bit:
- Viewing Profile: Posts: ultramailman
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
Community Stats
- Group Members
- Active Posts 204
- Profile Views 1,971
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
820
Excellent
User Tools
Contacts
ultramailman hasn't added any contacts yet.
Latest Visitors
Posts I've Made
In Topic: Interpolation
17 May 2013 - 02:07 AM
In Topic: Is this bad?
06 May 2013 - 09:33 PM
Not at all, the position can still be float. Simply multiply the index by 64, and cast to a float.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.
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
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.
Yes, but there is no pass by reference in C, so pointers will have to do.passing pointers around is also something i like less and less, since its so easy to pass references around
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!
- Home
- » Viewing Profile: Posts: ultramailman

Find content