3 ms·
When I had spare time I was working on a Terraria-inspired game. Here's a sample video of how far I got: https://www.youtube.com/watch?v=clxX8QZonL4 https://ww
by shuzchen 11y ago
When I had spare time I was working on a Terraria-inspired game. Here's a sample video of how far I got: https://www.youtube.com/watch?v=clxX8QZonL4 https://www.youtube.com/watch?v=clxX8QZonL4 with the code here: https://bitbucket.org/sirpengi/lua_lovestory/src/tip?at=default https://bitbucket.org/sirpengi/lua_lovestory/src/tip?at=defa...
I ended up using luajit FFI to call into C to calculate lighting. I wonder what the FFI support is on the android/ios ports.
- talles 11y agoI love pet projects, specially little games (have made some with SDL in the past). I don't know how Terraria does it (never played) but I suggest you that you only moved the camera when it's necessary (instead of keeping the character in the center literally always). The camera jumping along with the character might even let the player dizzy...
- pwiecz 11y agohttps://youtu.be/pdvCO97jOQk https://youtu.be/pdvCO97jOQk around 7:30 shows how camera in terraria works :)
- coldpie 11y agoFor entirely too many words about the various types of camera systems used in 2D games, see: https://docs.google.com/document/d/1iNSQIyNpVGHeak6isbP6AHdHD50gs8MNXF1GCf08efg/pub https://docs.google.com/document/d/1iNSQIyNpVGHeak6isbP6AHdH...
- talles 11y agoThat's some invaluable info. Thanks!