fastcall22

Moderators
  • Content count

    2477
  • Joined

  • Last visited

Community Reputation

10822 Excellent

About fastcall22

  • Rank
    Web Developer

Personal Information

  • Location
    Nowhere Important
  • Interests
    Programming

Recent Profile Visitors

25541 profile views
  1. Looks great!
  2. It was one of Adam Sandler’s better films, but it still wasn’t that great of a movie… ᕕ( ᐛ )ᕗ
  3. Then it must be a typo, consider the following: struct Foobar { int x; void frobnicate() { cout << this->x; } }; int main() { Foobar* f = new Foobar {3}; if ( f = nullptr ) { // Compiler should warn about this line return -1; } f->frobnicate(); // This will always crash delete f; }
  4. Simply interpolate between the old and new positions in the grid and ignore input during the animation. Perhaps something like: void Player::update(float dt) { if ( this->move_state == MoveState::STOPPED ) { int2 dir = this->process_move_input(); if ( dir ) { this->move_state = MoveState::MOVING; this->move_timer = this->move_speed; // in tiles per second this->old_pos = this->pos; this->pos += dir; } } else if ( this->move_state == MoveState::MOVING ) { this->move_timer -= dt; if ( this->move_timer <= 0 ) { this->move_timer = 0; this->move_state = MoveState::STOPPED; } } } void Player::draw() { int2 pos_px; if ( this->move_state == MoveState::MOVING ) { // move_timer goes from 1 to 0, so math on positions is reversed from the traditional A→B interpolation pos_px = this->pos + float2(this->old_pos - this->pos) * (this->move_timer / this->move_speed) * TILE_SIZE_PX; } else { pos_px = this->pos * TILE_SIZE_PX; } // draw avatar at pos_px }
  5. Still getting the hang of where things have moved to, but other than that everything looks and feels great!
  6. Oops, four months just went by in a blink. I hear it gets worse when you get older. Scary. Anyway, here's a CSS rule to keep the new selective quote modal at the bottom right corner of the screen. I like to select-along while I read, and this pesky modal is always in my way: @namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("www.gamedev.net") { #ddk33_qpopup_popup { position: fixed !important; left: unset !important; top: unset !important; right: 0px !important; bottom: 0px !important; } } And a screen shot: http://i.imgur.com/Zkbg3Xw.png That’s all for now.