Games Programmer, Anime fan, General nerd.

 

Super awkward but trying to improve~ n_n

 

(Have been advised to add: All views my own)


tef
@tef

instead of writing things like this

if event == E_LEFT {
    player.x += 10
} else if event == E_RIGHT {
    player.x -= 10
} else if .... {
  ...
}

split it up into "decide what to do" and "do the thing", and don't overwrite the current state until you're done, either:

if event == E_LEFT {
    action = ACTION_MOVE_LEFT
} else if ... {
    ....
}

var player_next = player

if action == ACTION_MOVE_LEFT {
    player_next.x += 10
} else if .... {
    ...
}

player = player_next

why?




NoelBWrites
@NoelBWrites

Years ago, Spouse got offered a promotion. It was a great opportunity: career advancement, a raise, upskilling... Only problem: it would require us to move to Detroit.

At the time we had been in Chicago for a little over a year and we were both in love (still are! we're simps for this city). It's just a perfect match for our values and our lifestyle: it's beautiful, it's comfortable, it's easy to move around without a car, we have good friends here.

We really didn't want to move. So Spouse rejected the promotion. The company still pushed for it, offered different incentives, Spouse explained moving out of Chicago was a dealbreaker.

So the company invited both of us to Detroit. We would spend a couple of days there, being wined and dined, exploring the city. They would show us around so we could see that Detroit was very similar to Chicago and that we would surely be as happy there as we were here. They arranged for our accommodation and a car rental.

In which they accidentally let the riff-raff into their exclusive club