Compare commits
91 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0e6ce7880 | ||
|
|
26f8259f2b | ||
|
|
b1c7e2ba83 | ||
|
|
6b549fcbc1 | ||
|
|
b9d994ad50 | ||
|
|
ce8ca35f7e | ||
|
|
19ae03707f | ||
|
|
c1f1225248 | ||
|
|
45e8552054 | ||
|
|
f187dce4fd | ||
|
|
927652597c | ||
|
|
6b3af0f2da | ||
|
|
31f3396db1 | ||
|
|
cb9ab332d2 | ||
|
|
1fd32dab9a | ||
|
|
0a12897695 | ||
|
|
e44ac6cdb3 | ||
|
|
6f299470d0 | ||
|
|
61ffd2551b | ||
|
|
c66ed98a5a | ||
|
|
2621bd16a3 | ||
|
|
c408267932 | ||
|
|
557927577d | ||
|
|
cbfc3d360f | ||
|
|
d35d62ed3c | ||
|
|
74666ca0c3 | ||
|
|
5978ace463 | ||
|
|
a504bd6336 | ||
|
|
69ae37586e | ||
|
|
44fb94c457 | ||
|
|
9230dad1e1 | ||
|
|
e4bf3f3767 | ||
|
|
71e97c12f6 | ||
|
|
7c4ff7747c | ||
|
|
808407f7c4 | ||
|
|
153f326612 | ||
|
|
a4e3c90724 | ||
|
|
e47920f332 | ||
|
|
e96d494526 | ||
|
|
994f3b6533 | ||
|
|
264d835334 | ||
|
|
e54f29884c | ||
|
|
9991ff7474 | ||
|
|
5e7d2ea7fc | ||
|
|
6d1b280a40 | ||
|
|
fb345c7718 | ||
|
|
0f86eae571 | ||
|
|
fd49633d17 | ||
|
|
94fc3ac453 | ||
|
|
4109d37cdb | ||
|
|
c9dccaf85f | ||
|
|
d154c7f627 | ||
|
|
18bd48e163 | ||
|
|
724d5689fe | ||
|
|
6531332ea8 | ||
|
|
dc69636f72 | ||
|
|
dc3deab725 | ||
|
|
39adae204b | ||
|
|
f53db5ddb6 | ||
|
|
fa58c016e9 | ||
|
|
9a284ce9da | ||
|
|
a612a7b13d | ||
|
|
debce6666e | ||
|
|
b2f44feb5b | ||
|
|
049d0eba76 | ||
|
|
b85fa59c74 | ||
|
|
29ed0977a0 | ||
|
|
283d034b21 | ||
|
|
beb043be49 | ||
|
|
d1e5ad731a | ||
|
|
f23941a903 | ||
|
|
77df6e20aa | ||
|
|
53ef1f2d36 | ||
|
|
c5c27c679c | ||
|
|
22daad2b26 | ||
|
|
c38e5633d5 | ||
|
|
8d4b994329 | ||
|
|
eb1ee4c210 | ||
|
|
26ecc4f0a5 | ||
|
|
5b4acb55ee | ||
|
|
231182e7c2 | ||
|
|
05d7574794 | ||
|
|
c046bde701 | ||
|
|
e8b4b7f106 | ||
|
|
17592be9dc | ||
|
|
db69cbca1d | ||
|
|
408f436dd1 | ||
|
|
216064d63c | ||
|
|
b98cd5a14d | ||
|
|
f4c6ce1004 | ||
|
|
f3b2e9a0e5 |
@@ -0,0 +1,7 @@
|
|||||||
|
Copyright (c) 2015 Calvin Rose
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -1,12 +1,91 @@
|
|||||||
# NOTE - Up to date version of this project [here](https://github.com/bakpakin/CommandoKibbles)
|
# tiny-ecs #
|
||||||
|
|
||||||
|
[](LICENSE)
|
||||||
|
|
||||||

|
Tiny-ecs is an Entity Component System for lua that's simple, flexible, and useful.
|
||||||
|
Because of lua's tabular nature, Entity Component Systems are a natural choice
|
||||||
|
for simulating large and complex systems. For more explanation on Entity
|
||||||
|
Component Systems, here is some
|
||||||
|
[basic info](http://en.wikipedia.org/wiki/Entity_component_system "Wikipedia").
|
||||||
|
|
||||||
## tiny-ecs example: Commando Kibbles
|
Tiny-ecs also works well with objected oriented programming in lua because
|
||||||
|
Systems and Entities do not use metatables. This means you can subclass your
|
||||||
|
Systems and Entities, and use existing lua class frameworks with tiny-ecs, no problem.
|
||||||
|
For an example on how to use tiny-ecs with object-oriented lua, take a look at the
|
||||||
|
demo branch, specifically the systems and entities sub-directories.
|
||||||
|
|
||||||
Fight against invading pigs as a feisty feline with a cannon strapped to your back.
|
## Overview ##
|
||||||
|
Tiny-ecs has four important types: Worlds, Filters, Systems, and Entities.
|
||||||
|
Entities, however, can be any lua table, and Filters are just functions that
|
||||||
|
take an Entity as a parameter.
|
||||||
|
|
||||||
# Running
|
### Entities ###
|
||||||
|
Entities are simply lua tables of data that gets processed by Systems. Entities
|
||||||
|
should contain primarily data rather than code, as it is the Systems's job to
|
||||||
|
do logic on data. Henceforth, a key-value pair in an Entity will
|
||||||
|
be referred to as a Component.
|
||||||
|
|
||||||
Uses [LOVE](https://love2d.org/) to run. Run the love executable from the project directory to test.
|
### Worlds ###
|
||||||
|
Worlds are the outermost containers in tiny-ecs that contain both Systems
|
||||||
|
and Entities. In typical use, only one World is used at a time.
|
||||||
|
|
||||||
|
### Systems ###
|
||||||
|
Systems in tiny-ecs describe how to update Entities. Systems select certain Entities
|
||||||
|
using a Filter, and then only update those select Entities. Some Systems don't
|
||||||
|
update Entities, and instead just act as function callbacks every update. Tiny-ecs
|
||||||
|
provides functions for creating Systems easily, as well as creating Systems that
|
||||||
|
can be used in an object oriented fashion.
|
||||||
|
|
||||||
|
### Filters ###
|
||||||
|
Filters are used to select Entities. Filters can be any lua function, but
|
||||||
|
tiny-ecs provides some functions for generating common ones, like selecting
|
||||||
|
only Entities that have all required components.
|
||||||
|
|
||||||
|
## Example ##
|
||||||
|
```lua
|
||||||
|
local tiny = require("tiny")
|
||||||
|
|
||||||
|
local talkingSystem = tiny.processingSystem()
|
||||||
|
talkingSystem.filter = tiny.requireAll("name", "mass", "phrase")
|
||||||
|
function talkingSystem:process(e, dt)
|
||||||
|
e.mass = e.mass + dt * 3
|
||||||
|
print(e.name .. ", who weighs " .. e.mass .. " pounds, says, \"" .. e.phrase .. "\"")
|
||||||
|
end
|
||||||
|
|
||||||
|
local joe = {
|
||||||
|
name = "Joe",
|
||||||
|
phrase = "I'm a plumber.",
|
||||||
|
mass = 150,
|
||||||
|
hairColor = "brown"
|
||||||
|
}
|
||||||
|
|
||||||
|
local world = tiny.world(talkingSystem, joe)
|
||||||
|
|
||||||
|
for i = 1, 20 do
|
||||||
|
world:update(1)
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
## Use It ##
|
||||||
|
Copy paste tiny.lua into your source folder. For stability and consistent API,
|
||||||
|
please use a tagged release or use luarocks. Tagged releases will have a version
|
||||||
|
number in `tiny._VERSION`, while other commits will just have the string 'scm'.
|
||||||
|
|
||||||
|
## Luarocks ##
|
||||||
|
Tiny-ecs is also on [Luarocks](https://luarocks.org/) and can be installed with
|
||||||
|
`luarocks install tiny-ecs`.
|
||||||
|
|
||||||
|
## Demo ##
|
||||||
|
Check out the [demo](https://github.com/bakpakin/tiny-ecs/tree/demo-commandokibbles), a game
|
||||||
|
originally written for Ludum Dare 32 with the theme 'An Unconventional Weapon'. The demo uses
|
||||||
|
[LÖVE](https://love2d.org/), an amazing game framework for lua.
|
||||||
|
|
||||||
|
## Testing ##
|
||||||
|
Tiny-ecs uses [busted](http://olivinelabs.com/busted/) for testing. Install and run
|
||||||
|
`busted` from the command line to test.
|
||||||
|
|
||||||
|
## Documentation ##
|
||||||
|
See API [here](http://bakpakin.github.io/tiny-ecs/doc/).
|
||||||
|
For the most up-to-date documentation, read the source code, or generate the HTML
|
||||||
|
locally with [LDoc](http://stevedonovan.github.io/ldoc/).
|
||||||
|
See the original forum thread [here](https://love2d.org/forums/viewtopic.php?f=5&t=79937&p=182589).
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 124 B |
|
Before Width: | Height: | Size: 811 B |
|
Before Width: | Height: | Size: 953 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 187 B |
@@ -1,258 +0,0 @@
|
|||||||
return {
|
|
||||||
version = "1.1",
|
|
||||||
luaversion = "5.1",
|
|
||||||
tiledversion = "0.11.0",
|
|
||||||
orientation = "orthogonal",
|
|
||||||
width = 60,
|
|
||||||
height = 60,
|
|
||||||
tilewidth = 16,
|
|
||||||
tileheight = 16,
|
|
||||||
nextobjectid = 1,
|
|
||||||
properties = {},
|
|
||||||
tilesets = {
|
|
||||||
{
|
|
||||||
name = "tiles",
|
|
||||||
firstgid = 1,
|
|
||||||
tilewidth = 16,
|
|
||||||
tileheight = 16,
|
|
||||||
spacing = 0,
|
|
||||||
margin = 0,
|
|
||||||
image = "tiles.png",
|
|
||||||
imagewidth = 256,
|
|
||||||
imageheight = 256,
|
|
||||||
tileoffset = {
|
|
||||||
x = 0,
|
|
||||||
y = 0
|
|
||||||
},
|
|
||||||
properties = {},
|
|
||||||
terrains = {},
|
|
||||||
tiles = {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
layers = {
|
|
||||||
{
|
|
||||||
type = "tilelayer",
|
|
||||||
name = "bbg",
|
|
||||||
x = 0,
|
|
||||||
y = 0,
|
|
||||||
width = 60,
|
|
||||||
height = 60,
|
|
||||||
visible = true,
|
|
||||||
opacity = 1,
|
|
||||||
properties = {},
|
|
||||||
encoding = "lua",
|
|
||||||
data = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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|
|
||||||
name = "bg",
|
|
||||||
x = 0,
|
|
||||||
y = 0,
|
|
||||||
width = 60,
|
|
||||||
height = 60,
|
|
||||||
visible = true,
|
|
||||||
opacity = 1,
|
|
||||||
properties = {},
|
|
||||||
encoding = "lua",
|
|
||||||
data = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "tilelayer",
|
|
||||||
name = "mg",
|
|
||||||
x = 0,
|
|
||||||
y = 0,
|
|
||||||
width = 60,
|
|
||||||
height = 60,
|
|
||||||
visible = true,
|
|
||||||
opacity = 1,
|
|
||||||
properties = {
|
|
||||||
["collidable"] = "true"
|
|
||||||
},
|
|
||||||
encoding = "lua",
|
|
||||||
data = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,367 +0,0 @@
|
|||||||
return {
|
|
||||||
version = "1.1",
|
|
||||||
luaversion = "5.1",
|
|
||||||
tiledversion = "0.11.0",
|
|
||||||
orientation = "orthogonal",
|
|
||||||
width = 80,
|
|
||||||
height = 80,
|
|
||||||
tilewidth = 16,
|
|
||||||
tileheight = 16,
|
|
||||||
nextobjectid = 11,
|
|
||||||
backgroundcolor = { 140, 205, 255 },
|
|
||||||
properties = {},
|
|
||||||
tilesets = {
|
|
||||||
{
|
|
||||||
name = "tiles",
|
|
||||||
firstgid = 1,
|
|
||||||
tilewidth = 16,
|
|
||||||
tileheight = 16,
|
|
||||||
spacing = 0,
|
|
||||||
margin = 0,
|
|
||||||
image = "tiles.png",
|
|
||||||
imagewidth = 256,
|
|
||||||
imageheight = 256,
|
|
||||||
tileoffset = {
|
|
||||||
x = 0,
|
|
||||||
y = 0
|
|
||||||
},
|
|
||||||
properties = {},
|
|
||||||
terrains = {},
|
|
||||||
tiles = {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
layers = {
|
|
||||||
{
|
|
||||||
type = "tilelayer",
|
|
||||||
name = "bbg",
|
|
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 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "tilelayer",
|
|
||||||
name = "bg",
|
|
||||||
x = 0,
|
|
||||||
y = 0,
|
|
||||||
width = 80,
|
|
||||||
height = 80,
|
|
||||||
visible = true,
|
|
||||||
opacity = 1,
|
|
||||||
properties = {},
|
|
||||||
encoding = "lua",
|
|
||||||
data = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "tilelayer",
|
|
||||||
name = "mg",
|
|
||||||
x = 0,
|
|
||||||
y = 0,
|
|
||||||
width = 80,
|
|
||||||
height = 80,
|
|
||||||
visible = true,
|
|
||||||
opacity = 1,
|
|
||||||
properties = {
|
|
||||||
["collidable"] = "true"
|
|
||||||
},
|
|
||||||
encoding = "lua",
|
|
||||||
data = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "objectgroup",
|
|
||||||
name = "objects",
|
|
||||||
visible = true,
|
|
||||||
opacity = 1,
|
|
||||||
properties = {},
|
|
||||||
objects = {
|
|
||||||
{
|
|
||||||
id = 1,
|
|
||||||
name = "",
|
|
||||||
type = "Player",
|
|
||||||
shape = "rectangle",
|
|
||||||
x = 630,
|
|
||||||
y = 1113,
|
|
||||||
width = 16,
|
|
||||||
height = 32,
|
|
||||||
rotation = 0,
|
|
||||||
visible = true,
|
|
||||||
properties = {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 6,
|
|
||||||
name = "",
|
|
||||||
type = "Spawner",
|
|
||||||
shape = "rectangle",
|
|
||||||
x = 32,
|
|
||||||
y = 1088,
|
|
||||||
width = 64,
|
|
||||||
height = 64,
|
|
||||||
rotation = 0,
|
|
||||||
visible = true,
|
|
||||||
properties = {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 9,
|
|
||||||
name = "",
|
|
||||||
type = "Spawner",
|
|
||||||
shape = "rectangle",
|
|
||||||
x = 1200,
|
|
||||||
y = 1008,
|
|
||||||
width = 64,
|
|
||||||
height = 64,
|
|
||||||
rotation = 0,
|
|
||||||
visible = true,
|
|
||||||
properties = {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 612 B |
|
Before Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,34 +0,0 @@
|
|||||||
function love.conf(t)
|
|
||||||
t.identity = nil
|
|
||||||
t.version = "11.3"
|
|
||||||
t.console = false
|
|
||||||
t.window.title = "Commando Kibbles"
|
|
||||||
t.window.icon = nil
|
|
||||||
t.window.width = 900
|
|
||||||
t.window.height = 600
|
|
||||||
t.window.borderless = false
|
|
||||||
t.window.resizable = true
|
|
||||||
t.window.minwidth = 600
|
|
||||||
t.window.minheight = 400
|
|
||||||
t.window.fullscreen = false
|
|
||||||
t.window.vsync = true
|
|
||||||
t.window.fsaa = 0
|
|
||||||
t.window.display = 1
|
|
||||||
t.window.highdpi = false
|
|
||||||
t.window.srgb = false
|
|
||||||
t.window.x = nil
|
|
||||||
t.window.y = nil
|
|
||||||
t.modules.audio = true
|
|
||||||
t.modules.event = true
|
|
||||||
t.modules.graphics = true
|
|
||||||
t.modules.image = true
|
|
||||||
t.modules.joystick = false
|
|
||||||
t.modules.keyboard = true
|
|
||||||
t.modules.math = true
|
|
||||||
t.modules.mouse = true
|
|
||||||
t.modules.physics = false
|
|
||||||
t.modules.sound = true
|
|
||||||
t.modules.system = true
|
|
||||||
t.modules.timer = true
|
|
||||||
t.modules.window = true
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
file = "tiny.lua"
|
||||||
|
project = "tiny-ecs"
|
||||||
|
description = "Entity Component System for lua."
|
||||||
|
backtick_references = true
|
||||||
|
format = 'discount'
|
||||||
|
title = "tiny-ecs API"
|
||||||
|
one = true
|
||||||
|
dir = doc
|
||||||
|
style = '!fixed'
|
||||||
|
package = 'tiny-ecs'
|
||||||
|
not_luadoc = true
|
||||||
|
boilerplate = true
|
||||||
|
no_return_or_parms = true
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
local assert, pairs, type, tostring, setmetatable = assert, pairs, type, tostring, setmetatable
|
|
||||||
local baseMt, _instances, _classes, _class = {}, setmetatable({},{__mode='k'}), setmetatable({},{__mode='k'})
|
|
||||||
local function assert_class(class, method) assert(_classes[class], ('Wrong method call. Expected class:%s.'):format(method)) end
|
|
||||||
local function deep_copy(t, dest, aType) t = t or {}; local r = dest or {}
|
|
||||||
for k,v in pairs(t) do
|
|
||||||
if aType and type(v)==aType then r[k] = v elseif not aType then
|
|
||||||
if type(v) == 'table' and k ~= "__index" then r[k] = deep_copy(v) else r[k] = v end
|
|
||||||
end
|
|
||||||
end; return r
|
|
||||||
end
|
|
||||||
local function instantiate(self,...)
|
|
||||||
assert_class(self, 'new(...) or class(...)'); local instance = {class = self}; _instances[instance] = tostring(instance); setmetatable(instance,self)
|
|
||||||
if self.init then if type(self.init) == 'table' then deep_copy(self.init, instance) else self.init(instance, ...) end; end; return instance
|
|
||||||
end
|
|
||||||
local function extend(self, name, extra_params)
|
|
||||||
assert_class(self, 'extend(...)'); local heir = {}; _classes[heir] = tostring(heir); deep_copy(extra_params, deep_copy(self, heir));
|
|
||||||
heir.name, heir.__index, heir.super = extra_params and extra_params.name or name, heir, self; return setmetatable(heir,self)
|
|
||||||
end
|
|
||||||
baseMt = { __call = function (self,...) return self:new(...) end, __tostring = function(self,...)
|
|
||||||
if _instances[self] then return ("instance of '%s' (%s)"):format(rawget(self.class,'name') or '?', _instances[self]) end
|
|
||||||
return _classes[self] and ("class '%s' (%s)"):format(rawget(self,'name') or '?',_classes[self]) or self
|
|
||||||
end}; _classes[baseMt] = tostring(baseMt); setmetatable(baseMt, {__tostring = baseMt.__tostring})
|
|
||||||
local class = {isClass = function(class, ofsuper) local isclass = not not _classes[class]; if ofsuper then return isclass and (class.super == ofsuper) end; return isclass end, isInstance = function(instance, ofclass)
|
|
||||||
local isinstance = not not _instances[instance]; if ofclass then return isinstance and (instance.class == ofclass) end; return isinstance end}; _class = function(name, attr)
|
|
||||||
local c = deep_copy(attr); c.mixins=setmetatable({},{__mode='k'}); _classes[c] = tostring(c); c.name, c.__tostring, c.__call = name or c.name, baseMt.__tostring, baseMt.__call
|
|
||||||
c.include = function(self,mixin) assert_class(self, 'include(mixin)'); self.mixins[mixin] = true; return deep_copy(mixin, self, 'function') end
|
|
||||||
c.new, c.extend, c.__index, c.includes = instantiate, extend, c, function(self,mixin) assert_class(self,'includes(mixin)') return not not (self.mixins[mixin] or (self.super and self.super:includes(mixin))) end
|
|
||||||
c.extends = function(self, class) assert_class(self, 'extends(class)') local super = self; repeat super = super.super until (super == class or super == nil); return class and (super == class) end
|
|
||||||
return setmetatable(c, baseMt) end; class._DESCRIPTION = '30 lines library for object orientation in Lua'; class._VERSION = '30log v1.0.0'; class._URL = 'http://github.com/Yonaba/30log'; class._LICENSE = 'MIT LICENSE <http://www.opensource.org/licenses/mit-license.php>'
|
|
||||||
return setmetatable(class,{__call = function(_,...) return _class(...) end })
|
|
||||||
@@ -1,284 +0,0 @@
|
|||||||
local anim8 = {
|
|
||||||
_VERSION = 'anim8 v2.1.0',
|
|
||||||
_DESCRIPTION = 'An animation library for LÖVE',
|
|
||||||
_URL = 'https://github.com/kikito/anim8',
|
|
||||||
_LICENSE = [[
|
|
||||||
MIT LICENSE
|
|
||||||
Copyright (c) 2011 Enrique García Cota
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
|
|
||||||
local Grid = {}
|
|
||||||
|
|
||||||
local _frames = {}
|
|
||||||
|
|
||||||
local function assertPositiveInteger(value, name)
|
|
||||||
if type(value) ~= 'number' then error(("%s should be a number, was %q"):format(name, tostring(value))) end
|
|
||||||
if value < 1 then error(("%s should be a positive number, was %d"):format(name, value)) end
|
|
||||||
if value ~= math.floor(value) then error(("%s should be an integer, was %d"):format(name, value)) end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function createFrame(self, x, y)
|
|
||||||
local fw, fh = self.frameWidth, self.frameHeight
|
|
||||||
return love.graphics.newQuad(
|
|
||||||
self.left + (x-1) * fw + x * self.border,
|
|
||||||
self.top + (y-1) * fh + y * self.border,
|
|
||||||
fw,
|
|
||||||
fh,
|
|
||||||
self.imageWidth,
|
|
||||||
self.imageHeight
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function getGridKey(...)
|
|
||||||
return table.concat( {...} ,'-' )
|
|
||||||
end
|
|
||||||
|
|
||||||
local function getOrCreateFrame(self, x, y)
|
|
||||||
if x < 1 or x > self.width or y < 1 or y > self.height then
|
|
||||||
error(("There is no frame for x=%d, y=%d"):format(x, y))
|
|
||||||
end
|
|
||||||
local key = self._key
|
|
||||||
_frames[key] = _frames[key] or {}
|
|
||||||
_frames[key][x] = _frames[key][x] or {}
|
|
||||||
_frames[key][x][y] = _frames[key][x][y] or createFrame(self, x, y)
|
|
||||||
return _frames[key][x][y]
|
|
||||||
end
|
|
||||||
|
|
||||||
local function parseInterval(str)
|
|
||||||
if type(str) == "number" then return str,str,1 end
|
|
||||||
str = str:gsub('%s', '') -- remove spaces
|
|
||||||
local min, max = str:match("^(%d+)-(%d+)$")
|
|
||||||
assert(min and max, ("Could not parse interval from %q"):format(str))
|
|
||||||
min, max = tonumber(min), tonumber(max)
|
|
||||||
local step = min <= max and 1 or -1
|
|
||||||
return min, max, step
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grid:getFrames(...)
|
|
||||||
local result, args = {}, {...}
|
|
||||||
local minx, maxx, stepx, miny, maxy, stepy
|
|
||||||
|
|
||||||
for i=1, #args, 2 do
|
|
||||||
minx, maxx, stepx = parseInterval(args[i])
|
|
||||||
miny, maxy, stepy = parseInterval(args[i+1])
|
|
||||||
for y = miny, maxy, stepy do
|
|
||||||
for x = minx, maxx, stepx do
|
|
||||||
result[#result+1] = getOrCreateFrame(self,x,y)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
local Gridmt = {
|
|
||||||
__index = Grid,
|
|
||||||
__call = Grid.getFrames
|
|
||||||
}
|
|
||||||
|
|
||||||
local function newGrid(frameWidth, frameHeight, imageWidth, imageHeight, left, top, border)
|
|
||||||
assertPositiveInteger(frameWidth, "frameWidth")
|
|
||||||
assertPositiveInteger(frameHeight, "frameHeight")
|
|
||||||
assertPositiveInteger(imageWidth, "imageWidth")
|
|
||||||
assertPositiveInteger(imageHeight, "imageHeight")
|
|
||||||
|
|
||||||
left = left or 0
|
|
||||||
top = top or 0
|
|
||||||
border = border or 0
|
|
||||||
|
|
||||||
local key = getGridKey(frameWidth, frameHeight, imageWidth, imageHeight, left, top, border)
|
|
||||||
|
|
||||||
local grid = setmetatable(
|
|
||||||
{ frameWidth = frameWidth,
|
|
||||||
frameHeight = frameHeight,
|
|
||||||
imageWidth = imageWidth,
|
|
||||||
imageHeight = imageHeight,
|
|
||||||
left = left,
|
|
||||||
top = top,
|
|
||||||
border = border,
|
|
||||||
width = math.floor(imageWidth/frameWidth),
|
|
||||||
height = math.floor(imageHeight/frameHeight),
|
|
||||||
_key = key
|
|
||||||
},
|
|
||||||
Gridmt
|
|
||||||
)
|
|
||||||
return grid
|
|
||||||
end
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
local Animation = {}
|
|
||||||
|
|
||||||
local function cloneArray(arr)
|
|
||||||
local result = {}
|
|
||||||
for i=1,#arr do result[i] = arr[i] end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
local function parseDurations(durations, frameCount)
|
|
||||||
local result = {}
|
|
||||||
if type(durations) == 'number' then
|
|
||||||
for i=1,frameCount do result[i] = durations end
|
|
||||||
else
|
|
||||||
local min, max, step
|
|
||||||
for key,duration in pairs(durations) do
|
|
||||||
assert(type(duration) == 'number', "The value [" .. tostring(duration) .. "] should be a number")
|
|
||||||
min, max, step = parseInterval(key)
|
|
||||||
for i = min,max,step do result[i] = duration end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if #result < frameCount then
|
|
||||||
error("The durations table has length of " .. tostring(#result) .. ", but it should be >= " .. tostring(frameCount))
|
|
||||||
end
|
|
||||||
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
local function parseIntervals(durations)
|
|
||||||
local result, time = {0},0
|
|
||||||
for i=1,#durations do
|
|
||||||
time = time + durations[i]
|
|
||||||
result[i+1] = time
|
|
||||||
end
|
|
||||||
return result, time
|
|
||||||
end
|
|
||||||
|
|
||||||
local Animationmt = { __index = Animation }
|
|
||||||
local nop = function() end
|
|
||||||
|
|
||||||
local function newAnimation(frames, durations, onLoop)
|
|
||||||
local td = type(durations);
|
|
||||||
if (td ~= 'number' or durations <= 0) and td ~= 'table' then
|
|
||||||
error("durations must be a positive number. Was " .. tostring(durations) )
|
|
||||||
end
|
|
||||||
onLoop = onLoop or nop
|
|
||||||
durations = parseDurations(durations, #frames)
|
|
||||||
local intervals, totalDuration = parseIntervals(durations)
|
|
||||||
return setmetatable({
|
|
||||||
frames = cloneArray(frames),
|
|
||||||
durations = durations,
|
|
||||||
intervals = intervals,
|
|
||||||
totalDuration = totalDuration,
|
|
||||||
onLoop = onLoop,
|
|
||||||
timer = 0,
|
|
||||||
position = 1,
|
|
||||||
status = "playing",
|
|
||||||
flippedH = false,
|
|
||||||
flippedV = false
|
|
||||||
},
|
|
||||||
Animationmt
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:clone()
|
|
||||||
local newAnim = newAnimation(self.frames, self.durations, self.onLoop)
|
|
||||||
newAnim.flippedH, newAnim.flippedV = self.flippedH, self.flippedV
|
|
||||||
return newAnim
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:flipH()
|
|
||||||
self.flippedH = not self.flippedH
|
|
||||||
return self
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:flipV()
|
|
||||||
self.flippedV = not self.flippedV
|
|
||||||
return self
|
|
||||||
end
|
|
||||||
|
|
||||||
local function seekFrameIndex(intervals, timer)
|
|
||||||
local high, low, i = #intervals-1, 1, 1
|
|
||||||
|
|
||||||
while(low <= high) do
|
|
||||||
i = math.floor((low + high) / 2)
|
|
||||||
if timer > intervals[i+1] then low = i + 1
|
|
||||||
elseif timer <= intervals[i] then high = i - 1
|
|
||||||
else
|
|
||||||
return i
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return i
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:update(dt)
|
|
||||||
if self.status ~= "playing" then return end
|
|
||||||
|
|
||||||
self.timer = self.timer + dt
|
|
||||||
local loops = math.floor(self.timer / self.totalDuration)
|
|
||||||
if loops ~= 0 then
|
|
||||||
self.timer = self.timer - self.totalDuration * loops
|
|
||||||
local f = type(self.onLoop) == 'function' and self.onLoop or self[self.onLoop]
|
|
||||||
f(self, loops)
|
|
||||||
end
|
|
||||||
|
|
||||||
self.position = seekFrameIndex(self.intervals, self.timer)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:pause()
|
|
||||||
self.status = "paused"
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:gotoFrame(position)
|
|
||||||
self.position = position
|
|
||||||
self.timer = self.intervals[self.position]
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:pauseAtEnd()
|
|
||||||
self.position = #self.frames
|
|
||||||
self.timer = self.totalDuration
|
|
||||||
self:pause()
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:pauseAtStart()
|
|
||||||
self.position = 1
|
|
||||||
self.timer = 0
|
|
||||||
self:pause()
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:resume()
|
|
||||||
self.status = "playing"
|
|
||||||
end
|
|
||||||
|
|
||||||
function Animation:draw(image, x, y, r, sx, sy, ox, oy, ...)
|
|
||||||
local frame = self.frames[self.position]
|
|
||||||
if self.flippedH or self.flippedV then
|
|
||||||
r,sx,sy,ox,oy = r or 0, sx or 1, sy or 1, ox or 0, oy or 0
|
|
||||||
local _,_,w,h = frame:getViewport()
|
|
||||||
|
|
||||||
if self.flippedH then
|
|
||||||
sx = sx * -1
|
|
||||||
ox = w - ox
|
|
||||||
end
|
|
||||||
if self.flippedV then
|
|
||||||
sy = sy * -1
|
|
||||||
oy = h - oy
|
|
||||||
end
|
|
||||||
end
|
|
||||||
love.graphics.draw(image, frame, x, y, r, sx, sy, ox, oy, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
anim8.newGrid = newGrid
|
|
||||||
anim8.newAnimation = newAnimation
|
|
||||||
|
|
||||||
return anim8
|
|
||||||
@@ -1,174 +0,0 @@
|
|||||||
-- beholder.lua - v2.1.1 (2011-11)
|
|
||||||
|
|
||||||
-- Copyright (c) 2011 Enrique García Cota
|
|
||||||
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
-- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN callback OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
local function copy(t)
|
|
||||||
local c={}
|
|
||||||
for i=1,#t do c[i]=t[i] end
|
|
||||||
return c
|
|
||||||
end
|
|
||||||
|
|
||||||
local function hash2array(t)
|
|
||||||
local arr, i = {}, 0
|
|
||||||
for _,v in pairs(t) do
|
|
||||||
i = i+1
|
|
||||||
arr[i] = v
|
|
||||||
end
|
|
||||||
return arr, i
|
|
||||||
end
|
|
||||||
-- private Node class
|
|
||||||
|
|
||||||
local nodesById = nil
|
|
||||||
local root = nil
|
|
||||||
|
|
||||||
local function newNode()
|
|
||||||
return { callbacks = {}, children = setmetatable({}, {__mode="k"}) }
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
local function findNodeById(id)
|
|
||||||
return nodesById[id]
|
|
||||||
end
|
|
||||||
|
|
||||||
local function findOrCreateChildNode(self, key)
|
|
||||||
self.children[key] = self.children[key] or newNode()
|
|
||||||
return self.children[key]
|
|
||||||
end
|
|
||||||
|
|
||||||
local function findOrCreateDescendantNode(self, keys)
|
|
||||||
local node = self
|
|
||||||
for i=1, #keys do
|
|
||||||
node = findOrCreateChildNode(node, keys[i])
|
|
||||||
end
|
|
||||||
return node
|
|
||||||
end
|
|
||||||
|
|
||||||
local function invokeNodeCallbacks(self, params)
|
|
||||||
-- copy the hash into an array, for safety (self-erasures)
|
|
||||||
local callbacks, count = hash2array(self.callbacks)
|
|
||||||
for i=1,#callbacks do
|
|
||||||
callbacks[i](unpack(params))
|
|
||||||
end
|
|
||||||
return count
|
|
||||||
end
|
|
||||||
|
|
||||||
local function invokeAllNodeCallbacksInSubTree(self, params)
|
|
||||||
local counter = invokeNodeCallbacks(self, params)
|
|
||||||
for _,child in pairs(self.children) do
|
|
||||||
counter = counter + invokeAllNodeCallbacksInSubTree(child, params)
|
|
||||||
end
|
|
||||||
return counter
|
|
||||||
end
|
|
||||||
|
|
||||||
local function invokeNodeCallbacksFromPath(self, path)
|
|
||||||
local node = self
|
|
||||||
local params = copy(path)
|
|
||||||
local counter = invokeNodeCallbacks(node, params)
|
|
||||||
|
|
||||||
for i=1, #path do
|
|
||||||
node = node.children[path[i]]
|
|
||||||
if not node then break end
|
|
||||||
table.remove(params, 1)
|
|
||||||
counter = counter + invokeNodeCallbacks(node, params)
|
|
||||||
end
|
|
||||||
|
|
||||||
return counter
|
|
||||||
end
|
|
||||||
|
|
||||||
local function addCallbackToNode(self, callback)
|
|
||||||
local id = {}
|
|
||||||
self.callbacks[id] = callback
|
|
||||||
nodesById[id] = self
|
|
||||||
return id
|
|
||||||
end
|
|
||||||
|
|
||||||
local function removeCallbackFromNode(self, id)
|
|
||||||
self.callbacks[id] = nil
|
|
||||||
nodesById[id] = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
------ beholder table
|
|
||||||
|
|
||||||
local beholder = {}
|
|
||||||
|
|
||||||
|
|
||||||
-- beholder private functions/vars
|
|
||||||
|
|
||||||
local groups = nil
|
|
||||||
local currentGroupId = nil
|
|
||||||
|
|
||||||
local function addIdToCurrentGroup(id)
|
|
||||||
if currentGroupId then
|
|
||||||
groups[currentGroupId] = groups[currentGroupId] or setmetatable({}, {__mode="k"})
|
|
||||||
local group = groups[currentGroupId]
|
|
||||||
group[#group + 1] = id
|
|
||||||
end
|
|
||||||
return id
|
|
||||||
end
|
|
||||||
|
|
||||||
local function stopObservingGroup(group)
|
|
||||||
local count = #group
|
|
||||||
for i=1,count do
|
|
||||||
beholder.stopObserving(group[i])
|
|
||||||
end
|
|
||||||
return count
|
|
||||||
end
|
|
||||||
|
|
||||||
local function falseIfZero(n)
|
|
||||||
return n > 0 and n
|
|
||||||
end
|
|
||||||
|
|
||||||
local function extractEventAndCallbackFromParams(params)
|
|
||||||
assert(#params > 0, "beholder.observe requires at least one parameter - the callback. You usually want to use two, i.e.: beholder.observe('EVENT', callback)")
|
|
||||||
local callback = table.remove(params, #params)
|
|
||||||
return params, callback
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
------ Public interface
|
|
||||||
|
|
||||||
function beholder.observe(...)
|
|
||||||
local event, callback = extractEventAndCallbackFromParams({...})
|
|
||||||
local node = findOrCreateDescendantNode(root, event)
|
|
||||||
return addIdToCurrentGroup(addCallbackToNode(node, callback))
|
|
||||||
end
|
|
||||||
|
|
||||||
function beholder.stopObserving(id)
|
|
||||||
local node = findNodeById(id)
|
|
||||||
if node then removeCallbackFromNode(node, id) end
|
|
||||||
|
|
||||||
local group, count = groups[id], 0
|
|
||||||
if group then count = stopObservingGroup(group) end
|
|
||||||
|
|
||||||
return (node or count > 0) and true or false
|
|
||||||
end
|
|
||||||
|
|
||||||
function beholder.group(groupId, f)
|
|
||||||
assert(not currentGroupId, "beholder.group can not be nested!")
|
|
||||||
currentGroupId = groupId
|
|
||||||
f()
|
|
||||||
currentGroupId = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
function beholder.trigger(...)
|
|
||||||
return falseIfZero( invokeNodeCallbacksFromPath(root, {...}) )
|
|
||||||
end
|
|
||||||
|
|
||||||
function beholder.triggerAll(...)
|
|
||||||
return falseIfZero( invokeAllNodeCallbacksInSubTree(root, {...}) )
|
|
||||||
end
|
|
||||||
|
|
||||||
function beholder.reset()
|
|
||||||
root = newNode()
|
|
||||||
nodesById = setmetatable({}, {__mode="k"})
|
|
||||||
groups = {}
|
|
||||||
currentGroupId = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
beholder.reset()
|
|
||||||
|
|
||||||
return beholder
|
|
||||||
@@ -1,770 +0,0 @@
|
|||||||
local bump = {
|
|
||||||
_VERSION = 'bump v3.1.2',
|
|
||||||
_URL = 'https://github.com/kikito/bump.lua',
|
|
||||||
_DESCRIPTION = 'A collision detection library for Lua',
|
|
||||||
_LICENSE = [[
|
|
||||||
MIT LICENSE
|
|
||||||
|
|
||||||
Copyright (c) 2014 Enrique García Cota
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
-- Auxiliary functions
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
local abs, floor, ceil, min, max = math.abs, math.floor, math.ceil, math.min, math.max
|
|
||||||
|
|
||||||
local function sign(x)
|
|
||||||
if x > 0 then return 1 end
|
|
||||||
if x == 0 then return 0 end
|
|
||||||
return -1
|
|
||||||
end
|
|
||||||
|
|
||||||
local function nearest(x, a, b)
|
|
||||||
if abs(a - x) < abs(b - x) then return a else return b end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function assertType(desiredType, value, name)
|
|
||||||
if type(value) ~= desiredType then
|
|
||||||
error(name .. ' must be a ' .. desiredType .. ', but was ' .. tostring(value) .. '(a ' .. type(value) .. ')')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function assertIsPositiveNumber(value, name)
|
|
||||||
if type(value) ~= 'number' or value <= 0 then
|
|
||||||
error(name .. ' must be a positive integer, but was ' .. tostring(value) .. '(' .. type(value) .. ')')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function assertIsRect(x,y,w,h)
|
|
||||||
assertType('number', x, 'x')
|
|
||||||
assertType('number', y, 'y')
|
|
||||||
assertIsPositiveNumber(w, 'w')
|
|
||||||
assertIsPositiveNumber(h, 'h')
|
|
||||||
end
|
|
||||||
|
|
||||||
local defaultFilter = function()
|
|
||||||
return 'slide'
|
|
||||||
end
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
-- Rectangle functions
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
local function rect_getNearestCorner(x,y,w,h, px, py)
|
|
||||||
return nearest(px, x, x+w), nearest(py, y, y+h)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This is a generalized implementation of the liang-barsky algorithm, which also returns
|
|
||||||
-- the normals of the sides where the segment intersects.
|
|
||||||
-- Returns nil if the segment never touches the rect
|
|
||||||
-- Notice that normals are only guaranteed to be accurate when initially ti1, ti2 == -math.huge, math.huge
|
|
||||||
local function rect_getSegmentIntersectionIndices(x,y,w,h, x1,y1,x2,y2, ti1,ti2)
|
|
||||||
ti1, ti2 = ti1 or 0, ti2 or 1
|
|
||||||
local dx, dy = x2-x1, y2-y1
|
|
||||||
local nx, ny
|
|
||||||
local nx1, ny1, nx2, ny2 = 0,0,0,0
|
|
||||||
local p, q, r
|
|
||||||
|
|
||||||
for side = 1,4 do
|
|
||||||
if side == 1 then nx,ny,p,q = -1, 0, -dx, x1 - x -- left
|
|
||||||
elseif side == 2 then nx,ny,p,q = 1, 0, dx, x + w - x1 -- right
|
|
||||||
elseif side == 3 then nx,ny,p,q = 0, -1, -dy, y1 - y -- top
|
|
||||||
else nx,ny,p,q = 0, 1, dy, y + h - y1 -- bottom
|
|
||||||
end
|
|
||||||
|
|
||||||
if p == 0 then
|
|
||||||
if q <= 0 then return nil end
|
|
||||||
else
|
|
||||||
r = q / p
|
|
||||||
if p < 0 then
|
|
||||||
if r > ti2 then return nil
|
|
||||||
elseif r > ti1 then ti1,nx1,ny1 = r,nx,ny
|
|
||||||
end
|
|
||||||
else -- p > 0
|
|
||||||
if r < ti1 then return nil
|
|
||||||
elseif r < ti2 then ti2,nx2,ny2 = r,nx,ny
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return ti1,ti2, nx1,ny1, nx2,ny2
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Calculates the minkowsky difference between 2 rects, which is another rect
|
|
||||||
local function rect_getDiff(x1,y1,w1,h1, x2,y2,w2,h2)
|
|
||||||
return x2 - x1 - w1,
|
|
||||||
y2 - y1 - h1,
|
|
||||||
w1 + w2,
|
|
||||||
h1 + h2
|
|
||||||
end
|
|
||||||
|
|
||||||
local delta = 0.00001 -- floating-point-safe comparisons here, otherwise bugs
|
|
||||||
local function rect_containsPoint(x,y,w,h, px,py)
|
|
||||||
return px - x > delta and py - y > delta and
|
|
||||||
x + w - px > delta and y + h - py > delta
|
|
||||||
end
|
|
||||||
|
|
||||||
local function rect_isIntersecting(x1,y1,w1,h1, x2,y2,w2,h2)
|
|
||||||
return x1 < x2+w2 and x2 < x1+w1 and
|
|
||||||
y1 < y2+h2 and y2 < y1+h1
|
|
||||||
end
|
|
||||||
|
|
||||||
local function rect_getSquareDistance(x1,y1,w1,h1, x2,y2,w2,h2)
|
|
||||||
local dx = x1 - x2 + (w1 - w2)/2
|
|
||||||
local dy = y1 - y2 + (h1 - h2)/2
|
|
||||||
return dx*dx + dy*dy
|
|
||||||
end
|
|
||||||
|
|
||||||
local function rect_detectCollision(x1,y1,w1,h1, x2,y2,w2,h2, goalX, goalY)
|
|
||||||
goalX = goalX or x1
|
|
||||||
goalY = goalY or y1
|
|
||||||
|
|
||||||
local dx, dy = goalX - x1, goalY - y1
|
|
||||||
local x,y,w,h = rect_getDiff(x1,y1,w1,h1, x2,y2,w2,h2)
|
|
||||||
|
|
||||||
local overlaps, ti, nx, ny
|
|
||||||
|
|
||||||
if rect_containsPoint(x,y,w,h, 0,0) then -- item was intersecting other
|
|
||||||
local px, py = rect_getNearestCorner(x,y,w,h, 0, 0)
|
|
||||||
local wi, hi = min(w1, abs(px)), min(h1, abs(py)) -- area of intersection
|
|
||||||
ti = -wi * hi -- ti is the negative area of intersection
|
|
||||||
overlaps = true
|
|
||||||
else
|
|
||||||
local ti1,ti2,nx1,ny1 = rect_getSegmentIntersectionIndices(x,y,w,h, 0,0,dx,dy, -math.huge, math.huge)
|
|
||||||
|
|
||||||
-- item tunnels into other
|
|
||||||
if ti1 and ti1 < 1 and (0 < ti1 or 0 == ti1 and ti2 > 0) then
|
|
||||||
ti, nx, ny = ti1, nx1, ny1
|
|
||||||
overlaps = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if not ti then return end
|
|
||||||
|
|
||||||
local tx, ty
|
|
||||||
|
|
||||||
if overlaps then
|
|
||||||
if dx == 0 and dy == 0 then
|
|
||||||
-- intersecting and not moving - use minimum displacement vector
|
|
||||||
local px, py = rect_getNearestCorner(x,y,w,h, 0,0)
|
|
||||||
if abs(px) < abs(py) then py = 0 else px = 0 end
|
|
||||||
nx, ny = sign(px), sign(py)
|
|
||||||
tx, ty = x1 + px, y1 + py
|
|
||||||
else
|
|
||||||
-- intersecting and moving - move in the opposite direction
|
|
||||||
local ti1
|
|
||||||
ti1,_,nx,ny = rect_getSegmentIntersectionIndices(x,y,w,h, 0,0,dx,dy, -math.huge, 1)
|
|
||||||
tx, ty = x1 + dx * ti1, y1 + dy * ti1
|
|
||||||
end
|
|
||||||
else -- tunnel
|
|
||||||
tx, ty = x1 + dx * ti, y1 + dy * ti
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
overlaps = overlaps,
|
|
||||||
ti = ti,
|
|
||||||
move = {x = dx, y = dy},
|
|
||||||
normal = {x = nx, y = ny},
|
|
||||||
touch = {x = tx, y = ty},
|
|
||||||
itemRect = {x = x1, y = y1, w = w1, h = h1},
|
|
||||||
otherRect = {x = x2, y = y2, w = w2, h = h2}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
-- Grid functions
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
local function grid_toWorld(cellSize, cx, cy)
|
|
||||||
return (cx - 1)*cellSize, (cy-1)*cellSize
|
|
||||||
end
|
|
||||||
|
|
||||||
local function grid_toCell(cellSize, x, y)
|
|
||||||
return floor(x / cellSize) + 1, floor(y / cellSize) + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
-- grid_traverse* functions are based on "A Fast Voxel Traversal Algorithm for Ray Tracing",
|
|
||||||
-- by John Amanides and Andrew Woo - http://www.cse.yorku.ca/~amana/research/grid.pdf
|
|
||||||
-- It has been modified to include both cells when the ray "touches a grid corner",
|
|
||||||
-- and with a different exit condition
|
|
||||||
|
|
||||||
local function grid_traverse_initStep(cellSize, ct, t1, t2)
|
|
||||||
local v = t2 - t1
|
|
||||||
if v > 0 then
|
|
||||||
return 1, cellSize / v, ((ct + v) * cellSize - t1) / v
|
|
||||||
elseif v < 0 then
|
|
||||||
return -1, -cellSize / v, ((ct + v - 1) * cellSize - t1) / v
|
|
||||||
else
|
|
||||||
return 0, math.huge, math.huge
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function grid_traverse(cellSize, x1,y1,x2,y2, f)
|
|
||||||
local cx1,cy1 = grid_toCell(cellSize, x1,y1)
|
|
||||||
local cx2,cy2 = grid_toCell(cellSize, x2,y2)
|
|
||||||
local stepX, dx, tx = grid_traverse_initStep(cellSize, cx1, x1, x2)
|
|
||||||
local stepY, dy, ty = grid_traverse_initStep(cellSize, cy1, y1, y2)
|
|
||||||
local cx,cy = cx1,cy1
|
|
||||||
|
|
||||||
f(cx, cy)
|
|
||||||
|
|
||||||
-- The default implementation had an infinite loop problem when
|
|
||||||
-- approaching the last cell in some occassions. We finish iterating
|
|
||||||
-- when we are *next* to the last cell
|
|
||||||
while abs(cx - cx2) + abs(cy - cy2) > 1 do
|
|
||||||
if tx < ty then
|
|
||||||
tx, cx = tx + dx, cx + stepX
|
|
||||||
f(cx, cy)
|
|
||||||
else
|
|
||||||
-- Addition: include both cells when going through corners
|
|
||||||
if tx == ty then f(cx + stepX, cy) end
|
|
||||||
ty, cy = ty + dy, cy + stepY
|
|
||||||
f(cx, cy)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- If we have not arrived to the last cell, use it
|
|
||||||
if cx ~= cx2 or cy ~= cy2 then f(cx2, cy2) end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
local function grid_toCellRect(cellSize, x,y,w,h)
|
|
||||||
local cx,cy = grid_toCell(cellSize, x, y)
|
|
||||||
local cr,cb = ceil((x+w) / cellSize), ceil((y+h) / cellSize)
|
|
||||||
return cx, cy, cr - cx + 1, cb - cy + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
-- Responses
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
local touch = function(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
local touch = col.touch
|
|
||||||
return touch.x, touch.y, {}, 0
|
|
||||||
end
|
|
||||||
|
|
||||||
local cross = function(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
local touch = col.touch
|
|
||||||
local cols, len = world:project(col.item, x,y,w,h, goalX, goalY, filter)
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
end
|
|
||||||
|
|
||||||
local slide = function(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
goalX = goalX or x
|
|
||||||
goalY = goalY or y
|
|
||||||
|
|
||||||
local touch, move = col.touch, col.move
|
|
||||||
local sx, sy = touch.x, touch.y
|
|
||||||
if move.x ~= 0 or move.y ~= 0 then
|
|
||||||
if col.normal.x == 0 then
|
|
||||||
sx = goalX
|
|
||||||
else
|
|
||||||
sy = goalY
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
col.slide = {x = sx, y = sy}
|
|
||||||
|
|
||||||
x,y = touch.x, touch.y
|
|
||||||
goalX, goalY = sx, sy
|
|
||||||
local cols, len = world:project(col.item, x,y,w,h, goalX, goalY, filter)
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
end
|
|
||||||
|
|
||||||
local bounce = function(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
goalX = goalX or x
|
|
||||||
goalY = goalY or y
|
|
||||||
|
|
||||||
local touch, move = col.touch, col.move
|
|
||||||
local tx, ty = touch.x, touch.y
|
|
||||||
|
|
||||||
local bx, by, bnx, bny = tx, ty, 0,0
|
|
||||||
|
|
||||||
if move.x ~= 0 or move.y ~= 0 then
|
|
||||||
bnx, bny = goalX - tx, goalY - ty
|
|
||||||
if col.normal.x == 0 then bny = -bny else bnx = -bnx end
|
|
||||||
bx, by = tx + bnx, ty + bny
|
|
||||||
end
|
|
||||||
|
|
||||||
col.bounce = {x = bx, y = by}
|
|
||||||
x,y = touch.x, touch.y
|
|
||||||
goalX, goalY = bx, by
|
|
||||||
|
|
||||||
local cols, len = world:project(col.item, x,y,w,h, goalX, goalY, filter)
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
end
|
|
||||||
|
|
||||||
local onewayplatform = function(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
if col.normal.y < 0 and not col.overlaps then
|
|
||||||
col.didTouch = true
|
|
||||||
goalX, goalY, cols, len = slide(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
else
|
|
||||||
goalX, goalY, cols, len = cross(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local onewayplatformTouch = function(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
if col.normal.y < 0 and not col.overlaps then
|
|
||||||
col.didTouch = true
|
|
||||||
goalX, goalY, cols, len = touch(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
else
|
|
||||||
goalX, goalY, cols, len = cross(world, col, x,y,w,h, goalX, goalY, filter)
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
-- World
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
local World = {}
|
|
||||||
local World_mt = {__index = World}
|
|
||||||
|
|
||||||
-- Private functions and methods
|
|
||||||
|
|
||||||
local function sortByWeight(a,b) return a.weight < b.weight end
|
|
||||||
|
|
||||||
local function sortByTiAndDistance(a,b)
|
|
||||||
if a.ti == b.ti then
|
|
||||||
local ir, ar, br = a.itemRect, a.otherRect, b.otherRect
|
|
||||||
local ad = rect_getSquareDistance(ir.x,ir.y,ir.w,ir.h, ar.x,ar.y,ar.w,ar.h)
|
|
||||||
local bd = rect_getSquareDistance(ir.x,ir.y,ir.w,ir.h, br.x,br.y,br.w,br.h)
|
|
||||||
return ad < bd
|
|
||||||
end
|
|
||||||
return a.ti < b.ti
|
|
||||||
end
|
|
||||||
|
|
||||||
local function addItemToCell(self, item, cx, cy)
|
|
||||||
self.rows[cy] = self.rows[cy] or setmetatable({}, {__mode = 'v'})
|
|
||||||
local row = self.rows[cy]
|
|
||||||
row[cx] = row[cx] or {itemCount = 0, x = cx, y = cy, items = setmetatable({}, {__mode = 'k'})}
|
|
||||||
local cell = row[cx]
|
|
||||||
self.nonEmptyCells[cell] = true
|
|
||||||
if not cell.items[item] then
|
|
||||||
cell.items[item] = true
|
|
||||||
cell.itemCount = cell.itemCount + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function removeItemFromCell(self, item, cx, cy)
|
|
||||||
local row = self.rows[cy]
|
|
||||||
if not row or not row[cx] or not row[cx].items[item] then return false end
|
|
||||||
|
|
||||||
local cell = row[cx]
|
|
||||||
cell.items[item] = nil
|
|
||||||
cell.itemCount = cell.itemCount - 1
|
|
||||||
if cell.itemCount == 0 then
|
|
||||||
self.nonEmptyCells[cell] = nil
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
local function getDictItemsInCellRect(self, cl,ct,cw,ch)
|
|
||||||
local items_dict = {}
|
|
||||||
for cy=ct,ct+ch-1 do
|
|
||||||
local row = self.rows[cy]
|
|
||||||
if row then
|
|
||||||
for cx=cl,cl+cw-1 do
|
|
||||||
local cell = row[cx]
|
|
||||||
if cell and cell.itemCount > 0 then -- no cell.itemCount > 1 because tunneling
|
|
||||||
for item,_ in pairs(cell.items) do
|
|
||||||
items_dict[item] = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return items_dict
|
|
||||||
end
|
|
||||||
|
|
||||||
local function getCellsTouchedBySegment(self, x1,y1,x2,y2)
|
|
||||||
|
|
||||||
local cells, cellsLen, visited = {}, 0, {}
|
|
||||||
|
|
||||||
grid_traverse(self.cellSize, x1,y1,x2,y2, function(cx, cy)
|
|
||||||
local row = self.rows[cy]
|
|
||||||
if not row then return end
|
|
||||||
local cell = row[cx]
|
|
||||||
if not cell or visited[cell] then return end
|
|
||||||
|
|
||||||
visited[cell] = true
|
|
||||||
cellsLen = cellsLen + 1
|
|
||||||
cells[cellsLen] = cell
|
|
||||||
end)
|
|
||||||
|
|
||||||
return cells, cellsLen
|
|
||||||
end
|
|
||||||
|
|
||||||
local function getInfoAboutItemsTouchedBySegment(self, x1,y1, x2,y2, filter)
|
|
||||||
local cells, len = getCellsTouchedBySegment(self, x1,y1,x2,y2)
|
|
||||||
local cell, rect, l,t,w,h, ti1,ti2, tii0,tii1
|
|
||||||
local visited, itemInfo, itemInfoLen = {},{},0
|
|
||||||
for i=1,len do
|
|
||||||
cell = cells[i]
|
|
||||||
for item in pairs(cell.items) do
|
|
||||||
if not visited[item] then
|
|
||||||
visited[item] = true
|
|
||||||
if (not filter or filter(item)) then
|
|
||||||
rect = self.rects[item]
|
|
||||||
l,t,w,h = rect.x,rect.y,rect.w,rect.h
|
|
||||||
|
|
||||||
ti1,ti2 = rect_getSegmentIntersectionIndices(l,t,w,h, x1,y1, x2,y2, 0, 1)
|
|
||||||
if ti1 and ((0 < ti1 and ti1 < 1) or (0 < ti2 and ti2 < 1)) then
|
|
||||||
-- the sorting is according to the t of an infinite line, not the segment
|
|
||||||
tii0,tii1 = rect_getSegmentIntersectionIndices(l,t,w,h, x1,y1, x2,y2, -math.huge, math.huge)
|
|
||||||
itemInfoLen = itemInfoLen + 1
|
|
||||||
itemInfo[itemInfoLen] = {item = item, ti1 = ti1, ti2 = ti2, weight = min(tii0,tii1)}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
table.sort(itemInfo, sortByWeight)
|
|
||||||
return itemInfo, itemInfoLen
|
|
||||||
end
|
|
||||||
|
|
||||||
local function getResponseByName(self, name)
|
|
||||||
local response = self.responses[name]
|
|
||||||
if not response then
|
|
||||||
error(('Unknown collision type: %s (%s)'):format(name, type(name)))
|
|
||||||
end
|
|
||||||
return response
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- Misc Public Methods
|
|
||||||
|
|
||||||
function World:addResponse(name, response)
|
|
||||||
self.responses[name] = response
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:project(item, x,y,w,h, goalX, goalY, filter)
|
|
||||||
assertIsRect(x,y,w,h)
|
|
||||||
|
|
||||||
goalX = goalX or x
|
|
||||||
goalY = goalY or y
|
|
||||||
filter = filter or defaultFilter
|
|
||||||
|
|
||||||
local collisions, len = {}, 0
|
|
||||||
|
|
||||||
local visited = {}
|
|
||||||
if item ~= nil then visited[item] = true end
|
|
||||||
|
|
||||||
-- This could probably be done with less cells using a polygon raster over the cells instead of a
|
|
||||||
-- bounding rect of the whole movement. Conditional to building a queryPolygon method
|
|
||||||
local tl, tt = min(goalX, x), min(goalY, y)
|
|
||||||
local tr, tb = max(goalX + w, x+w), max(goalY + h, y+h)
|
|
||||||
local tw, th = tr-tl, tb-tt
|
|
||||||
|
|
||||||
local cl,ct,cw,ch = grid_toCellRect(self.cellSize, tl,tt,tw,th)
|
|
||||||
|
|
||||||
local dictItemsInCellRect = getDictItemsInCellRect(self, cl,ct,cw,ch)
|
|
||||||
|
|
||||||
for other,_ in pairs(dictItemsInCellRect) do
|
|
||||||
if not visited[other] then
|
|
||||||
visited[other] = true
|
|
||||||
|
|
||||||
local responseName = filter(item, other)
|
|
||||||
if responseName then
|
|
||||||
local ox,oy,ow,oh = self:getRect(other)
|
|
||||||
local col = rect_detectCollision(x,y,w,h, ox,oy,ow,oh, goalX, goalY)
|
|
||||||
|
|
||||||
if col then
|
|
||||||
col.other = other
|
|
||||||
col.item = item
|
|
||||||
col.type = responseName
|
|
||||||
|
|
||||||
len = len + 1
|
|
||||||
collisions[len] = col
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
table.sort(collisions, sortByTiAndDistance)
|
|
||||||
|
|
||||||
return collisions, len
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:countCells()
|
|
||||||
local count = 0
|
|
||||||
for _,row in pairs(self.rows) do
|
|
||||||
for _,_ in pairs(row) do
|
|
||||||
count = count + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return count
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:hasItem(item)
|
|
||||||
return not not self.rects[item]
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:getItems()
|
|
||||||
local items, len = {}, 0
|
|
||||||
for item,_ in pairs(self.rects) do
|
|
||||||
len = len + 1
|
|
||||||
items[len] = item
|
|
||||||
end
|
|
||||||
return items, len
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:countItems()
|
|
||||||
local len = 0
|
|
||||||
for _ in pairs(self.rects) do len = len + 1 end
|
|
||||||
return len
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:getRect(item)
|
|
||||||
local rect = self.rects[item]
|
|
||||||
if not rect then
|
|
||||||
error('Item ' .. tostring(item) .. ' must be added to the world before getting its rect. Use world:add(item, x,y,w,h) to add it first.')
|
|
||||||
end
|
|
||||||
return rect.x, rect.y, rect.w, rect.h
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:toWorld(cx, cy)
|
|
||||||
return grid_toWorld(self.cellSize, cx, cy)
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:toCell(x,y)
|
|
||||||
return grid_toCell(self.cellSize, x, y)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Query methods
|
|
||||||
|
|
||||||
function World:queryRect(x,y,w,h, filter)
|
|
||||||
|
|
||||||
local cl,ct,cw,ch = grid_toCellRect(self.cellSize, x,y,w,h)
|
|
||||||
local dictItemsInCellRect = getDictItemsInCellRect(self, cl,ct,cw,ch)
|
|
||||||
|
|
||||||
local items, len = {}, 0
|
|
||||||
|
|
||||||
local rect
|
|
||||||
for item,_ in pairs(dictItemsInCellRect) do
|
|
||||||
rect = self.rects[item]
|
|
||||||
if (not filter or filter(item))
|
|
||||||
and rect_isIntersecting(x,y,w,h, rect.x, rect.y, rect.w, rect.h)
|
|
||||||
then
|
|
||||||
len = len + 1
|
|
||||||
items[len] = item
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return items, len
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:queryPoint(x,y, filter)
|
|
||||||
local cx,cy = self:toCell(x,y)
|
|
||||||
local dictItemsInCellRect = getDictItemsInCellRect(self, cx,cy,1,1)
|
|
||||||
|
|
||||||
local items, len = {}, 0
|
|
||||||
|
|
||||||
local rect
|
|
||||||
for item,_ in pairs(dictItemsInCellRect) do
|
|
||||||
rect = self.rects[item]
|
|
||||||
if (not filter or filter(item))
|
|
||||||
and rect_containsPoint(rect.x, rect.y, rect.w, rect.h, x, y)
|
|
||||||
then
|
|
||||||
len = len + 1
|
|
||||||
items[len] = item
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return items, len
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:querySegment(x1, y1, x2, y2, filter)
|
|
||||||
local itemInfo, len = getInfoAboutItemsTouchedBySegment(self, x1, y1, x2, y2, filter)
|
|
||||||
local items = {}
|
|
||||||
for i=1, len do
|
|
||||||
items[i] = itemInfo[i].item
|
|
||||||
end
|
|
||||||
return items, len
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:querySegmentWithCoords(x1, y1, x2, y2, filter)
|
|
||||||
local itemInfo, len = getInfoAboutItemsTouchedBySegment(self, x1, y1, x2, y2, filter)
|
|
||||||
local dx, dy = x2-x1, y2-y1
|
|
||||||
local info, ti1, ti2
|
|
||||||
for i=1, len do
|
|
||||||
info = itemInfo[i]
|
|
||||||
ti1 = info.ti1
|
|
||||||
ti2 = info.ti2
|
|
||||||
|
|
||||||
info.weight = nil
|
|
||||||
info.x1 = x1 + dx * ti1
|
|
||||||
info.y1 = y1 + dy * ti1
|
|
||||||
info.x2 = x1 + dx * ti2
|
|
||||||
info.y2 = y1 + dy * ti2
|
|
||||||
end
|
|
||||||
return itemInfo, len
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Main methods
|
|
||||||
|
|
||||||
function World:add(item, x,y,w,h)
|
|
||||||
local rect = self.rects[item]
|
|
||||||
if rect then
|
|
||||||
error('Item ' .. tostring(item) .. ' added to the world twice.')
|
|
||||||
end
|
|
||||||
assertIsRect(x,y,w,h)
|
|
||||||
|
|
||||||
self.rects[item] = {x=x,y=y,w=w,h=h}
|
|
||||||
|
|
||||||
local cl,ct,cw,ch = grid_toCellRect(self.cellSize, x,y,w,h)
|
|
||||||
for cy = ct, ct+ch-1 do
|
|
||||||
for cx = cl, cl+cw-1 do
|
|
||||||
addItemToCell(self, item, cx, cy)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return item
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:remove(item)
|
|
||||||
local x,y,w,h = self:getRect(item)
|
|
||||||
|
|
||||||
self.rects[item] = nil
|
|
||||||
local cl,ct,cw,ch = grid_toCellRect(self.cellSize, x,y,w,h)
|
|
||||||
for cy = ct, ct+ch-1 do
|
|
||||||
for cx = cl, cl+cw-1 do
|
|
||||||
removeItemFromCell(self, item, cx, cy)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:update(item, x2,y2,w2,h2)
|
|
||||||
local x,y,w,h = self:getRect(item)
|
|
||||||
w2,h2 = w2 or w, h2 or h
|
|
||||||
assertIsRect(x2,y2,w2,h2)
|
|
||||||
if x ~= x2 or y ~= y2 or w ~= w2 or h ~= h2 then
|
|
||||||
local cellSize = self.cellSize
|
|
||||||
local cl1,ct1,cw1,ch1 = grid_toCellRect(cellSize, x,y,w,h)
|
|
||||||
local cl2,ct2,cw2,ch2 = grid_toCellRect(cellSize, x2,y2,w2,h2)
|
|
||||||
if cl1==cl2 and ct1==ct2 and cw1==cw2 and ch1==ch2 then
|
|
||||||
local rect = self.rects[item]
|
|
||||||
rect.x, rect.y, rect.w, rect.h = x2,y2,w2,h2
|
|
||||||
else
|
|
||||||
self:remove(item)
|
|
||||||
self:add(item, x2,y2,w2,h2)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:move(item, goalX, goalY, filter)
|
|
||||||
local actualX, actualY, cols, len = self:check(item, goalX, goalY, filter)
|
|
||||||
|
|
||||||
self:update(item, actualX, actualY)
|
|
||||||
|
|
||||||
return actualX, actualY, cols, len
|
|
||||||
end
|
|
||||||
|
|
||||||
function World:check(item, goalX, goalY, filter)
|
|
||||||
filter = filter or defaultFilter
|
|
||||||
|
|
||||||
local visited = {[item] = true}
|
|
||||||
local visitedFilter = function(item, other)
|
|
||||||
if visited[other] then return false end
|
|
||||||
return filter(item, other)
|
|
||||||
end
|
|
||||||
|
|
||||||
local cols, len = {}, 0
|
|
||||||
|
|
||||||
local x,y,w,h = self:getRect(item)
|
|
||||||
|
|
||||||
local projected_cols, projected_len = self:project(item, x,y,w,h, goalX,goalY, visitedFilter)
|
|
||||||
|
|
||||||
while projected_len > 0 do
|
|
||||||
local col = projected_cols[1]
|
|
||||||
len = len + 1
|
|
||||||
cols[len] = col
|
|
||||||
|
|
||||||
visited[col.other] = true
|
|
||||||
|
|
||||||
local response = getResponseByName(self, col.type)
|
|
||||||
|
|
||||||
goalX, goalY, projected_cols, projected_len = response(
|
|
||||||
self,
|
|
||||||
col,
|
|
||||||
x, y, w, h,
|
|
||||||
goalX, goalY,
|
|
||||||
visitedFilter
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
return goalX, goalY, cols, len
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- Public library functions
|
|
||||||
|
|
||||||
bump.newWorld = function(cellSize)
|
|
||||||
cellSize = cellSize or 64
|
|
||||||
assertIsPositiveNumber(cellSize, 'cellSize')
|
|
||||||
local world = setmetatable({
|
|
||||||
cellSize = cellSize,
|
|
||||||
rects = {},
|
|
||||||
rows = {},
|
|
||||||
nonEmptyCells = {},
|
|
||||||
responses = {}
|
|
||||||
}, World_mt)
|
|
||||||
|
|
||||||
world:addResponse('touch', touch)
|
|
||||||
world:addResponse('cross', cross)
|
|
||||||
world:addResponse('slide', slide)
|
|
||||||
world:addResponse('bounce', bounce)
|
|
||||||
-- modified here
|
|
||||||
world:addResponse('onewayplatform', onewayplatform)
|
|
||||||
world:addResponse('onewayplatformTouch', onewayplatformTouch)
|
|
||||||
-- to here
|
|
||||||
|
|
||||||
return world
|
|
||||||
end
|
|
||||||
|
|
||||||
bump.rect = {
|
|
||||||
getNearestCorner = rect_getNearestCorner,
|
|
||||||
getSegmentIntersectionIndices = rect_getSegmentIntersectionIndices,
|
|
||||||
getDiff = rect_getDiff,
|
|
||||||
containsPoint = rect_containsPoint,
|
|
||||||
isIntersecting = rect_isIntersecting,
|
|
||||||
getSquareDistance = rect_getSquareDistance,
|
|
||||||
detectCollision = rect_detectCollision
|
|
||||||
}
|
|
||||||
|
|
||||||
bump.responses = {
|
|
||||||
touch = touch,
|
|
||||||
cross = cross,
|
|
||||||
slide = slide,
|
|
||||||
bounce = bounce
|
|
||||||
}
|
|
||||||
|
|
||||||
return bump
|
|
||||||
@@ -1,210 +0,0 @@
|
|||||||
-- gamera.lua v1.0.1
|
|
||||||
|
|
||||||
-- Copyright (c) 2012 Enrique García Cota
|
|
||||||
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
-- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
-- Based on YaciCode, from Julien Patte and LuaObject, from Sebastien Rocca-Serra
|
|
||||||
|
|
||||||
local gamera = {}
|
|
||||||
|
|
||||||
-- Private attributes and methods
|
|
||||||
|
|
||||||
local gameraMt = {__index = gamera}
|
|
||||||
local abs, min, max = math.abs, math.min, math.max
|
|
||||||
|
|
||||||
local function clamp(x, minX, maxX)
|
|
||||||
return x < minX and minX or (x>maxX and maxX or x)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function checkNumber(value, name)
|
|
||||||
if type(value) ~= 'number' then
|
|
||||||
error(name .. " must be a number (was: " .. tostring(value) .. ")")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function checkPositiveNumber(value, name)
|
|
||||||
if type(value) ~= 'number' or value <=0 then
|
|
||||||
error(name .. " must be a positive number (was: " .. tostring(value) ..")")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function checkAABB(l,t,w,h)
|
|
||||||
checkNumber(l, "l")
|
|
||||||
checkNumber(t, "t")
|
|
||||||
checkPositiveNumber(w, "w")
|
|
||||||
checkPositiveNumber(h, "h")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function getVisibleArea(self, scale)
|
|
||||||
scale = scale or self.scale
|
|
||||||
local sin, cos = abs(self.sin), abs(self.cos)
|
|
||||||
local w,h = self.w / scale, self.h / scale
|
|
||||||
w,h = cos*w + sin*h, sin*w + cos*h
|
|
||||||
return min(w,self.ww), min(h, self.wh)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function cornerTransform(self, x,y)
|
|
||||||
local scale, sin, cos = self.scale, self.sin, self.cos
|
|
||||||
x,y = x - self.x, y - self.y
|
|
||||||
x,y = -cos*x + sin*y, -sin*x - cos*y
|
|
||||||
return self.x - (x/scale + self.l), self.y - (y/scale + self.t)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function adjustPosition(self)
|
|
||||||
local wl,wt,ww,wh = self.wl, self.wt, self.ww, self.wh
|
|
||||||
local w,h = getVisibleArea(self)
|
|
||||||
local w2,h2 = w*0.5, h*0.5
|
|
||||||
|
|
||||||
local left, right = wl + w2, wl + ww - w2
|
|
||||||
local top, bottom = wt + h2, wt + wh - h2
|
|
||||||
|
|
||||||
self.x, self.y = clamp(self.x, left, right), clamp(self.y, top, bottom)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function adjustScale(self)
|
|
||||||
local w,h,ww,wh = self.w, self.h, self.ww, self.wh
|
|
||||||
local rw,rh = getVisibleArea(self, 1) -- rotated frame: area around the window, rotated without scaling
|
|
||||||
local sx,sy = rw/ww, rh/wh -- vert/horiz scale: minimun scales that the window needs to occupy the world
|
|
||||||
local rscale = max(sx,sy)
|
|
||||||
|
|
||||||
self.scale = max(self.scale, rscale)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Public interface
|
|
||||||
|
|
||||||
function gamera.new(l,t,w,h)
|
|
||||||
|
|
||||||
local sw,sh = love.graphics.getWidth(), love.graphics.getHeight()
|
|
||||||
|
|
||||||
local cam = setmetatable({
|
|
||||||
x=0, y=0,
|
|
||||||
scale=1,
|
|
||||||
angle=0, sin=math.sin(0), cos=math.cos(0),
|
|
||||||
l=0, t=0, w=sw, h=sh, w2=sw*0.5, h2=sh*0.5
|
|
||||||
}, gameraMt)
|
|
||||||
|
|
||||||
cam:setWorld(l,t,w,h)
|
|
||||||
|
|
||||||
return cam
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:setWorld(l,t,w,h)
|
|
||||||
checkAABB(l,t,w,h)
|
|
||||||
|
|
||||||
self.wl, self.wt, self.ww, self.wh = l,t,w,h
|
|
||||||
|
|
||||||
adjustPosition(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:setWindow(l,t,w,h)
|
|
||||||
checkAABB(l,t,w,h)
|
|
||||||
|
|
||||||
self.l, self.t, self.w, self.h, self.w2, self.h2 = l,t,w,h, w*0.5, h*0.5
|
|
||||||
|
|
||||||
adjustPosition(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:setPosition(x,y)
|
|
||||||
checkNumber(x, "x")
|
|
||||||
checkNumber(y, "y")
|
|
||||||
|
|
||||||
self.x, self.y = x,y
|
|
||||||
|
|
||||||
adjustPosition(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:setScale(scale)
|
|
||||||
checkNumber(scale, "scale")
|
|
||||||
|
|
||||||
self.scale = scale
|
|
||||||
|
|
||||||
adjustScale(self)
|
|
||||||
adjustPosition(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:setAngle(angle)
|
|
||||||
checkNumber(angle, "angle")
|
|
||||||
|
|
||||||
self.angle = angle
|
|
||||||
self.cos, self.sin = math.cos(angle), math.sin(angle)
|
|
||||||
|
|
||||||
adjustScale(self)
|
|
||||||
adjustPosition(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:getWorld()
|
|
||||||
return self.wl, self.wt, self.ww, self.wh
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:getWindow()
|
|
||||||
return self.l, self.t, self.w, self.h
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:getPosition()
|
|
||||||
return self.x, self.y
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:getScale()
|
|
||||||
return self.scale
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:getAngle()
|
|
||||||
return self.angle
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:getVisible()
|
|
||||||
local w,h = getVisibleArea(self)
|
|
||||||
return self.x - w*0.5, self.y - h*0.5, w, h
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:getVisibleCorners()
|
|
||||||
local x,y,w2,h2 = self.x, self.y, self.w2, self.h2
|
|
||||||
|
|
||||||
local x1,y1 = cornerTransform(self, x-w2,y-h2)
|
|
||||||
local x2,y2 = cornerTransform(self, x+w2,y-h2)
|
|
||||||
local x3,y3 = cornerTransform(self, x+w2,y+h2)
|
|
||||||
local x4,y4 = cornerTransform(self, x-w2,y+h2)
|
|
||||||
|
|
||||||
return x1,y1,x2,y2,x3,y3,x4,y4
|
|
||||||
end
|
|
||||||
|
|
||||||
-- modified here
|
|
||||||
function gamera:apply()
|
|
||||||
love.graphics.setScissor(self:getWindow())
|
|
||||||
|
|
||||||
love.graphics.push()
|
|
||||||
local scale = self.scale
|
|
||||||
love.graphics.scale(scale)
|
|
||||||
love.graphics.translate((self.w2 + self.l) / scale, (self.h2+self.t) / scale)
|
|
||||||
love.graphics.rotate(-self.angle)
|
|
||||||
love.graphics.translate(-self.x, -self.y)
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:remove()
|
|
||||||
love.graphics.pop()
|
|
||||||
love.graphics.setScissor()
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:draw(f)
|
|
||||||
self:apply()
|
|
||||||
f(self:getVisible())
|
|
||||||
self:remove()
|
|
||||||
end
|
|
||||||
-- to here
|
|
||||||
|
|
||||||
function gamera:toWorld(x,y)
|
|
||||||
local scale, sin, cos = self.scale, self.sin, self.cos
|
|
||||||
x,y = (x - self.w2 - self.l) / scale, (y - self.h2 - self.t) / scale
|
|
||||||
x,y = cos*x - sin*y, sin*x + cos*y
|
|
||||||
return x + self.x, y + self.y
|
|
||||||
end
|
|
||||||
|
|
||||||
function gamera:toScreen(x,y)
|
|
||||||
local scale, sin, cos = self.scale, self.sin, self.cos
|
|
||||||
x,y = x - self.x, y - self.y
|
|
||||||
x,y = cos*x + sin*y, -sin*x + cos*y
|
|
||||||
return scale * x + self.w2 + self.l, scale * y + self.h2 + self.t
|
|
||||||
end
|
|
||||||
|
|
||||||
return gamera
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
--[[
|
|
||||||
Copyright (c) 2010-2013 Matthias Richter
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
]]--
|
|
||||||
|
|
||||||
local function __NULL__() end
|
|
||||||
|
|
||||||
-- default gamestate produces error on every callback
|
|
||||||
local state_init = setmetatable({leave = __NULL__},
|
|
||||||
{__index = function() error("Gamestate not initialized. Use Gamestate.switch()") end})
|
|
||||||
local stack = {state_init}
|
|
||||||
|
|
||||||
local GS = {}
|
|
||||||
function GS.new(t) return t or {} end -- constructor - deprecated!
|
|
||||||
|
|
||||||
function GS.switch(to, ...)
|
|
||||||
assert(to, "Missing argument: Gamestate to switch to")
|
|
||||||
assert(to ~= GS, "Can't call switch with colon operator")
|
|
||||||
local pre = stack[#stack]
|
|
||||||
;(pre.leave or __NULL__)(pre)
|
|
||||||
;(to.load or __NULL__)(to)
|
|
||||||
to.load = nil
|
|
||||||
stack[#stack] = to
|
|
||||||
return (to.enter or __NULL__)(to, pre, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
function GS.push(to, ...)
|
|
||||||
assert(to, "Missing argument: Gamestate to switch to")
|
|
||||||
assert(to ~= GS, "Can't call push with colon operator")
|
|
||||||
local pre = stack[#stack]
|
|
||||||
;(to.load or __NULL__)(to) -- modified to use load instead of init so as
|
|
||||||
-- to not interfere with 30log.
|
|
||||||
to.load = nil
|
|
||||||
stack[#stack+1] = to
|
|
||||||
return (to.enter or __NULL__)(to, pre, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
function GS.pop(...)
|
|
||||||
assert(#stack > 1, "No more states to pop!")
|
|
||||||
local pre, to = stack[#stack], stack[#stack-1]
|
|
||||||
stack[#stack] = nil
|
|
||||||
;(pre.leave or __NULL__)(pre)
|
|
||||||
return (to.resume or __NULL__)(to, pre, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
function GS.current()
|
|
||||||
return stack[#stack]
|
|
||||||
end
|
|
||||||
|
|
||||||
local all_callbacks = {
|
|
||||||
'draw', 'errhand', 'focus', 'keypressed', 'keyreleased', 'mousefocus',
|
|
||||||
'mousemoved', 'mousepressed', 'mousereleased', 'quit', 'resize',
|
|
||||||
'textinput', 'threaderror', 'update', 'visible', 'gamepadaxis',
|
|
||||||
'gamepadpressed', 'gamepadreleased', 'joystickadded', 'joystickaxis',
|
|
||||||
'joystickhat', 'joystickpressed', 'joystickreleased', 'joystickremoved'
|
|
||||||
}
|
|
||||||
|
|
||||||
function GS.registerEvents(callbacks)
|
|
||||||
local registry = {}
|
|
||||||
callbacks = callbacks or all_callbacks
|
|
||||||
for _, f in ipairs(callbacks) do
|
|
||||||
registry[f] = love[f] or __NULL__
|
|
||||||
love[f] = function(...)
|
|
||||||
registry[f](...)
|
|
||||||
return GS[f](...)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- forward any undefined functions
|
|
||||||
setmetatable(GS, {__index = function(_, func)
|
|
||||||
return function(...)
|
|
||||||
return (stack[#stack][func] or __NULL__)(stack[#stack], ...)
|
|
||||||
end
|
|
||||||
end})
|
|
||||||
|
|
||||||
return GS
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
--[[
|
|
||||||
-- multisource lib
|
|
||||||
-- A multisource is a wrapper on top of a LÖVE source. It allows
|
|
||||||
-- creating multiple sounds easily. It uses an internal pool of
|
|
||||||
-- resources.
|
|
||||||
-- * multisource:play() finds a stopped resource from the pool,
|
|
||||||
-- or creates a new one, and plays and returns it.
|
|
||||||
-- * multisouce:cleanup() liberates the memory of old unplayed sources.
|
|
||||||
]]
|
|
||||||
|
|
||||||
local multisource = {}
|
|
||||||
|
|
||||||
local MultiSource = {}
|
|
||||||
local MultiSourceMt = {__index = MultiSource}
|
|
||||||
|
|
||||||
function MultiSource:cleanup(older_than)
|
|
||||||
older_than = older_than or 5
|
|
||||||
|
|
||||||
local now = love.timer.getTime()
|
|
||||||
|
|
||||||
for instance, lastPlayed in pairs(self.instances) do
|
|
||||||
local age = now - lastPlayed
|
|
||||||
if age > older_than and not instance:isPlaying() then
|
|
||||||
self.instances[instance] = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:getStoppedOrNewInstance()
|
|
||||||
for instance in pairs(self.instances) do
|
|
||||||
if not instance:isPlaying() then return instance end
|
|
||||||
end
|
|
||||||
return self.source:clone()
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:play()
|
|
||||||
local instance = self:getStoppedOrNewInstance()
|
|
||||||
self.instances[instance] = love.timer.getTime()
|
|
||||||
|
|
||||||
instance:play()
|
|
||||||
|
|
||||||
return instance
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:stop()
|
|
||||||
for instance in pairs(self.instances) do
|
|
||||||
instance:stop()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:pause()
|
|
||||||
for instance in pairs(self.instances) do
|
|
||||||
instance:pause()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:setLooping(looping)
|
|
||||||
self.source:setLooping(looping)
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:resume()
|
|
||||||
for instance in pairs(self.instances) do
|
|
||||||
instance:resume()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:countPlayingInstances()
|
|
||||||
local count = 0
|
|
||||||
for instance in pairs(self.instances) do
|
|
||||||
if instance:isPlaying() then
|
|
||||||
count = count + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return count
|
|
||||||
end
|
|
||||||
|
|
||||||
function MultiSource:countInstances()
|
|
||||||
local count = 0
|
|
||||||
for instance in pairs(self.instances) do
|
|
||||||
count = count + 1
|
|
||||||
end
|
|
||||||
return count
|
|
||||||
end
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
multisource.new = function(source)
|
|
||||||
return setmetatable({source = source, instances = {}}, MultiSourceMt)
|
|
||||||
end
|
|
||||||
|
|
||||||
return multisource
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
class = require "lib.30log"
|
|
||||||
tiny = require "lib.tiny"
|
|
||||||
gamestate = require "lib.gamestate" -- slightly modified to play nice;y with 30log
|
|
||||||
local Intro = require "src.states.Intro"
|
|
||||||
local Level = require "src.states.Level"
|
|
||||||
|
|
||||||
local assets = nil
|
|
||||||
|
|
||||||
local beholder = require "lib.beholder"
|
|
||||||
|
|
||||||
local paused = false
|
|
||||||
local pauseNextFrame = false
|
|
||||||
local pauseCanvas = nil
|
|
||||||
|
|
||||||
function love.keypressed(k)
|
|
||||||
beholder.trigger("keypress", k)
|
|
||||||
end
|
|
||||||
|
|
||||||
function love.keyreleased(k)
|
|
||||||
beholder.trigger("keyrelease", k)
|
|
||||||
end
|
|
||||||
|
|
||||||
function love.load()
|
|
||||||
love.mouse.setVisible(false)
|
|
||||||
assets = require "src.assets" -- load assets
|
|
||||||
gamestate.registerEvents()
|
|
||||||
gamestate.switch(Intro())
|
|
||||||
assets.snd_music:play()
|
|
||||||
assets.snd_music:setLooping(true)
|
|
||||||
love.resize(love.graphics.getWidth(), love.graphics.getHeight())
|
|
||||||
end
|
|
||||||
|
|
||||||
function love.draw()
|
|
||||||
if paused then
|
|
||||||
love.graphics.setColor(0.35, 0.35, 0.35, 1)
|
|
||||||
love.graphics.draw(pauseCanvas, 0, 0)
|
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
|
||||||
love.graphics.setFont(assets.fnt_hud)
|
|
||||||
love.graphics.printf("Paused - P to Resume", love.graphics.getWidth() * 0.5 - 125, love.graphics.getHeight() * 0.4, 250, "center")
|
|
||||||
else
|
|
||||||
local dt = love.timer.getDelta()
|
|
||||||
if world then
|
|
||||||
world:update(dt)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function love.update(dt)
|
|
||||||
local s = gamestate.current()
|
|
||||||
if s and s.restartOnSpace and love.keyboard.isDown("space") then
|
|
||||||
local TransitionScreen = require "src.entities.TransitionScreen"
|
|
||||||
world:add(TransitionScreen(true, Intro()))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function love.resize(w, h)
|
|
||||||
pauseCanvas = love.graphics.newCanvas(w, h)
|
|
||||||
if camera then
|
|
||||||
camera:setWindow(0, 0, w, h)
|
|
||||||
end
|
|
||||||
if paused then
|
|
||||||
love.graphics.setCanvas(pauseCanvas)
|
|
||||||
world:update(0)
|
|
||||||
love.graphics.setCanvas()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- quitting
|
|
||||||
beholder.observe("keypress", "escape", love.event.quit)
|
|
||||||
|
|
||||||
-- pausing
|
|
||||||
beholder.observe("keypress", "p", function()
|
|
||||||
paused = not paused
|
|
||||||
if paused then
|
|
||||||
love.graphics.setCanvas(pauseCanvas)
|
|
||||||
world:update(0)
|
|
||||||
love.graphics.setCanvas()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- toggle music
|
|
||||||
beholder.observe("keypress", "m", function()
|
|
||||||
local vol = assets.snd_music:getVolume()
|
|
||||||
if vol == 0 then
|
|
||||||
assets.snd_music:setVolume(1)
|
|
||||||
else
|
|
||||||
assets.snd_music:setVolume(0)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- toggle fullscreen
|
|
||||||
beholder.observe("keypress", "\\", function()
|
|
||||||
local fs = love.window.getFullscreen()
|
|
||||||
if fs then
|
|
||||||
love.window.setMode(900, 600, {resizable = true})
|
|
||||||
else
|
|
||||||
local w, h = love.window.getDesktopDimensions()
|
|
||||||
love.window.setMode(w, h, {fullscreen = true, })
|
|
||||||
end
|
|
||||||
love.resize(love.graphics.getWidth(), love.graphics.getHeight())
|
|
||||||
end)
|
|
||||||
|
Before Width: | Height: | Size: 3.6 MiB |
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.0-2"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.0-2"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.1-1"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.1-1"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.1-2"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.1-2"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.1-3"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.1-3"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.1-4"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.1-4"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.1-5"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.1-5"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.1-6"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.1-6"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "1.1-7"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
tag = "1.1-7"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
local tiny = require "tiny"
|
||||||
|
|
||||||
|
local function deep_copy(x)
|
||||||
|
if type(x) == 'table' then
|
||||||
|
local nx = {}
|
||||||
|
for k, v in next, x, nil do
|
||||||
|
nx[deep_copy(k)] = deep_copy(v)
|
||||||
|
end
|
||||||
|
return nx
|
||||||
|
else
|
||||||
|
return x
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local entityTemplate1 = {
|
||||||
|
xform = {x = 0, y = 0},
|
||||||
|
vel = {x = 1, y = 2},
|
||||||
|
name = "E1",
|
||||||
|
size = 11,
|
||||||
|
description = "It goes to 11.",
|
||||||
|
spinalTap = true
|
||||||
|
}
|
||||||
|
|
||||||
|
local entityTemplate2 = {
|
||||||
|
xform = {x = 2, y = 2},
|
||||||
|
vel = {x = -1, y = 0},
|
||||||
|
name = "E2",
|
||||||
|
size = 10,
|
||||||
|
description = "It does not go to 11.",
|
||||||
|
onlyTen = true
|
||||||
|
}
|
||||||
|
|
||||||
|
local entityTemplate3 = {
|
||||||
|
xform = {x = 4, y = 5},
|
||||||
|
vel = {x = 0, y = 3},
|
||||||
|
name = "E3",
|
||||||
|
size = 8,
|
||||||
|
description = "The smallest entity.",
|
||||||
|
littleMan = true
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('tiny-ecs:', function()
|
||||||
|
|
||||||
|
describe('Filters:', function()
|
||||||
|
|
||||||
|
local entity1, entity2, entity3
|
||||||
|
|
||||||
|
before_each(function()
|
||||||
|
entity1 = deep_copy(entityTemplate1)
|
||||||
|
entity2 = deep_copy(entityTemplate2)
|
||||||
|
entity3 = deep_copy(entityTemplate3)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Default Filters", function()
|
||||||
|
|
||||||
|
local ftap = tiny.requireAll("spinalTap")
|
||||||
|
local fvel = tiny.requireAll("vel")
|
||||||
|
local fxform = tiny.requireAll("xform")
|
||||||
|
local fall = tiny.requireAny("spinalTap", "onlyTen", "littleMan")
|
||||||
|
|
||||||
|
-- Only select Entities without "spinalTap"
|
||||||
|
local frtap = tiny.rejectAny("spinalTap")
|
||||||
|
|
||||||
|
-- Select Entities without all three: "spinalTap", "onlyTen", and
|
||||||
|
-- "littleMan"
|
||||||
|
local frall = tiny.rejectAll("spinalTap", "onlyTen", "littleMan")
|
||||||
|
|
||||||
|
assert.truthy(fall(nil, entity1))
|
||||||
|
assert.truthy(ftap(nil, entity1))
|
||||||
|
assert.falsy(ftap(nil, entity2))
|
||||||
|
assert.truthy(fxform(nil, entity1))
|
||||||
|
assert.truthy(fxform(nil, entity2))
|
||||||
|
|
||||||
|
assert.truthy(fall(nil, entity1))
|
||||||
|
assert.truthy(fall(nil, entity2))
|
||||||
|
assert.truthy(fall(nil, entity3))
|
||||||
|
|
||||||
|
assert.falsy(frtap(nil, entity1))
|
||||||
|
assert.truthy(frtap(nil, entity2))
|
||||||
|
assert.truthy(frtap(nil, entity3))
|
||||||
|
|
||||||
|
assert.truthy(frall(nil, entity1))
|
||||||
|
assert.truthy(frall(nil, entity2))
|
||||||
|
assert.truthy(frall(nil, entity3))
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
describe('World:', function()
|
||||||
|
|
||||||
|
local world, entity1, entity2, entity3
|
||||||
|
|
||||||
|
local moveSystem = tiny.processingSystem()
|
||||||
|
moveSystem.filter = tiny.requireAll("xform", "vel")
|
||||||
|
function moveSystem:process(e, dt)
|
||||||
|
local xform = e.xform
|
||||||
|
local vel = e.vel
|
||||||
|
local x, y = xform.x, xform.y
|
||||||
|
local xvel, yvel = vel.x, vel.y
|
||||||
|
xform.x, xform.y = x + xvel * dt, y + yvel * dt
|
||||||
|
end
|
||||||
|
|
||||||
|
local timePassed = 0
|
||||||
|
local oneTimeSystem = tiny.system()
|
||||||
|
function oneTimeSystem:update(dt)
|
||||||
|
timePassed = timePassed + dt
|
||||||
|
end
|
||||||
|
|
||||||
|
before_each(function()
|
||||||
|
entity1 = deep_copy(entityTemplate1)
|
||||||
|
entity2 = deep_copy(entityTemplate2)
|
||||||
|
entity3 = deep_copy(entityTemplate3)
|
||||||
|
world = tiny.world(moveSystem, oneTimeSystem, entity1, entity2, entity3)
|
||||||
|
timePassed = 0
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Create World", function()
|
||||||
|
assert.equals(world:getEntityCount(), 3)
|
||||||
|
assert.equals(world:getSystemCount(), 2)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Run simple simulation", function()
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(timePassed, 1)
|
||||||
|
assert.equals(entity1.xform.x, 1)
|
||||||
|
assert.equals(entity1.xform.y, 2)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Remove Entities", function()
|
||||||
|
world:remove(entity1, entity2)
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(timePassed, 1)
|
||||||
|
assert.equals(entity1.xform.x, entityTemplate1.xform.x)
|
||||||
|
assert.equals(entity2.xform.x, entityTemplate2.xform.x)
|
||||||
|
assert.equals(entity3.xform.y, 8)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Remove Systems", function()
|
||||||
|
world:remove(moveSystem, oneTimeSystem)
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(timePassed, 0)
|
||||||
|
assert.equals(entity1.xform.x, entityTemplate1.xform.x)
|
||||||
|
assert.equals(0, world:getSystemCount())
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Deactivate and Activate Systems", function()
|
||||||
|
moveSystem.active = false
|
||||||
|
oneTimeSystem.active = false
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(world:getSystemCount(), 2)
|
||||||
|
assert.equals(timePassed, 0)
|
||||||
|
assert.equals(entity1.xform.x, entityTemplate1.xform.x)
|
||||||
|
moveSystem.active = true
|
||||||
|
oneTimeSystem.active = true
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(timePassed, 1)
|
||||||
|
assert.are_not.equal(entity1.xform.x, entityTemplate1.xform.x)
|
||||||
|
assert.equals(world:getSystemCount(), 2)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Clear Entities", function()
|
||||||
|
world:clearEntities()
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(0, world:getEntityCount())
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Clear Systems", function()
|
||||||
|
world:clearSystems()
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(0, world:getSystemCount())
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Add Entities Multiple Times", function()
|
||||||
|
world:update(1)
|
||||||
|
world:add(entity1, entity2, entity3)
|
||||||
|
world:update(2)
|
||||||
|
assert.equals(2, world:getSystemCount())
|
||||||
|
assert.equals(3, world:getEntityCount())
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Remove Entities Multiple Times", function()
|
||||||
|
world:update(1)
|
||||||
|
world:remove(entity1, entity2, entity3)
|
||||||
|
world:update(2)
|
||||||
|
world:remove(entity1, entity2, entity3)
|
||||||
|
world:update(2)
|
||||||
|
assert.equals(2, world:getSystemCount())
|
||||||
|
assert.equals(0, world:getEntityCount())
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Add Systems Multiple Times", function()
|
||||||
|
world:update(1)
|
||||||
|
world:add(moveSystem, oneTimeSystem)
|
||||||
|
world:update(2)
|
||||||
|
assert.equals(2, world:getSystemCount())
|
||||||
|
assert.equals(3, world:getEntityCount())
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Remove Systems Multiple Times", function()
|
||||||
|
world:update(1)
|
||||||
|
world:remove(moveSystem)
|
||||||
|
world:update(2)
|
||||||
|
world:remove(moveSystem)
|
||||||
|
world:update(2)
|
||||||
|
assert.equals(1, world:getSystemCount())
|
||||||
|
assert.equals(3, world:getEntityCount())
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Reorder Systems", function()
|
||||||
|
world:update(1)
|
||||||
|
world:setSystemIndex(moveSystem, 2)
|
||||||
|
world:update(1)
|
||||||
|
assert.equals(2, moveSystem.index)
|
||||||
|
assert.equals(1, oneTimeSystem.index)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("Sorts Entities in Sorting Systems", function()
|
||||||
|
local sortsys = tiny.sortedProcessingSystem()
|
||||||
|
sortsys.filter = tiny.requireAll("vel")
|
||||||
|
function sortsys:compare(e1, e2)
|
||||||
|
return e1.vel.x < e2.vel.x
|
||||||
|
end
|
||||||
|
world:add(sortsys)
|
||||||
|
world:update(0)
|
||||||
|
assert.equals(sortsys.entities[1], entity2)
|
||||||
|
assert.equals(sortsys.entities[2], entity3)
|
||||||
|
assert.equals(sortsys.entities[3], entity1)
|
||||||
|
end)
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
end)
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
local multisource = require "lib.multisource"
|
|
||||||
|
|
||||||
local assets = {}
|
|
||||||
|
|
||||||
love.graphics.setDefaultFilter("nearest", "nearest")
|
|
||||||
|
|
||||||
assets.img_cat = love.graphics.newImage("assets/cat.png")
|
|
||||||
assets.img_catandcannon = love.graphics.newImage("assets/catandcannon.png")
|
|
||||||
assets.img_gun = love.graphics.newImage("assets/gun.png")
|
|
||||||
assets.img_bullet = love.graphics.newImage("assets/bullet.png")
|
|
||||||
assets.img_explosion = love.graphics.newImage("assets/explosion.png")
|
|
||||||
assets.img_pig = love.graphics.newImage("assets/pig.png")
|
|
||||||
assets.img_spawner = love.graphics.newImage("assets/spawner.png")
|
|
||||||
|
|
||||||
assets.snd_catjump = multisource.new(love.audio.newSource("assets/catjump.wav", "static"))
|
|
||||||
assets.snd_cannon = multisource.new(love.audio.newSource("assets/cannon.wav", "static"))
|
|
||||||
assets.snd_thud = multisource.new(love.audio.newSource("assets/thud.wav", "static"))
|
|
||||||
assets.snd_meow = multisource.new(love.audio.newSource("assets/meow.ogg", "static"))
|
|
||||||
assets.snd_oink = multisource.new(love.audio.newSource("assets/oink.ogg", "static"))
|
|
||||||
assets.snd_yay = multisource.new(love.audio.newSource("assets/yay.wav", "static"))
|
|
||||||
|
|
||||||
assets.snd_music = love.audio.newSource("assets/music.ogg", "stream")
|
|
||||||
|
|
||||||
assets.fnt_hud = love.graphics.newFont("assets/font.ttf", 48)
|
|
||||||
assets.fnt_smallhud = love.graphics.newFont("assets/font.ttf", 32)
|
|
||||||
assets.fnt_reallysmallhud = love.graphics.newFont("assets/font.ttf", 24)
|
|
||||||
|
|
||||||
|
|
||||||
return assets
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
local Explosion = require "src.entities.Explosion"
|
|
||||||
|
|
||||||
local Bullet = class("Bullet")
|
|
||||||
|
|
||||||
Bullet.speed = 480
|
|
||||||
Bullet.sprite = assets.img_bullet
|
|
||||||
|
|
||||||
function Bullet:init(x, y, direction)
|
|
||||||
self.pos = {x = x, y = y}
|
|
||||||
self.vel = {x = self.speed * math.cos(direction), y = self.speed * math.sin(direction)}
|
|
||||||
self.offset = {x = 4, y = 4}
|
|
||||||
self.hitbox = {w = 4, h = 4}
|
|
||||||
self.bullet = true
|
|
||||||
self.drot = math.random() - 0.5
|
|
||||||
self.rot = direction
|
|
||||||
self.isBullet = true
|
|
||||||
self.isSolid = true
|
|
||||||
self.gravity = 1300
|
|
||||||
self.bg = true
|
|
||||||
end
|
|
||||||
|
|
||||||
function Bullet:explode()
|
|
||||||
world:remove(self)
|
|
||||||
world:add(Explosion(self.pos.x - 32, self.pos.y - 60))
|
|
||||||
assets.snd_thud:play()
|
|
||||||
end
|
|
||||||
|
|
||||||
function Bullet:update(dt)
|
|
||||||
self.rot = self.rot + self.drot * dt * 10
|
|
||||||
end
|
|
||||||
|
|
||||||
function Bullet:onCollision(col)
|
|
||||||
self:explode()
|
|
||||||
if col.other.isEnemy and col.other.gotHit then
|
|
||||||
col.other:gotHit()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
return Bullet
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
local anim8 = require "lib.anim8"
|
|
||||||
|
|
||||||
local Explosion = class "Explosion"
|
|
||||||
|
|
||||||
Explosion.sprite = assets.img_explosion
|
|
||||||
|
|
||||||
function Explosion:init(x, y)
|
|
||||||
self.pos = {x = x, y = y}
|
|
||||||
self.bg = true
|
|
||||||
local g = anim8.newGrid(64, 64, assets.img_explosion:getWidth(), assets.img_explosion:getHeight())
|
|
||||||
self.animation = anim8.newAnimation(g('1-10', 1), 0.05)
|
|
||||||
self.lifetime = 9 * 0.05
|
|
||||||
end
|
|
||||||
|
|
||||||
return Explosion
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
|
|
||||||
local MainHud = class "MainHud"
|
|
||||||
|
|
||||||
function MainHud:drawHud(dt)
|
|
||||||
local n = self.levelState.totalEnemiesToKill - self.levelState.enemiesKilled
|
|
||||||
local d = self.levelState.totalEnemiesToKill
|
|
||||||
love.graphics.setFont(assets.fnt_hud)
|
|
||||||
love.graphics.printf("Wave " .. self.levelState.wave, 20, 20, 300, "left")
|
|
||||||
love.graphics.setFont(assets.fnt_smallhud)
|
|
||||||
love.graphics.printf(n .. "/" .. d .. " Pigs Remaining", 20, 60, 500, "left")
|
|
||||||
love.graphics.printf("Total Pigs Killed: " .. self.levelState.score, love.graphics.getWidth() - 420, 20, 400, "right")
|
|
||||||
end
|
|
||||||
|
|
||||||
function MainHud:init(levelState)
|
|
||||||
self.levelState = levelState
|
|
||||||
self.hudBg = true
|
|
||||||
end
|
|
||||||
|
|
||||||
return MainHud
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
local anim8 = require "lib.anim8"
|
|
||||||
local Explosion = require "src.entities.Explosion"
|
|
||||||
local gamestate = require "lib.gamestate"
|
|
||||||
|
|
||||||
local Pig = class "Pig"
|
|
||||||
|
|
||||||
Pig.sprite = assets.img_pig
|
|
||||||
|
|
||||||
function Pig:init(x, y, target)
|
|
||||||
self.pos = {x = x, y = y}
|
|
||||||
self.vel = {x = 0, y = 0}
|
|
||||||
self.gravity = 1300
|
|
||||||
|
|
||||||
self.isAlive = true
|
|
||||||
self.isEnemy = true
|
|
||||||
self.isSolid = true
|
|
||||||
|
|
||||||
self.platforming = {
|
|
||||||
acceleration = 1000,
|
|
||||||
speed = 60,
|
|
||||||
jump = 250,
|
|
||||||
friction = 2000,
|
|
||||||
direction = 'r'
|
|
||||||
}
|
|
||||||
|
|
||||||
self.ai = {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
self.hitbox = {w = 30, h = 21}
|
|
||||||
self.health = 50
|
|
||||||
self.maxHealth = 50
|
|
||||||
|
|
||||||
local g = anim8.newGrid(30, 21, assets.img_pig:getWidth(), assets.img_pig:getHeight())
|
|
||||||
self.animation_stand = anim8.newAnimation(g('1-1', 1), 0.1)
|
|
||||||
self.animation_walk = anim8.newAnimation(g('2-5', 1), 0.1)
|
|
||||||
self.animation = self.animation_stand
|
|
||||||
self.fg = true
|
|
||||||
end
|
|
||||||
|
|
||||||
function Pig:gotHit()
|
|
||||||
if self.isAlive then
|
|
||||||
self.isAlive = nil
|
|
||||||
self.lifetime = 0.25
|
|
||||||
self.fadeTime = 0.25
|
|
||||||
self.alpha = 1
|
|
||||||
self.ai = nil
|
|
||||||
self.platforming.moving = false
|
|
||||||
self.vel.y = -300
|
|
||||||
self.vel.x = 0
|
|
||||||
assets.snd_oink:play()
|
|
||||||
assets.snd_yay:play()
|
|
||||||
world:add(self)
|
|
||||||
gamestate.current().score = gamestate.current().score + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return Pig
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
local anim8 = require "lib.anim8"
|
|
||||||
local Bullet = require "src.entities.Bullet"
|
|
||||||
local TimerEvent = require "src.entities.TimerEvent"
|
|
||||||
local ScreenSplash = require "src.entities.ScreenSplash"
|
|
||||||
local gamestate = require "lib.gamestate"
|
|
||||||
|
|
||||||
local Player = class("Player")
|
|
||||||
|
|
||||||
function Player:draw(dt)
|
|
||||||
if self.hasGun then
|
|
||||||
local p = self.animation.position
|
|
||||||
local dy = (p ~= 2 and p ~= 3) and 0 or -1
|
|
||||||
local dx = self.platforming.direction == 'l' and 2 or -2
|
|
||||||
love.graphics.draw(assets.img_gun, self.pos.x + 16 + dx, self.pos.y + 10 + dy, self.gunAngle - math.pi / 4)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Player:onHit()
|
|
||||||
self.isAlive = nil
|
|
||||||
self.lifetime = 0.25
|
|
||||||
self.fadeTime = 0.25
|
|
||||||
self.alpha = 1
|
|
||||||
self.ai = nil
|
|
||||||
self.platforming.moving = false
|
|
||||||
self.vel.y = -300
|
|
||||||
self.vel.x = (math.random() - 0.5) * 400
|
|
||||||
self.controlable = nil
|
|
||||||
assets.snd_meow:play()
|
|
||||||
world:add(self)
|
|
||||||
local n = gamestate.current().score
|
|
||||||
local message = "You Died."
|
|
||||||
if n == 0 then message = "You Failed Pretty Hard."
|
|
||||||
elseif n < 10 then message = "You Killed Some Pigs and They Killed you Back."
|
|
||||||
elseif n < 30 then message = "That's a lot of Bacon."
|
|
||||||
elseif n < 100 then message = "You a crazy Pig Killer."
|
|
||||||
else message = "Pigpocolypse." end
|
|
||||||
|
|
||||||
world:add(TimerEvent(1.2, function() world:add(ScreenSplash(0.5, 0.4, message .. " Press Space to Try Again.", 800)) end))
|
|
||||||
gamestate.current().isSpawning = false
|
|
||||||
gamestate.current().restartOnSpace = true
|
|
||||||
end
|
|
||||||
|
|
||||||
function Player:onCollision(col)
|
|
||||||
if self.isAlive and col.other.isEnemy and col.other.isAlive then
|
|
||||||
self:onHit()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Player:init(args)
|
|
||||||
self.cameraTrack = {xoffset = 16, yoffset = -35}
|
|
||||||
self.pos = {x = args.x, y = args.y}
|
|
||||||
self.vel = {x = 0, y = 0}
|
|
||||||
self.gravity = 1300
|
|
||||||
self.platforming = {
|
|
||||||
acceleration = 1000,
|
|
||||||
speed = 130,
|
|
||||||
jump = 380,
|
|
||||||
friction = 2000,
|
|
||||||
direction = 'r'
|
|
||||||
}
|
|
||||||
self.isAlive = true
|
|
||||||
self.isPlayer = true
|
|
||||||
self.isSolid = true
|
|
||||||
self.controlable = true
|
|
||||||
self.hitbox = {w = 32, h = 32}
|
|
||||||
self.checkCollisions = true
|
|
||||||
self.sprite = assets.img_catandcannon
|
|
||||||
self.fg = true
|
|
||||||
local g = anim8.newGrid(32, 32, assets.img_cat:getWidth(), assets.img_cat:getHeight())
|
|
||||||
self.animation_stand = anim8.newAnimation(g('1-1', 1), 0.1)
|
|
||||||
self.animation_walk = anim8.newAnimation(g('2-5', 1), 0.1)
|
|
||||||
self.animation = self.animation_stand
|
|
||||||
self.health = 100
|
|
||||||
self.maxHealth = 100
|
|
||||||
self.shotTimer = 0
|
|
||||||
self.shotInterval = 0.45
|
|
||||||
self.gunAngle = 2 * math.pi
|
|
||||||
self.hasGun = true
|
|
||||||
end
|
|
||||||
|
|
||||||
return Player
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
local ScreenSplash = class("Screen Splash")
|
|
||||||
local assets = require "src.assets"
|
|
||||||
|
|
||||||
function ScreenSplash:drawHud()
|
|
||||||
love.graphics.setFont(self.splash.fnt or assets.fnt_hud)
|
|
||||||
local align = self.align
|
|
||||||
local w, h = love.graphics.getWidth() * self.pos.x, love.graphics.getHeight() * self.pos.y
|
|
||||||
local dx, dy = self.offset.x, self.offset.y
|
|
||||||
if align == "center" then
|
|
||||||
dx = dx - self.splash.width / 2
|
|
||||||
end
|
|
||||||
if align == "right" then
|
|
||||||
dx = dx - self.splash.width
|
|
||||||
end
|
|
||||||
love.graphics.printf(self.splash.text, w + dx, h + dy, self.splash.width, self.align)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ScreenSplash:init(x, y, text, width, fnt, align, xo, yo)
|
|
||||||
self.pos = {x = x, y = y}
|
|
||||||
self.offset = {x = xo or 0, y = yo or 0}
|
|
||||||
self.hudBg = true
|
|
||||||
self.align = align or "center"
|
|
||||||
self.splash = {
|
|
||||||
text = text,
|
|
||||||
fnt = fnt,
|
|
||||||
width = width or 400
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return ScreenSplash
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
local Pig = require "src.entities.Pig"
|
|
||||||
|
|
||||||
local Spawner = class "Spawner"
|
|
||||||
|
|
||||||
Spawner.sprite = assets.img_spawner
|
|
||||||
|
|
||||||
function Spawner:init(args)
|
|
||||||
self.pos = {x = args.x + 32, y = args.y + 32}
|
|
||||||
self.offset = {x = 32, y = 32}
|
|
||||||
self.scale = {x = 1, y = 1}
|
|
||||||
self.rot = 0
|
|
||||||
self.bg = true
|
|
||||||
self.isSpawner = true
|
|
||||||
end
|
|
||||||
|
|
||||||
function Spawner:update(dt)
|
|
||||||
self.rot = self.rot + 2 * dt
|
|
||||||
local s = math.random() * 0.2 + 0.9
|
|
||||||
self.scale.x, self.scale.y = s, s
|
|
||||||
end
|
|
||||||
|
|
||||||
function Spawner:spawn()
|
|
||||||
world:add(Pig(self.pos.x - 15, self.pos.y - 10, nil))
|
|
||||||
end
|
|
||||||
|
|
||||||
return Spawner
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
local TimerEvent = class "TimerEvent"
|
|
||||||
|
|
||||||
function TimerEvent:init(time, fn)
|
|
||||||
self.lifetime = time
|
|
||||||
self.timerCallback = fn
|
|
||||||
end
|
|
||||||
|
|
||||||
function TimerEvent:onLifeover()
|
|
||||||
self.timerCallback()
|
|
||||||
end
|
|
||||||
|
|
||||||
return TimerEvent
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
local gamestate = require "lib.gamestate"
|
|
||||||
local TransitionScreen = class "TransitionScreen"
|
|
||||||
|
|
||||||
TransitionScreen.hudFg = true
|
|
||||||
|
|
||||||
-- mode is true for "toblack" or false for "totransparent"
|
|
||||||
function TransitionScreen:init(mode, newState)
|
|
||||||
self.lifetime = 0.5
|
|
||||||
self.newState = newState
|
|
||||||
if mode then
|
|
||||||
self.alpha = 0
|
|
||||||
self.fadeTime = -0.5
|
|
||||||
else
|
|
||||||
self.alpha = 1
|
|
||||||
self.fadeTime = 0.5
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function TransitionScreen:drawHud(dt)
|
|
||||||
local r1, g1, b1, a = love.graphics.getColor()
|
|
||||||
love.graphics.setColor(0, 0, 0, self.alpha)
|
|
||||||
love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
|
|
||||||
love.graphics.setColor(r1, g1, b1, a)
|
|
||||||
end
|
|
||||||
|
|
||||||
function TransitionScreen:onLifeover()
|
|
||||||
if self.newState then
|
|
||||||
gamestate.switch(self.newState)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return TransitionScreen
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
local gamestate = require "lib.gamestate"
|
|
||||||
local Level = require "src.states.Level"
|
|
||||||
local TimerEvent = require "src.entities.TimerEvent"
|
|
||||||
local ScreenSplash = require "src.entities.ScreenSplash"
|
|
||||||
local TransitionScreen = require "src.entities.TransitionScreen"
|
|
||||||
local Level = require "src.states.Level"
|
|
||||||
local assets = require "src.assets"
|
|
||||||
local sti = require("lib.sti")
|
|
||||||
local gamera = require("lib.gamera")
|
|
||||||
|
|
||||||
local Intro = class "Intro"
|
|
||||||
|
|
||||||
function Intro:load()
|
|
||||||
|
|
||||||
local tileMap = sti.new("assets/intro")
|
|
||||||
local w, h = tileMap.tilewidth * tileMap.width, tileMap.tileheight * tileMap.height
|
|
||||||
local camera = gamera.new(0, 0, w, h)
|
|
||||||
camera:setPosition(600, 600)
|
|
||||||
camera:setScale(2)
|
|
||||||
|
|
||||||
self.time = 0
|
|
||||||
self.world = tiny.world(
|
|
||||||
require ("src.systems.DrawBackgroundSystem")(140, 205, 255),
|
|
||||||
require ("src.systems.FadeSystem")(),
|
|
||||||
require ("src.systems.LifetimeSystem")(),
|
|
||||||
require ("src.systems.TileMapRenderSystem")(camera, tileMap),
|
|
||||||
require ("src.systems.SpriteSystem")(camera, "bg"),
|
|
||||||
require ("src.systems.SpriteSystem")(camera, "fg"),
|
|
||||||
require ("src.systems.HudSystem")("hudBg"),
|
|
||||||
require ("src.systems.HudSystem")("hudFg"),
|
|
||||||
TransitionScreen(),
|
|
||||||
ScreenSplash(0.5, 0.2, "Commando Kibbles"),
|
|
||||||
ScreenSplash(0, 0, "Created by bakpakin for Ludum Dare 32", 300, assets.fnt_reallysmallhud, "left", 20, 20),
|
|
||||||
ScreenSplash(0.5, 0.36, "Press Space to Start", 500, assets.fnt_smallhud),
|
|
||||||
ScreenSplash(0.5, 0.45, "Controls:\nMove - WASD\nRotate Cannon - Arrow Keys\nFire - Down\nToggle Fullscreen - \\\nToggle Music - M\nPause - P\nEscape - Quit", 800, assets.fnt_reallysmallhud)
|
|
||||||
)
|
|
||||||
_G.world = self.world
|
|
||||||
_G.camera = camera
|
|
||||||
end
|
|
||||||
|
|
||||||
function Intro:update(dt)
|
|
||||||
self.time = self.time + dt
|
|
||||||
if love.keyboard.isDown("space") and self.time > 0.55 then
|
|
||||||
world:add(TransitionScreen(true, Level("assets/lvl1")))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Intro:draw()
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
return Intro
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
local sti = require("lib.sti")
|
|
||||||
local bump = require("lib.bump")
|
|
||||||
local gamera = require("lib.gamera")
|
|
||||||
local TimerEvent = require "src.entities.TimerEvent"
|
|
||||||
local ScreenSplash = require "src.entities.ScreenSplash"
|
|
||||||
local TransitionScreen = require "src.entities.TransitionScreen"
|
|
||||||
|
|
||||||
local Level = class "Level"
|
|
||||||
|
|
||||||
local waveTable = {4, 10, 20, 50, 80, 100, 120, 150, 180, 200, 250}
|
|
||||||
local waveSpawnSpeeds = {1, 1, 1.5, 2, 2, 2.2, 3, 3, 4, 5, 7}
|
|
||||||
|
|
||||||
function Level:init(mappath)
|
|
||||||
self.mappath = mappath
|
|
||||||
end
|
|
||||||
|
|
||||||
function Level:nextWave()
|
|
||||||
self.wave = self.wave + 1
|
|
||||||
self.enemiesKilled = 0
|
|
||||||
self.totalEnemiesToKill = waveTable[self.wave] or math.huge
|
|
||||||
self.enemiesSpawned = 0
|
|
||||||
self.spawnInterval = 3 / (waveSpawnSpeeds[self.wave] or 10)
|
|
||||||
self.isSpawning = true
|
|
||||||
if self.wave == #waveTable + 1 then
|
|
||||||
local splash = ScreenSplash(0.5, 0.5, "Kill Them ALL!!")
|
|
||||||
world:add(TimerEvent(1, function() world:add(splash) end),
|
|
||||||
TimerEvent(3, function() world:remove(splash) end))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Level:load()
|
|
||||||
local tileMap = sti.new(self.mappath)
|
|
||||||
local bumpWorld = bump.newWorld(tileMap.tilewidth * 2)
|
|
||||||
local w, h = tileMap.tilewidth * tileMap.width, tileMap.tileheight * tileMap.height
|
|
||||||
local camera = gamera.new(0, 0, w, h)
|
|
||||||
|
|
||||||
self.wave = 0
|
|
||||||
self:nextWave()
|
|
||||||
self.score = 0
|
|
||||||
|
|
||||||
self.spawnerCount = 0
|
|
||||||
self.spawners = {}
|
|
||||||
|
|
||||||
self.tileMap = tileMap
|
|
||||||
self.bumpWorld = bumpWorld
|
|
||||||
self.camera = camera
|
|
||||||
|
|
||||||
self.aiSystem = require ("src.systems.AISystem")()
|
|
||||||
|
|
||||||
local r, g, b = tileMap.backgroundcolor[1], tileMap.backgroundcolor[2], tileMap.backgroundcolor[3]
|
|
||||||
|
|
||||||
camera:setScale(2)
|
|
||||||
local world = tiny.world(
|
|
||||||
require ("src.systems.DrawBackgroundSystem")(r, g, b),
|
|
||||||
require ("src.systems.UpdateSystem")(),
|
|
||||||
require ("src.systems.PlayerControlSystem")(),
|
|
||||||
self.aiSystem,
|
|
||||||
require ("src.systems.FadeSystem")(),
|
|
||||||
require ("src.systems.PlatformingSystem")(),
|
|
||||||
require ("src.systems.BumpPhysicsSystem")(bumpWorld),
|
|
||||||
require ("src.systems.CameraTrackingSystem")(camera),
|
|
||||||
require ("src.systems.TileMapRenderSystem")(camera, tileMap),
|
|
||||||
require ("src.systems.SpriteSystem")(camera, "bg"),
|
|
||||||
require ("src.systems.SpriteSystem")(camera, "fg"),
|
|
||||||
require ("src.systems.LifetimeSystem")(),
|
|
||||||
require ("src.systems.HudSystem")("hudBg"),
|
|
||||||
require ("src.systems.HudSystem")("hudFg"),
|
|
||||||
require ("src.systems.WaveSystem")(self),
|
|
||||||
require ("src.systems.SpawnSystem")(self),
|
|
||||||
require ("src.entities.MainHud")(self),
|
|
||||||
TransitionScreen()
|
|
||||||
)
|
|
||||||
|
|
||||||
local player = nil
|
|
||||||
|
|
||||||
for lindex, layer in ipairs(tileMap.layers) do
|
|
||||||
if layer.properties.collidable == "true" then
|
|
||||||
-- Entire layer
|
|
||||||
if layer.type == "tilelayer" then
|
|
||||||
local prefix = layer.properties.oneway == "true" and "o(" or "t("
|
|
||||||
for y, tiles in ipairs(layer.data) do
|
|
||||||
for x, tile in pairs(tiles) do
|
|
||||||
bumpWorld:add(
|
|
||||||
prefix..layer.name..", "..x..", "..y..")",
|
|
||||||
x * tileMap.tilewidth + tile.offset.x,
|
|
||||||
y * tileMap.tileheight + tile.offset.y,
|
|
||||||
tile.width,
|
|
||||||
tile.height
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif layer.type == "imagelayer" then
|
|
||||||
bumpWorld:add(
|
|
||||||
layer.name,
|
|
||||||
layer.x or 0,
|
|
||||||
layer.y or 0,
|
|
||||||
layer.width,
|
|
||||||
layer.height
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if layer.type == "objectgroup" then
|
|
||||||
for _, object in ipairs(layer.objects) do
|
|
||||||
local ctor = require("src.entities." .. object.type)
|
|
||||||
local e = ctor(object)
|
|
||||||
if object.type == "Player" then
|
|
||||||
player = e
|
|
||||||
end
|
|
||||||
world:add(e)
|
|
||||||
end
|
|
||||||
tileMap:removeLayer(lindex)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
self.aiSystem.target = player
|
|
||||||
|
|
||||||
-- add ends to prevent objects from falling off the edge of the world.
|
|
||||||
bumpWorld:add("_leftBlock", -16, 0, 16, h)
|
|
||||||
bumpWorld:add("_rightBlock", w, 0, 16, h)
|
|
||||||
bumpWorld:add("_topBlock", 0, -16, w, 16)
|
|
||||||
|
|
||||||
-- globals
|
|
||||||
_G.camera = camera
|
|
||||||
_G.world = world
|
|
||||||
end
|
|
||||||
|
|
||||||
return Level
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
local AISystem = tiny.processingSystem(class "AISystem")
|
|
||||||
|
|
||||||
function AISystem:init(target)
|
|
||||||
self.target = target
|
|
||||||
end
|
|
||||||
|
|
||||||
AISystem.filter = tiny.requireAll("ai", "pos", "platforming")
|
|
||||||
|
|
||||||
function AISystem:process(e, dt)
|
|
||||||
if not self.target then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local targetx = self.target.pos.x
|
|
||||||
local pos = e.pos
|
|
||||||
local p = e.platforming
|
|
||||||
p.moving = self.target.isAlive
|
|
||||||
if targetx > pos.x then
|
|
||||||
p.direction = 'r'
|
|
||||||
end
|
|
||||||
if targetx < pos.x then
|
|
||||||
p.direction = 'l'
|
|
||||||
end
|
|
||||||
p.jumping = math.random() < 0.5 * dt
|
|
||||||
end
|
|
||||||
|
|
||||||
return AISystem
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
local BumpPhysicsSystem = tiny.processingSystem(class "BumpPhysicsSystem")
|
|
||||||
|
|
||||||
function BumpPhysicsSystem:init(bumpWorld)
|
|
||||||
self.bumpWorld = bumpWorld
|
|
||||||
end
|
|
||||||
|
|
||||||
BumpPhysicsSystem.filter = tiny.requireAll("pos", "vel", "hitbox")
|
|
||||||
|
|
||||||
local oneWayPrefix = "o"
|
|
||||||
oneWayPrefix = oneWayPrefix:byte(1)
|
|
||||||
local function collisionFilter(e1, e2)
|
|
||||||
if e1.isPlayer then
|
|
||||||
if e2.isBullet then return nil end
|
|
||||||
if e2.isEnemy then return 'cross' end
|
|
||||||
elseif e1.isEnemy then
|
|
||||||
if e2.isBullet then return nil end
|
|
||||||
if e2.isEnemy then return nil end
|
|
||||||
if e2.isPlayer then return 'cross' end
|
|
||||||
elseif e1.isBullet then
|
|
||||||
if e2.isPlayer or e2.isBullet then return nil end
|
|
||||||
end
|
|
||||||
if e1.isSolid then
|
|
||||||
if type(e2) == "string" then -- tile collision
|
|
||||||
if e2:byte(1) == oneWayPrefix then -- one way tile
|
|
||||||
if e1.isBullet then
|
|
||||||
return 'onewayplatformTouch'
|
|
||||||
else
|
|
||||||
return 'onewayplatform'
|
|
||||||
end
|
|
||||||
else
|
|
||||||
return 'slide'
|
|
||||||
end
|
|
||||||
elseif e2.isSolid then
|
|
||||||
return 'slide'
|
|
||||||
elseif e2.isBouncy then
|
|
||||||
return 'bounce'
|
|
||||||
else
|
|
||||||
return 'cross'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
function BumpPhysicsSystem:process(e, dt)
|
|
||||||
local pos = e.pos
|
|
||||||
local vel = e.vel
|
|
||||||
local gravity = e.gravity or 0
|
|
||||||
vel.y = vel.y + gravity * dt
|
|
||||||
local cols, len
|
|
||||||
pos.x, pos.y, cols, len = self.bumpWorld:move(e, pos.x + vel.x * dt, pos.y + vel.y * dt, collisionFilter)
|
|
||||||
e.grounded = false
|
|
||||||
for i = 1, len do
|
|
||||||
local col = cols[i]
|
|
||||||
local collided = true
|
|
||||||
if col.type == "touch" then
|
|
||||||
vel.x, vel.y = 0, 0
|
|
||||||
elseif col.type == "slide" then
|
|
||||||
if col.normal.x == 0 then
|
|
||||||
vel.y = 0
|
|
||||||
if col.normal.y < 0 then
|
|
||||||
e.grounded = true
|
|
||||||
end
|
|
||||||
else
|
|
||||||
vel.x = 0
|
|
||||||
end
|
|
||||||
elseif col.type == "onewayplatform" then
|
|
||||||
if col.didTouch then
|
|
||||||
vel.y = 0
|
|
||||||
e.grounded = true
|
|
||||||
else
|
|
||||||
collided = false
|
|
||||||
end
|
|
||||||
elseif col.type == "onewayplatformTouch" then
|
|
||||||
if col.didTouch then
|
|
||||||
vel.y = 0
|
|
||||||
e.grounded = true
|
|
||||||
else
|
|
||||||
collided = false
|
|
||||||
end
|
|
||||||
elseif col.type == "bounce" then
|
|
||||||
if col.normal.x == 0 then
|
|
||||||
vel.y = -vel.y
|
|
||||||
e.grounded = true
|
|
||||||
else
|
|
||||||
vel.x = -vel.x
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if e.onCollision and collided then
|
|
||||||
e:onCollision(col)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function BumpPhysicsSystem:onAdd(e)
|
|
||||||
local pos = e.pos
|
|
||||||
local hitbox = e.hitbox
|
|
||||||
self.bumpWorld:add(e, pos.x, pos.y, hitbox.w, hitbox.h)
|
|
||||||
end
|
|
||||||
|
|
||||||
function BumpPhysicsSystem:onRemove(e)
|
|
||||||
self.bumpWorld:remove(e)
|
|
||||||
end
|
|
||||||
|
|
||||||
return BumpPhysicsSystem
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
local CameraTrackingSystem = tiny.processingSystem(class "CameraTrackingSystem")
|
|
||||||
|
|
||||||
CameraTrackingSystem.filter = tiny.requireAll("cameraTrack", "pos")
|
|
||||||
|
|
||||||
function CameraTrackingSystem:init(camera)
|
|
||||||
self.camera = camera
|
|
||||||
end
|
|
||||||
|
|
||||||
local function round(x)
|
|
||||||
return math.floor(x * 32 + 16) / 32
|
|
||||||
end
|
|
||||||
|
|
||||||
function CameraTrackingSystem:process(e, dt)
|
|
||||||
local xo, yo = e.cameraTrack.xoffset, e.cameraTrack.yoffset
|
|
||||||
local x, y = e.pos.x + xo, e.pos.y + yo
|
|
||||||
local xp, yp = self.camera:getPosition()
|
|
||||||
local lerp = 0.1
|
|
||||||
self.camera:setPosition(round(xp + (x - xp) * lerp), round(yp + (y - yp) * lerp))
|
|
||||||
end
|
|
||||||
|
|
||||||
function CameraTrackingSystem:onAdd(e)
|
|
||||||
local xo, yo = e.cameraTrack.xoffset, e.cameraTrack.yoffset
|
|
||||||
local x, y = e.pos.x + xo, e.pos.y + yo
|
|
||||||
self.camera:setPosition(round(x), round(y))
|
|
||||||
end
|
|
||||||
|
|
||||||
return CameraTrackingSystem
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
local DrawBackgroundSystem = tiny.system(class "DrawBackgroundSystem")
|
|
||||||
|
|
||||||
function DrawBackgroundSystem:init(r, g, b)
|
|
||||||
self.r, self.g, self.b = (r / 255), (g / 255), (b / 255)
|
|
||||||
end
|
|
||||||
|
|
||||||
function DrawBackgroundSystem:update(dt)
|
|
||||||
local r1, g1, b1, a = love.graphics.getColor()
|
|
||||||
love.graphics.setColor(self.r, self.g, self.b, 1)
|
|
||||||
love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
|
|
||||||
love.graphics.setColor(r1, g1, b1, a)
|
|
||||||
end
|
|
||||||
|
|
||||||
return DrawBackgroundSystem
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
local FadeSystem = tiny.processingSystem(class "FadeSystem")
|
|
||||||
|
|
||||||
FadeSystem.filter = tiny.requireAll("fadeTime", "alpha")
|
|
||||||
|
|
||||||
function FadeSystem:process(e, dt)
|
|
||||||
e.alpha = math.min(1, math.max(0, e.alpha - dt / e.fadeTime))
|
|
||||||
end
|
|
||||||
|
|
||||||
return FadeSystem
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
local HudSystem = tiny.processingSystem(class "HudSystem")
|
|
||||||
|
|
||||||
function HudSystem:init(layerFlag)
|
|
||||||
self.filter = tiny.requireAll("drawHud", layerFlag)
|
|
||||||
end
|
|
||||||
|
|
||||||
function HudSystem:process(e, dt)
|
|
||||||
e:drawHud(dt)
|
|
||||||
end
|
|
||||||
|
|
||||||
return HudSystem
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
local LifetimeSystem = tiny.processingSystem(class "LifetimeSystem")
|
|
||||||
|
|
||||||
LifetimeSystem.filter = tiny.requireAll("lifetime")
|
|
||||||
|
|
||||||
function LifetimeSystem:process(e, dt)
|
|
||||||
e.lifetime = e.lifetime - dt
|
|
||||||
if e.lifetime <= 0 then
|
|
||||||
if e.onLifeover then
|
|
||||||
e:onLifeover()
|
|
||||||
end
|
|
||||||
world:remove(e)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return LifetimeSystem
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
|
|
||||||
local PlatformingSystem = tiny.processingSystem(class "PlatformingSystem")
|
|
||||||
|
|
||||||
PlatformingSystem.filter = tiny.requireAll("pos", "vel", "platforming")
|
|
||||||
|
|
||||||
function PlatformingSystem:process(e, dt)
|
|
||||||
local pos = e.pos
|
|
||||||
local vel = e.vel
|
|
||||||
local platforming = e.platforming
|
|
||||||
local acceleration = platforming.acceleration
|
|
||||||
local friction = platforming.friction
|
|
||||||
local speed = platforming.speed
|
|
||||||
local direction = platforming.direction
|
|
||||||
e.flippedH = direction == 'l'
|
|
||||||
|
|
||||||
if platforming.moving then
|
|
||||||
if direction == 'l' then
|
|
||||||
vel.x = math.max(-speed, vel.x - acceleration * dt)
|
|
||||||
elseif direction == 'r' then
|
|
||||||
vel.x = math.min(speed, vel.x + acceleration * dt)
|
|
||||||
end
|
|
||||||
elseif e.grounded then
|
|
||||||
if vel.x > 0 then
|
|
||||||
vel.x = math.max(0, vel.x - friction * dt)
|
|
||||||
elseif vel.x < 0 then
|
|
||||||
vel.x = math.min(0, vel.x + friction * dt)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if platforming.jumping and e.grounded then
|
|
||||||
vel.y = -platforming.jump
|
|
||||||
e.grounded = false
|
|
||||||
assets.snd_catjump:play()
|
|
||||||
end
|
|
||||||
|
|
||||||
e.animation = platforming.moving and e.animation_walk or e.animation_stand
|
|
||||||
end
|
|
||||||
|
|
||||||
return PlatformingSystem
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
local assets = require "src.assets"
|
|
||||||
local Bullet = require "src.entities.Bullet"
|
|
||||||
|
|
||||||
local PlayerControlSystem = tiny.processingSystem(class "PlayerControlSystem")
|
|
||||||
|
|
||||||
PlayerControlSystem.filter = tiny.requireAll("controlable")
|
|
||||||
|
|
||||||
function PlayerControlSystem:process(e, dt)
|
|
||||||
local vel = e.vel
|
|
||||||
local p = e.platforming
|
|
||||||
local l, r, u = love.keyboard.isDown('a'), love.keyboard.isDown('d'), love.keyboard.isDown('w')
|
|
||||||
local gl, gr = love.keyboard.isDown('left'), love.keyboard.isDown('right')
|
|
||||||
local fire = love.keyboard.isDown('down')
|
|
||||||
|
|
||||||
e.shotTimer = math.max(0, e.shotTimer - dt)
|
|
||||||
|
|
||||||
if l and not r then
|
|
||||||
p.moving = true
|
|
||||||
if p.direction == 'r' then
|
|
||||||
e.gunAngle = math.pi * 3 - e.gunAngle
|
|
||||||
end
|
|
||||||
p.direction = 'l'
|
|
||||||
elseif r and not l then
|
|
||||||
p.moving = true
|
|
||||||
if p.direction == 'l' then
|
|
||||||
e.gunAngle = math.pi * 3 - e.gunAngle
|
|
||||||
end
|
|
||||||
p.direction = 'r'
|
|
||||||
else
|
|
||||||
p.moving = false
|
|
||||||
end
|
|
||||||
|
|
||||||
p.jumping = u
|
|
||||||
|
|
||||||
if gr and not gl then
|
|
||||||
e.gunAngle = math.min(2 * math.pi, e.gunAngle + 8 * dt)
|
|
||||||
elseif gl and not gr then
|
|
||||||
e.gunAngle = math.max(math.pi, e.gunAngle - 8 * dt)
|
|
||||||
end
|
|
||||||
|
|
||||||
if e.hasGun and fire and e.shotTimer == 0 then
|
|
||||||
local dx = e.platforming.direction == 'l' and 2 or -2
|
|
||||||
local bullet = Bullet(e.pos.x + 16 + dx, e.pos.y + 9, e.gunAngle)
|
|
||||||
assets.snd_cannon:play()
|
|
||||||
world:add(bullet)
|
|
||||||
e.shotTimer = e.shotInterval
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return PlayerControlSystem
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
local TimerEvent = require "src.entities.TimerEvent"
|
|
||||||
|
|
||||||
local SpawnSystem = tiny.system(class "SpawnSystem")
|
|
||||||
|
|
||||||
SpawnSystem.filter = tiny.requireAll("isSpawner")
|
|
||||||
|
|
||||||
function SpawnSystem:init(levelState)
|
|
||||||
self.levelState = levelState
|
|
||||||
self.time = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
function SpawnSystem:update(dt)
|
|
||||||
self.time = self.time + dt
|
|
||||||
local levelState = self.levelState
|
|
||||||
if levelState.isSpawning and levelState.enemiesSpawned < levelState.totalEnemiesToKill and self.time >= levelState.spawnInterval then
|
|
||||||
local choice = math.ceil(math.random() * levelState.spawnerCount)
|
|
||||||
for spnr in pairs(levelState.spawners) do
|
|
||||||
choice = choice - 1
|
|
||||||
if choice == 0 then
|
|
||||||
spnr:spawn()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self.time = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function SpawnSystem:onAdd(e)
|
|
||||||
self.levelState.spawners[e] = true
|
|
||||||
self.levelState.spawnerCount = self.levelState.spawnerCount + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
function SpawnSystem:onRemove(e)
|
|
||||||
self.levelState.spawners[e] = false
|
|
||||||
self.levelState.spawnerCount = self.levelState.spawnerCount - 1
|
|
||||||
end
|
|
||||||
|
|
||||||
return SpawnSystem
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
local SpriteSystem = tiny.processingSystem(class "SpriteSystem")
|
|
||||||
|
|
||||||
function SpriteSystem:init(camera, layerFlag)
|
|
||||||
self.camera = camera
|
|
||||||
self.filter = tiny.requireAll("sprite", "pos", layerFlag)
|
|
||||||
end
|
|
||||||
|
|
||||||
function SpriteSystem:preProcess(dt)
|
|
||||||
self.camera:apply()
|
|
||||||
end
|
|
||||||
|
|
||||||
function SpriteSystem:postProcess(dt)
|
|
||||||
self.camera:remove()
|
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
|
||||||
end
|
|
||||||
|
|
||||||
function SpriteSystem:process(e, dt)
|
|
||||||
local an = e.animation
|
|
||||||
local alpha = e.alpha or 1
|
|
||||||
local pos, sprite, scale, rot, offset = e.pos, e.sprite, e.scale, e.rot, e.offset
|
|
||||||
local sx, sy, r, ox, oy = scale and scale.x or 1, scale and scale.y or 1, rot or 0, offset and offset.x or 0, offset and offset.y or 0
|
|
||||||
love.graphics.setColor(1, 1, 1, math.max(0, math.min(1, alpha)))
|
|
||||||
if an then
|
|
||||||
an.flippedH = e.flippedH or false
|
|
||||||
an.flippedV = e.flippedV or false
|
|
||||||
an:update(dt)
|
|
||||||
an:draw(sprite, pos.x, pos.y, r, sx, sy, ox, oy)
|
|
||||||
else
|
|
||||||
love.graphics.draw(sprite, pos.x, pos.y, r, sx, sy, ox, oy)
|
|
||||||
end
|
|
||||||
if e.draw then
|
|
||||||
e:draw(dt)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return SpriteSystem
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
local TileMapRenderSystem = tiny.system(class "TileMapRenderSystem")
|
|
||||||
|
|
||||||
function TileMapRenderSystem:init(camera, tileMap)
|
|
||||||
self.camera = camera
|
|
||||||
function self.drawFn(l, t, w, h)
|
|
||||||
tileMap:update(dt)
|
|
||||||
tileMap:setDrawRange(-l, -t, w, h)
|
|
||||||
tileMap:draw()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function TileMapRenderSystem:update(dt)
|
|
||||||
self.camera:draw(self.drawFn)
|
|
||||||
end
|
|
||||||
|
|
||||||
return TileMapRenderSystem
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
local UpdateSystem = tiny.processingSystem(class "UpdateSystem")
|
|
||||||
|
|
||||||
UpdateSystem.filter = tiny.requireAll("update")
|
|
||||||
|
|
||||||
function UpdateSystem:process(e, dt)
|
|
||||||
e:update(dt)
|
|
||||||
end
|
|
||||||
|
|
||||||
return UpdateSystem
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
local TimerEvent = require "src.entities.TimerEvent"
|
|
||||||
|
|
||||||
local WaveSystem = tiny.system(class "WaveSystem")
|
|
||||||
|
|
||||||
WaveSystem.filter = tiny.requireAll("isEnemy")
|
|
||||||
|
|
||||||
function WaveSystem:init(levelState)
|
|
||||||
self.levelState = levelState
|
|
||||||
end
|
|
||||||
|
|
||||||
function WaveSystem:onAdd(e)
|
|
||||||
self.levelState.enemiesSpawned = self.levelState.enemiesSpawned + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
function WaveSystem:onRemove(e)
|
|
||||||
local levelState = self.levelState
|
|
||||||
levelState.enemiesKilled = levelState.enemiesKilled + 1
|
|
||||||
if levelState.enemiesKilled >= levelState.totalEnemiesToKill then
|
|
||||||
world:add(TimerEvent(1, function()
|
|
||||||
levelState:nextWave()
|
|
||||||
end))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return WaveSystem
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package = "tiny-ecs"
|
||||||
|
version = "scm-0"
|
||||||
|
source = {
|
||||||
|
url = "git://github.com/bakpakin/tiny-ecs",
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "Entity Component System for Lua.",
|
||||||
|
detailed = [[
|
||||||
|
Pure Lua implementation of an easy to use, compact, fast, and flexible
|
||||||
|
Entity Component System. Works well with Object Orientation.
|
||||||
|
]],
|
||||||
|
homepage = "https://github.com/bakpakin/tiny-ecs",
|
||||||
|
license = "MIT"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
tiny = "tiny.lua"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
--[[
|
--[[
|
||||||
Copyright (c) 2016 Calvin Rose
|
Copyright (c) 2015 Calvin Rose
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
@@ -23,12 +23,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
-- @author Calvin Rose
|
-- @author Calvin Rose
|
||||||
-- @license MIT
|
-- @license MIT
|
||||||
-- @copyright 2015
|
-- @copyright 2015
|
||||||
local tiny = { _VERSION = "scm" }
|
local tiny = { _VERSION = "1.1-7" }
|
||||||
|
|
||||||
-- Local versions of standard lua functions
|
-- Local versions of standard lua functions
|
||||||
local tinsert = table.insert
|
local tinsert = table.insert
|
||||||
local tremove = table.remove
|
local tremove = table.remove
|
||||||
local tsort = table.sort
|
local tsort = table.sort
|
||||||
|
local pairs = pairs
|
||||||
local setmetatable = setmetatable
|
local setmetatable = setmetatable
|
||||||
local type = type
|
local type = type
|
||||||
local select = select
|
local select = select
|
||||||
@@ -84,121 +85,88 @@ local tiny_remove
|
|||||||
--
|
--
|
||||||
-- @section Filter
|
-- @section Filter
|
||||||
|
|
||||||
-- A helper function to compile filters.
|
|
||||||
local filterJoin
|
|
||||||
|
|
||||||
-- A helper function to filters from string
|
|
||||||
local filterBuildString
|
|
||||||
|
|
||||||
do
|
|
||||||
|
|
||||||
local loadstring = loadstring or load
|
|
||||||
local function getchr(c)
|
|
||||||
return "\\" .. c:byte()
|
|
||||||
end
|
|
||||||
local function make_safe(text)
|
|
||||||
return ("%q"):format(text):gsub('\n', 'n'):gsub("[\128-\255]", getchr)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function filterJoinRaw(prefix, seperator, ...)
|
|
||||||
local accum = {}
|
|
||||||
local build = {}
|
|
||||||
for i = 1, select('#', ...) do
|
|
||||||
local item = select(i, ...)
|
|
||||||
if type(item) == 'string' then
|
|
||||||
accum[#accum + 1] = ("(e[%s] ~= nil)"):format(make_safe(item))
|
|
||||||
elseif type(item) == 'function' then
|
|
||||||
build[#build + 1] = ('local subfilter_%d_ = select(%d, ...)'):format(i, i)
|
|
||||||
accum[#accum + 1] = ('(subfilter_%d_(system, e))'):format(i)
|
|
||||||
else
|
|
||||||
error 'Filter token must be a string or a filter function.'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local source = ('do %s\n return function(system, e) return %s(%s) end end'):format(
|
|
||||||
table.concat(build, '\n'),
|
|
||||||
prefix,
|
|
||||||
table.concat(accum, seperator)
|
|
||||||
)
|
|
||||||
local loader, err = loadstring(source)
|
|
||||||
if err then error(err) end
|
|
||||||
return loader(...)
|
|
||||||
end
|
|
||||||
|
|
||||||
function filterJoin(...)
|
|
||||||
local state, value = pcall(filterJoinRaw, ...)
|
|
||||||
if state then return value else return nil, value end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function buildPart(str)
|
|
||||||
local accum = {}
|
|
||||||
local subParts = {}
|
|
||||||
str = str:gsub('%b()', function(p)
|
|
||||||
subParts[#subParts + 1] = buildPart(p:sub(2, -2))
|
|
||||||
return ('\255%d'):format(#subParts)
|
|
||||||
end)
|
|
||||||
for invert, part, sep in str:gmatch('(%!?)([^%|%&%!]+)([%|%&%!]?)') do
|
|
||||||
if part:match('^\255%d+$') then
|
|
||||||
local partIndex = tonumber(part:match(part:sub(2)))
|
|
||||||
accum[#accum + 1] = ('%s(%s)'):format(invert == '' and '' or 'not', subParts[partIndex])
|
|
||||||
else
|
|
||||||
accum[#accum + 1] = ("(e[%s] %s nil)"):format(make_safe(part), invert == '' and '~=' or '==')
|
|
||||||
end
|
|
||||||
if sep ~= '' then
|
|
||||||
accum[#accum + 1] = (sep == '|' and ' or ' or ' and ')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return table.concat(accum)
|
|
||||||
end
|
|
||||||
|
|
||||||
function filterBuildString(str)
|
|
||||||
local source = ("return function(_, e) return %s end"):format(buildPart(str))
|
|
||||||
local loader, err = loadstring(source)
|
|
||||||
if err then
|
|
||||||
error(err)
|
|
||||||
end
|
|
||||||
return loader()
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Makes a Filter that selects Entities with all specified Components and
|
--- Makes a Filter that selects Entities with all specified Components and
|
||||||
-- Filters.
|
-- Filters.
|
||||||
function tiny.requireAll(...)
|
function tiny.requireAll(...)
|
||||||
return filterJoin('', ' and ', ...)
|
local components = {...}
|
||||||
|
local len = #components
|
||||||
|
return function(system, e)
|
||||||
|
local c
|
||||||
|
for i = 1, len do
|
||||||
|
c = components[i]
|
||||||
|
if type(c) == 'function' then
|
||||||
|
if not c(system, e) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
elseif e[c] == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Makes a Filter that selects Entities with at least one of the specified
|
--- Makes a Filter that selects Entities with at least one of the specified
|
||||||
-- Components and Filters.
|
-- Components and Filters.
|
||||||
function tiny.requireAny(...)
|
function tiny.requireAny(...)
|
||||||
return filterJoin('', ' or ', ...)
|
local components = {...}
|
||||||
|
local len = #components
|
||||||
|
return function(system, e)
|
||||||
|
local c
|
||||||
|
for i = 1, len do
|
||||||
|
c = components[i]
|
||||||
|
if type(c) == 'function' then
|
||||||
|
if c(system, e) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
elseif e[c] ~= nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Makes a Filter that rejects Entities with all specified Components and
|
--- Makes a Filter that rejects Entities with all specified Components and
|
||||||
-- Filters, and selects all other Entities.
|
-- Filters, and selects all other Entities.
|
||||||
function tiny.rejectAll(...)
|
function tiny.rejectAll(...)
|
||||||
return filterJoin('not', ' and ', ...)
|
local components = {...}
|
||||||
|
local len = #components
|
||||||
|
return function(system, e)
|
||||||
|
local c
|
||||||
|
for i = 1, len do
|
||||||
|
c = components[i]
|
||||||
|
if type(c) == 'function' then
|
||||||
|
if not c(system, e) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
elseif e[c] == nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Makes a Filter that rejects Entities with at least one of the specified
|
--- Makes a Filter that rejects Entities with at least one of the specified
|
||||||
-- Components and Filters, and selects all other Entities.
|
-- Components and Filters, and selects all other Entities.
|
||||||
function tiny.rejectAny(...)
|
function tiny.rejectAny(...)
|
||||||
return filterJoin('not', ' or ', ...)
|
local components = {...}
|
||||||
|
local len = #components
|
||||||
|
return function(system, e)
|
||||||
|
local c
|
||||||
|
for i = 1, len do
|
||||||
|
c = components[i]
|
||||||
|
if type(c) == 'function' then
|
||||||
|
if c(system, e) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
elseif e[c] ~= nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Makes a Filter from a string. Syntax of `pattern` is as follows.
|
|
||||||
--
|
|
||||||
-- * Tokens are alphanumeric strings including underscores.
|
|
||||||
-- * Tokens can be separated by |, &, or surrounded by parentheses.
|
|
||||||
-- * Tokens can be prefixed with !, and are then operated on with a boolean 'not'.
|
|
||||||
--
|
|
||||||
-- Examples are best:
|
|
||||||
-- 'a|b|c' - Matches entities with an 'a' component OR a 'b' component or a 'c' component.
|
|
||||||
-- 'a&!b&c' - Matches entities with an 'a' component AND NOT a 'b' component AND a 'c' component.
|
|
||||||
-- 'a|(b&c&d)|e - Matches 'a' OR ('b' AND 'c' AND 'd') OR 'e'
|
|
||||||
-- @param pattern
|
|
||||||
function tiny.filter(pattern)
|
|
||||||
local state, value = pcall(filterBuildString, pattern)
|
|
||||||
if state then return value else return nil, value end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- System functions.
|
--- System functions.
|
||||||
@@ -219,10 +187,6 @@ end
|
|||||||
-- from the System.
|
-- from the System.
|
||||||
-- * `function system:onModify(dt)` - Called when the System is modified by
|
-- * `function system:onModify(dt)` - Called when the System is modified by
|
||||||
-- adding or removing Entities from the System.
|
-- adding or removing Entities from the System.
|
||||||
-- * `function system:onAddToWorld(world)` - Called when the System is added
|
|
||||||
-- to the World, before any entities are added to the system.
|
|
||||||
-- * `function system:onRemoveFromWorld(world)` - Called when the System is
|
|
||||||
-- removed from the world, after all Entities are removed from the System.
|
|
||||||
--
|
--
|
||||||
-- For Filters, it is convenient to use `tiny.requireAll` or `tiny.requireAny`,
|
-- For Filters, it is convenient to use `tiny.requireAll` or `tiny.requireAny`,
|
||||||
-- but one can write their own filters as well. Set the Filter of a System like
|
-- but one can write their own filters as well. Set the Filter of a System like
|
||||||
@@ -258,14 +222,6 @@ end
|
|||||||
-- in the next update, if it has one. This is usually managed by tiny-ecs, so
|
-- in the next update, if it has one. This is usually managed by tiny-ecs, so
|
||||||
-- users should mostly ignore this, too.
|
-- users should mostly ignore this, too.
|
||||||
--
|
--
|
||||||
-- There is another option to (hopefully) increase performance in systems that have
|
|
||||||
-- items added to or removed from them often, and have lots of entities in them.
|
|
||||||
-- Setting the `nocache' field of the system might improve performance. It is still
|
|
||||||
-- experimental. There are some restriction to systems without caching, however.
|
|
||||||
-- * There is no `entities` table.
|
|
||||||
-- * Callbacks such onAdd, onRemove, and onModify will never be called
|
|
||||||
-- * Noncached systems cannot be sorted (There is no entities list to sort).
|
|
||||||
--
|
|
||||||
-- @section System
|
-- @section System
|
||||||
|
|
||||||
-- Use an empty table as a key for identifying Systems. Any table that contains
|
-- Use an empty table as a key for identifying Systems. Any table that contains
|
||||||
@@ -279,40 +235,30 @@ end
|
|||||||
|
|
||||||
-- Update function for all Processing Systems.
|
-- Update function for all Processing Systems.
|
||||||
local function processingSystemUpdate(system, dt)
|
local function processingSystemUpdate(system, dt)
|
||||||
|
local entities = system.entities
|
||||||
local preProcess = system.preProcess
|
local preProcess = system.preProcess
|
||||||
local process = system.process
|
local process = system.process
|
||||||
local postProcess = system.postProcess
|
local postProcess = system.postProcess
|
||||||
|
local entity
|
||||||
|
|
||||||
if preProcess then
|
if preProcess then
|
||||||
preProcess(system, dt)
|
preProcess(system, dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
if process then
|
if process then
|
||||||
if system.nocache then
|
local len = #entities
|
||||||
local entities = system.world.entityList
|
for i = 1, len do
|
||||||
local filter = system.filter
|
entity = entities[i]
|
||||||
if filter then
|
|
||||||
for i = 1, #entities do
|
|
||||||
local entity = entities[i]
|
|
||||||
if filter(system, entity) then
|
|
||||||
process(system, entity, dt)
|
process(system, entity, dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
|
||||||
local entities = system.entities
|
|
||||||
for i = 1, #entities do
|
|
||||||
process(system, entities[i], dt)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if postProcess then
|
if postProcess then
|
||||||
postProcess(system, dt)
|
postProcess(system, dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Sorts Systems by a function system.sortDelegate(entity1, entity2) on modify.
|
-- Sorts Systems by a function system.sort(entity1, entity2) on modify.
|
||||||
local function sortedSystemOnModify(system, dt)
|
local function sortedSystemOnModify(system, dt)
|
||||||
local entities = system.entities
|
local entities = system.entities
|
||||||
local indices = system.indices
|
local indices = system.indices
|
||||||
@@ -326,7 +272,8 @@ local function sortedSystemOnModify(system, dt)
|
|||||||
end
|
end
|
||||||
tsort(entities, sortDelegate)
|
tsort(entities, sortDelegate)
|
||||||
for i = 1, #entities do
|
for i = 1, #entities do
|
||||||
indices[entities[i]] = i
|
local entity = entities[i]
|
||||||
|
indices[entity] = i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -343,9 +290,9 @@ end
|
|||||||
-- Processing Systems have three extra callbacks besides those inheritted from
|
-- Processing Systems have three extra callbacks besides those inheritted from
|
||||||
-- vanilla Systems.
|
-- vanilla Systems.
|
||||||
--
|
--
|
||||||
-- function system:preProcess(dt) -- Called before iteration.
|
-- function system:preProcess(entities, dt) -- Called before iteration.
|
||||||
-- function system:process(entity, dt) -- Process each entity.
|
-- function system:process(entities, dt) -- Process each entity.
|
||||||
-- function system:postProcess(dt) -- Called after iteration.
|
-- function system:postProcess(entity, dt) -- Called after iteration.
|
||||||
--
|
--
|
||||||
-- Processing Systems have their own `update` method, so don't implement a
|
-- Processing Systems have their own `update` method, so don't implement a
|
||||||
-- a custom `update` callback for Processing Systems.
|
-- a custom `update` callback for Processing Systems.
|
||||||
@@ -401,7 +348,7 @@ local worldMetaTable
|
|||||||
-- Can optionally add default Systems and Entities. Returns the new World along
|
-- Can optionally add default Systems and Entities. Returns the new World along
|
||||||
-- with default Entities and Systems.
|
-- with default Entities and Systems.
|
||||||
function tiny.world(...)
|
function tiny.world(...)
|
||||||
local ret = setmetatable({
|
local ret = {
|
||||||
|
|
||||||
-- List of Entities to add
|
-- List of Entities to add
|
||||||
entitiesToAdd = {},
|
entitiesToAdd = {},
|
||||||
@@ -409,9 +356,6 @@ function tiny.world(...)
|
|||||||
-- List of Entities to remove
|
-- List of Entities to remove
|
||||||
entitiesToRemove = {},
|
entitiesToRemove = {},
|
||||||
|
|
||||||
-- List of Entities to change
|
|
||||||
entitiesToChange = {},
|
|
||||||
|
|
||||||
-- List of Entities to add
|
-- List of Entities to add
|
||||||
systemsToAdd = {},
|
systemsToAdd = {},
|
||||||
|
|
||||||
@@ -421,33 +365,28 @@ function tiny.world(...)
|
|||||||
-- Set of Entities
|
-- Set of Entities
|
||||||
entities = {},
|
entities = {},
|
||||||
|
|
||||||
-- List of Entities
|
|
||||||
entityList = {},
|
|
||||||
|
|
||||||
-- Number of Entities in World
|
-- Number of Entities in World
|
||||||
entityCount = 0,
|
entityCount = 0,
|
||||||
|
|
||||||
-- List of Systems
|
-- List of Systems
|
||||||
systems = {}
|
systems = {}
|
||||||
}, worldMetaTable)
|
}
|
||||||
|
|
||||||
tiny_add(ret, ...)
|
tiny_add(ret, ...)
|
||||||
tiny_manageSystems(ret)
|
tiny_manageSystems(ret)
|
||||||
tiny_manageEntities(ret)
|
tiny_manageEntities(ret)
|
||||||
|
|
||||||
return ret, ...
|
return setmetatable(ret, worldMetaTable), ...
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Adds an Entity to the world.
|
--- Adds an Entity to the world.
|
||||||
-- Also call this on Entities that have changed Components such that they
|
-- Also call this on Entities that have changed Components such that they
|
||||||
-- match different Filters. Returns the Entity.
|
-- match different Filters. Returns the Entity.
|
||||||
function tiny.addEntity(world, entity)
|
function tiny.addEntity(world, entity)
|
||||||
if world.entities[entity] then
|
|
||||||
local e2c = world.entitiesToChange
|
|
||||||
e2c[#e2c + 1] = entity
|
|
||||||
else
|
|
||||||
local e2a = world.entitiesToAdd
|
local e2a = world.entitiesToAdd
|
||||||
e2a[#e2a + 1] = entity
|
e2a[#e2a + 1] = entity
|
||||||
|
if world.entities[entity] then
|
||||||
|
tiny_removeEntity(world, entity)
|
||||||
end
|
end
|
||||||
return entity
|
return entity
|
||||||
end
|
end
|
||||||
@@ -455,10 +394,8 @@ tiny_addEntity = tiny.addEntity
|
|||||||
|
|
||||||
--- Adds a System to the world. Returns the System.
|
--- Adds a System to the world. Returns the System.
|
||||||
function tiny.addSystem(world, system)
|
function tiny.addSystem(world, system)
|
||||||
assert(system.world == nil, "System already belongs to a World.")
|
|
||||||
local s2a = world.systemsToAdd
|
local s2a = world.systemsToAdd
|
||||||
s2a[#s2a + 1] = system
|
s2a[#s2a + 1] = system
|
||||||
system.world = world
|
|
||||||
return system
|
return system
|
||||||
end
|
end
|
||||||
tiny_addSystem = tiny.addSystem
|
tiny_addSystem = tiny.addSystem
|
||||||
@@ -466,8 +403,9 @@ tiny_addSystem = tiny.addSystem
|
|||||||
--- Shortcut for adding multiple Entities and Systems to the World. Returns all
|
--- Shortcut for adding multiple Entities and Systems to the World. Returns all
|
||||||
-- added Entities and Systems.
|
-- added Entities and Systems.
|
||||||
function tiny.add(world, ...)
|
function tiny.add(world, ...)
|
||||||
|
local obj
|
||||||
for i = 1, select("#", ...) do
|
for i = 1, select("#", ...) do
|
||||||
local obj = select(i, ...)
|
obj = select(i, ...)
|
||||||
if obj then
|
if obj then
|
||||||
if isSystem(obj) then
|
if isSystem(obj) then
|
||||||
tiny_addSystem(world, obj)
|
tiny_addSystem(world, obj)
|
||||||
@@ -490,7 +428,6 @@ tiny_removeEntity = tiny.removeEntity
|
|||||||
|
|
||||||
--- Removes a System from the world. Returns the System.
|
--- Removes a System from the world. Returns the System.
|
||||||
function tiny.removeSystem(world, system)
|
function tiny.removeSystem(world, system)
|
||||||
assert(system.world == world, "System does not belong to this World.")
|
|
||||||
local s2r = world.systemsToRemove
|
local s2r = world.systemsToRemove
|
||||||
s2r[#s2r + 1] = system
|
s2r[#s2r + 1] = system
|
||||||
return system
|
return system
|
||||||
@@ -500,8 +437,9 @@ tiny_removeSystem = tiny.removeSystem
|
|||||||
--- Shortcut for removing multiple Entities and Systems from the World. Returns
|
--- Shortcut for removing multiple Entities and Systems from the World. Returns
|
||||||
-- all removed Systems and Entities
|
-- all removed Systems and Entities
|
||||||
function tiny.remove(world, ...)
|
function tiny.remove(world, ...)
|
||||||
|
local obj
|
||||||
for i = 1, select("#", ...) do
|
for i = 1, select("#", ...) do
|
||||||
local obj = select(i, ...)
|
obj = select(i, ...)
|
||||||
if obj then
|
if obj then
|
||||||
if isSystem(obj) then
|
if isSystem(obj) then
|
||||||
tiny_removeSystem(world, obj)
|
tiny_removeSystem(world, obj)
|
||||||
@@ -523,19 +461,19 @@ function tiny_manageSystems(world)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
world.systemsToAdd = {}
|
local entities = world.entities
|
||||||
world.systemsToRemove = {}
|
|
||||||
|
|
||||||
local worldEntityList = world.entityList
|
|
||||||
local systems = world.systems
|
local systems = world.systems
|
||||||
|
local system, index, filter
|
||||||
|
local entityList, entityIndices, entityIndex, onRemove, onAdd
|
||||||
|
|
||||||
-- Remove Systems
|
-- Remove Systems
|
||||||
for i = 1, #s2r do
|
for i = 1, #s2r do
|
||||||
local system = s2r[i]
|
system = s2r[i]
|
||||||
local index = system.index
|
index = system.index
|
||||||
local onRemove = system.onRemove
|
if system.world == world then
|
||||||
if onRemove and not system.nocache then
|
onRemove = system.onRemove
|
||||||
local entityList = system.entities
|
if onRemove then
|
||||||
|
entityList = system.entities
|
||||||
for j = 1, #entityList do
|
for j = 1, #entityList do
|
||||||
onRemove(system, entityList[j])
|
onRemove(system, entityList[j])
|
||||||
end
|
end
|
||||||
@@ -544,9 +482,6 @@ function tiny_manageSystems(world)
|
|||||||
for j = index, #systems do
|
for j = index, #systems do
|
||||||
systems[j].index = j
|
systems[j].index = j
|
||||||
end
|
end
|
||||||
local onRemoveFromWorld = system.onRemoveFromWorld
|
|
||||||
if onRemoveFromWorld then
|
|
||||||
onRemoveFromWorld(system, world)
|
|
||||||
end
|
end
|
||||||
s2r[i] = nil
|
s2r[i] = nil
|
||||||
|
|
||||||
@@ -559,36 +494,28 @@ function tiny_manageSystems(world)
|
|||||||
|
|
||||||
-- Add Systems
|
-- Add Systems
|
||||||
for i = 1, #s2a do
|
for i = 1, #s2a do
|
||||||
local system = s2a[i]
|
system = s2a[i]
|
||||||
if systems[system.index or 0] ~= system then
|
if systems[system.index] ~= system then
|
||||||
if not system.nocache then
|
entityList = {}
|
||||||
system.entities = {}
|
entityIndices = {}
|
||||||
system.indices = {}
|
system.entities = entityList
|
||||||
end
|
system.indices = entityIndices
|
||||||
if system.active == nil then
|
if system.active == nil then
|
||||||
system.active = true
|
system.active = true
|
||||||
end
|
end
|
||||||
system.modified = true
|
system.modified = true
|
||||||
system.world = world
|
system.world = world
|
||||||
local index = #systems + 1
|
index = #systems + 1
|
||||||
system.index = index
|
system.index = index
|
||||||
systems[index] = system
|
systems[index] = system
|
||||||
local onAddToWorld = system.onAddToWorld
|
|
||||||
if onAddToWorld then
|
|
||||||
onAddToWorld(system, world)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Try to add Entities
|
-- Try to add Entities
|
||||||
if not system.nocache then
|
onAdd = system.onAdd
|
||||||
local entityList = system.entities
|
filter = system.filter
|
||||||
local entityIndices = system.indices
|
|
||||||
local onAdd = system.onAdd
|
|
||||||
local filter = system.filter
|
|
||||||
if filter then
|
if filter then
|
||||||
for j = 1, #worldEntityList do
|
for entity in pairs(entities) do
|
||||||
local entity = worldEntityList[j]
|
|
||||||
if filter(system, entity) then
|
if filter(system, entity) then
|
||||||
local entityIndex = #entityList + 1
|
entityIndex = #entityList + 1
|
||||||
entityList[entityIndex] = entity
|
entityList[entityIndex] = entity
|
||||||
entityIndices[entity] = entityIndex
|
entityIndices[entity] = entityIndex
|
||||||
if onAdd then
|
if onAdd then
|
||||||
@@ -598,135 +525,82 @@ function tiny_manageSystems(world)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
s2a[i] = nil
|
s2a[i] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Adds, removes, and changes Entities that have been marked.
|
-- Adds and removes Entities that have been marked.
|
||||||
function tiny_manageEntities(world)
|
function tiny_manageEntities(world)
|
||||||
|
local e2a, e2r = world.entitiesToAdd, world.entitiesToRemove
|
||||||
local e2a = world.entitiesToAdd
|
|
||||||
local e2r = world.entitiesToRemove
|
|
||||||
local e2c = world.entitiesToChange
|
|
||||||
|
|
||||||
-- Early exit
|
-- Early exit
|
||||||
if #e2a == 0 and #e2r == 0 and #e2c == 0 then
|
if #e2a == 0 and #e2r == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
world.entitiesToChange = {}
|
|
||||||
world.entitiesToAdd = {}
|
|
||||||
world.entitiesToRemove = {}
|
|
||||||
|
|
||||||
local entities = world.entities
|
local entities = world.entities
|
||||||
local entityList = world.entityList
|
|
||||||
local systems = world.systems
|
local systems = world.systems
|
||||||
local entityCount = world.entityCount
|
local entityCount = world.entityCount
|
||||||
|
local entity, system, index
|
||||||
-- Change Entities
|
local onRemove, onAdd, ses, seis, filter, tmpEntity
|
||||||
for i = 1, #e2c do
|
|
||||||
local entity = e2c[i]
|
|
||||||
if entities[entity] then
|
|
||||||
for j = 1, #systems do
|
|
||||||
local system = systems[j]
|
|
||||||
if not system.nocache then
|
|
||||||
local ses = system.entities
|
|
||||||
local seis = system.indices
|
|
||||||
local index = seis[entity]
|
|
||||||
local filter = system.filter
|
|
||||||
if filter and filter(system, entity) then
|
|
||||||
if not index then
|
|
||||||
system.modified = true
|
|
||||||
index = #ses + 1
|
|
||||||
ses[index] = entity
|
|
||||||
seis[entity] = index
|
|
||||||
local onAdd = system.onAdd
|
|
||||||
if onAdd then
|
|
||||||
onAdd(system, entity)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif index then
|
|
||||||
system.modified = true
|
|
||||||
local tmpEntity = ses[#ses]
|
|
||||||
ses[index] = tmpEntity
|
|
||||||
seis[tmpEntity] = index
|
|
||||||
seis[entity] = nil
|
|
||||||
ses[#ses] = nil
|
|
||||||
local onRemove = system.onRemove
|
|
||||||
if onRemove then
|
|
||||||
onRemove(system, entity)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
e2c[i] = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Remove Entities
|
-- Remove Entities
|
||||||
for i = 1, #e2r do
|
for i = 1, #e2r do
|
||||||
local entity = e2r[i]
|
entity = e2r[i]
|
||||||
e2r[i] = nil
|
if entities[entity] then
|
||||||
local listIndex = entities[entity]
|
|
||||||
if listIndex then
|
|
||||||
-- Remove Entity from world state
|
|
||||||
local lastEntity = entityList[#entityList]
|
|
||||||
entities[lastEntity] = listIndex
|
|
||||||
entities[entity] = nil
|
entities[entity] = nil
|
||||||
entityList[listIndex] = lastEntity
|
|
||||||
entityList[#entityList] = nil
|
|
||||||
entityCount = entityCount - 1
|
entityCount = entityCount - 1
|
||||||
-- Remove from cached systems
|
|
||||||
for j = 1, #systems do
|
for j = 1, #systems do
|
||||||
local system = systems[j]
|
system = systems[j]
|
||||||
if not system.nocache then
|
ses = system.entities
|
||||||
local ses = system.entities
|
seis = system.indices
|
||||||
local seis = system.indices
|
index = seis[entity]
|
||||||
local index = seis[entity]
|
|
||||||
if index then
|
if index then
|
||||||
system.modified = true
|
system.modified = true
|
||||||
local tmpEntity = ses[#ses]
|
tmpEntity = ses[#ses]
|
||||||
ses[index] = tmpEntity
|
ses[index] = tmpEntity
|
||||||
seis[tmpEntity] = index
|
seis[tmpEntity] = index
|
||||||
seis[entity] = nil
|
seis[entity] = nil
|
||||||
ses[#ses] = nil
|
ses[#ses] = nil
|
||||||
local onRemove = system.onRemove
|
onRemove = system.onRemove
|
||||||
if onRemove then
|
if onRemove then
|
||||||
onRemove(system, entity)
|
onRemove(system, entity)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
e2r[i] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add Entities
|
-- Add Entities
|
||||||
for i = 1, #e2a do
|
for i = 1, #e2a do
|
||||||
local entity = e2a[i]
|
entity = e2a[i]
|
||||||
if not entities[entity] then
|
if not entities[entity] then
|
||||||
local listIndex = #entityList + 1
|
entities[entity] = true
|
||||||
entities[entity] = listIndex
|
|
||||||
entityList[listIndex] = entity
|
|
||||||
entityCount = entityCount + 1
|
entityCount = entityCount + 1
|
||||||
|
|
||||||
for j = 1, #systems do
|
for j = 1, #systems do
|
||||||
local system = systems[j]
|
system = systems[j]
|
||||||
if not system.nocache then
|
ses = system.entities
|
||||||
local ses = system.entities
|
seis = system.indices
|
||||||
local seis = system.indices
|
filter = system.filter
|
||||||
local filter = system.filter
|
|
||||||
if filter and filter(system, entity) then
|
if filter and filter(system, entity) then
|
||||||
system.modified = true
|
system.modified = true
|
||||||
local index = #ses + 1
|
index = #ses + 1
|
||||||
ses[index] = entity
|
ses[index] = entity
|
||||||
seis[entity] = index
|
seis[entity] = index
|
||||||
local onAdd = system.onAdd
|
onAdd = system.onAdd
|
||||||
if onAdd then
|
if onAdd then
|
||||||
onAdd(system, entity)
|
onAdd(system, entity)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
e2a[i] = nil
|
e2a[i] = nil
|
||||||
end
|
end
|
||||||
@@ -741,17 +615,6 @@ end
|
|||||||
function tiny.refresh(world)
|
function tiny.refresh(world)
|
||||||
tiny_manageSystems(world)
|
tiny_manageSystems(world)
|
||||||
tiny_manageEntities(world)
|
tiny_manageEntities(world)
|
||||||
local systems = world.systems
|
|
||||||
for i = 1, #systems do
|
|
||||||
local system = systems[i]
|
|
||||||
if system.active then
|
|
||||||
local onModify = system.onModify
|
|
||||||
if onModify and system.modified then
|
|
||||||
onModify(system, 0)
|
|
||||||
end
|
|
||||||
system.modified = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Updates the World by dt (delta time). Takes an optional parameter, `filter`,
|
--- Updates the World by dt (delta time). Takes an optional parameter, `filter`,
|
||||||
@@ -764,22 +627,23 @@ function tiny.update(world, dt, filter)
|
|||||||
tiny_manageEntities(world)
|
tiny_manageEntities(world)
|
||||||
|
|
||||||
local systems = world.systems
|
local systems = world.systems
|
||||||
|
local system, update, interval, onModify
|
||||||
|
|
||||||
-- Iterate through Systems IN ORDER
|
-- Iterate through Systems IN ORDER
|
||||||
for i = 1, #systems do
|
for i = 1, #systems do
|
||||||
local system = systems[i]
|
system = systems[i]
|
||||||
if system.active and ((not filter) or filter(world, system)) then
|
if system.active and ((not filter) or filter(world, system)) then
|
||||||
|
|
||||||
-- Call the modify callback on Systems that have been modified.
|
-- Call the modify callback on Systems that have been modified.
|
||||||
local onModify = system.onModify
|
onModify = system.onModify
|
||||||
if onModify and system.modified then
|
if onModify and system.modified then
|
||||||
onModify(system, dt)
|
onModify(system, dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Update Systems that have an update method (most Systems)
|
-- Update Systems that have an update method (most Systems)
|
||||||
local update = system.update
|
update = system.update
|
||||||
if update then
|
if update then
|
||||||
local interval = system.interval
|
interval = system.interval
|
||||||
if interval then
|
if interval then
|
||||||
local bufferedTime = (system.bufferedTime or 0) + dt
|
local bufferedTime = (system.bufferedTime or 0) + dt
|
||||||
while bufferedTime >= interval do
|
while bufferedTime >= interval do
|
||||||
@@ -801,9 +665,8 @@ end
|
|||||||
|
|
||||||
--- Removes all Entities from the World.
|
--- Removes all Entities from the World.
|
||||||
function tiny.clearEntities(world)
|
function tiny.clearEntities(world)
|
||||||
local el = world.entityList
|
for e in pairs(world.entities) do
|
||||||
for i = 1, #el do
|
tiny_removeEntity(world, e)
|
||||||
tiny_removeEntity(world, el[i])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -838,10 +701,6 @@ function tiny.setSystemIndex(world, system, index)
|
|||||||
local oldIndex = system.index
|
local oldIndex = system.index
|
||||||
local systems = world.systems
|
local systems = world.systems
|
||||||
|
|
||||||
if index < 0 then
|
|
||||||
index = tiny.getSystemCount(world) + 1 + index
|
|
||||||
end
|
|
||||||
|
|
||||||
tremove(systems, oldIndex)
|
tremove(systems, oldIndex)
|
||||||
tinsert(systems, index, system)
|
tinsert(systems, index, system)
|
||||||
|
|
||||||
@@ -869,10 +728,7 @@ worldMetaTable = {
|
|||||||
getSystemCount = tiny.getSystemCount,
|
getSystemCount = tiny.getSystemCount,
|
||||||
getSystemIndex = tiny.getSystemIndex,
|
getSystemIndex = tiny.getSystemIndex,
|
||||||
setSystemIndex = tiny.setSystemIndex
|
setSystemIndex = tiny.setSystemIndex
|
||||||
},
|
}
|
||||||
__tostring = function(self)
|
|
||||||
return "<tiny-ecs_World>"
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tiny
|
return tiny
|
||||||