I'm sorry to be an ass here, but this most certainly is not an article or a tutorial. There's *no* explaining going on what so ever. If anything, then this is just a codesnippet for someone to use and you can't use it without knowing how every part of the code works, or else you wont be able to make a game out of it. So it's not even a "basic game". And just copy/pasting wont teach you how to do anything.
Besides this:
1 2 3 4 5 6 7 8 9 10
| if(deltaLoop > desiredDeltaLoop){ }else{ try{ Thread.sleep((desiredDeltaLoop - deltaLoop)/(1000*1000)); }catch(InterruptedException e){ } } |
really ought to be this:
1 2 3 4 5 6 7
| if(deltaLoop <= desiredDeltaLoop){ try{ Thread.sleep((desiredDeltaLoop - deltaLoop)/(1000*1000)); }catch(InterruptedException e){ } } |
because having an empty if clause is just weird. Especially when it seems like it was only ever supposed to do nothing.