Search found 15 matches
- Mon Oct 06, 2014 4:36 pm
- Forum: Support and Development
- Topic: Small Useful Functions
- Replies: 127
- Views: 53491
Re: Small Useful Functions
Heres a few, kinda useful for tetris type games and map generating new array function newAr(h,w) local ar = {} for i=1,h do ar[i] = {} for j=1,w do ar[i][j] = 0 end end return ar end transpose array function transpose(ar) local ar2 = newAr(#ar,#ar[1]) for i=1,#ar do for j=1,#ar[i] do ar2[j][i] = ar[...
- Mon Oct 06, 2014 4:27 pm
- Forum: General
- Topic: Recommended code reads?
- Replies: 17
- Views: 8023
Re: Recommended code reads?
Just realized this thread was about actual code, not books
The lua source code is pretty nice if you're into C
The lua source code is pretty nice if you're into C
- Mon Oct 06, 2014 4:23 pm
- Forum: Support and Development
- Topic: LÖVE framerate stutters?
- Replies: 37
- Views: 24168
Re: LÖVE framerate stutters?
either to sleep for longer periods of time or change to a fixed timestep. Well, the OS system call that love.timer.sleep uses is inherently inaccurate (on Windows in particular.) Doing a proper fixed timestep requires a lot more code complexity than the default variable timestep. Fixed timesteps ar...
- Sun Oct 05, 2014 11:43 pm
- Forum: General
- Topic: Recommended code reads?
- Replies: 17
- Views: 8023
Re: Recommended code reads?
This book is really heavy stuff but its probably the best programming book ive read.
As a warning its pretty abstract, uses scheme and is written for MIT students.
http://mitpress.mit.edu/sicp/full-text/book/book.html
As a warning its pretty abstract, uses scheme and is written for MIT students.
http://mitpress.mit.edu/sicp/full-text/book/book.html
- Sun Oct 05, 2014 11:34 pm
- Forum: Support and Development
- Topic: LÖVE framerate stutters?
- Replies: 37
- Views: 24168
Re: LÖVE framerate stutters?
TBH I wouldn't rely on vsync. Some GPU's,Operating systems or driver setups wont sync correctly. This gets especially bad with monitors that have strange refresh rates from what ive seen. I usually disable vsync. If your game is being a total resource hog with vsync off you can always modify love.ru...