Search found 25 matches
- Fri Sep 29, 2017 2:28 pm
- Forum: General
- Topic: How to separate concerns?
- Replies: 7
- Views: 5143
Re: How to separate concerns?
It's nice to have one class-like table per file and to load that table into another file via require. Each required file can return its created table. One nice thing in lua is that if you require the same file in multiple different files, it returns a reference to the same table.
- Sat Aug 26, 2017 8:33 pm
- Forum: General
- Topic: Need help testing for collision between shapes
- Replies: 1
- Views: 1523
Re: Need help testing for collision between shapes
Well I figured out the HC thing. To access the polygon class functionality from a polygon shape, you need to access the ._polygon member. HC has some good functionality but it is confusingly structured. The object returned from the HC.polygon() constructor should be an instance of the Shape base cla...
- Sat Aug 26, 2017 1:49 pm
- Forum: General
- Topic: Need help testing for collision between shapes
- Replies: 1
- Views: 1523
Need help testing for collision between shapes
Hi, I want the functionality of testing whether two shapes (polygons) overlap. I have been using the HC (HardonCollider) library but ran into an issue. Specifically, I created a new polygon with HC.polygon(vertices) but the table that gets returned is not able to call the HC.Polygon functions. My un...
- Wed Aug 16, 2017 4:06 pm
- Forum: General
- Topic: Basic question about state variables and programming technique
- Replies: 2
- Views: 1970
Re: Basic question about state variables and programming technique
By state I'm referring to all variables that store information in between love.update() calls, whether it be "important" variables like screen position or position within a tile-based board, or helper variables that track movement progress. Other examples are Booleans for tracking movement...
- Wed Aug 16, 2017 3:03 pm
- Forum: General
- Topic: Basic question about state variables and programming technique
- Replies: 2
- Views: 1970
Basic question about state variables and programming technique
I find myself creating new state variables for every facet of character activity that I implement. For instance every new micro feature that I add to character behavior gets a whole new set of state variables. In one example, i use separate animation timers for each character instance. Is this consi...