utility and wrapper library

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
MGinshe
Prole
Posts: 31
Joined: Sun Apr 17, 2011 3:50 am
Location: New Zealand

utility and wrapper library

Post by MGinshe »

this is my first proper post here, so i'm sorry if i derped anything.

i've made a few non-serious projects with love, and every single time i find myself rewriting the same boring utility and math functions. it's boring, time consuming, and sometimes frustrating. i present to you util.lua! it has a bunch of useful vector/angle functions, table deepcopy/merge/print, a full cron wrapper, a black and whitelistable traceLine function for HardonCollider, and some other useful crap that you've probably done a few times already!

there's no readme yet, but i'll get something up later tonight. the functions are all commented so it shouldn't be too difficult

Features
  • - wrapper for cron.lua by kikito
    - traceLine() and findInRange() for HardonCollider by vrld
    - angle to unit-vector and back
    - angle lerping (with cross-product)
    - requireDir() function
    - canvas drawing function, with (centered) rotation
    - table merging, copying, printing, and sorting
    - centered and/or shadowed text drawing
    - unique id generator
    - asset loading (wip)
    - some misc functions
GitHub / Download util.lua
omnione
Prole
Posts: 4
Joined: Fri Apr 04, 2014 9:03 am

Re: utility and wrapper library

Post by omnione »

hey mGinshe,

At a quick glance, nice library! definitely a lot of things I have used and can use for the game I'm currently working on. However, I was wondering if you know a function to check if two rectangles that are translated/rotated are intersecting? Basically a collision detection between two rotated rectangle. I can't seem to figure it out and any tips would be great! Thanks!
User avatar
MGinshe
Prole
Posts: 31
Joined: Sun Apr 17, 2011 3:50 am
Location: New Zealand

Re: utility and wrapper library

Post by MGinshe »

omnione wrote:hey mGinshe,

At a quick glance, nice library! definitely a lot of things I have used and can use for the game I'm currently working on. However, I was wondering if you know a function to check if two rectangles that are translated/rotated are intersecting? Basically a collision detection between two rotated rectangle. I can't seem to figure it out and any tips would be great! Thanks!
i'm using hardoncollider for collisions at the moment, so intersections is kinda low priority right now. i'll try implement a collision test function at some point in the future. until then, this tutorial series is a really good start point. the dudes channel is full of really useful stuff, well worth checking out!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest