Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cb8f7c77b | ||
|
|
487ac002f5 | ||
|
|
b130b88080 | ||
|
|
005ec2fb23 | ||
|
|
27a123f2d1 | ||
|
|
4f134e8aa3 | ||
|
|
5ac81f5c4a | ||
|
|
176c80d0d9 | ||
|
|
b1ba9bebeb | ||
|
|
be56780b88 | ||
|
|
a63329422d |
@@ -1,39 +0,0 @@
|
|||||||
language: erlang
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- LUAROCKS_BASE=luarocks-2.2.2
|
|
||||||
matrix:
|
|
||||||
- LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1
|
|
||||||
- LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2
|
|
||||||
- LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- if [ $LUA = "luajit" ]; then
|
|
||||||
sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y;
|
|
||||||
sudo apt-get install lua5.1;
|
|
||||||
sudo apt-get install liblua5.1-dev;
|
|
||||||
fi
|
|
||||||
- sudo apt-get install $LUA
|
|
||||||
- sudo apt-get install $LUA_DEV
|
|
||||||
- lua$LUA_SFX -v
|
|
||||||
# Install a recent luarocks release
|
|
||||||
- wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz
|
|
||||||
- tar zxvpf $LUAROCKS_BASE.tar.gz
|
|
||||||
- cd $LUAROCKS_BASE
|
|
||||||
- ./configure
|
|
||||||
--lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR"
|
|
||||||
- sudo make
|
|
||||||
- sudo make install
|
|
||||||
- cd $TRAVIS_BUILD_DIR
|
|
||||||
|
|
||||||
install:
|
|
||||||
- sudo -E luarocks install busted
|
|
||||||
|
|
||||||
script:
|
|
||||||
- sudo -E busted -v
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_success: change
|
|
||||||
on_failure: always
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
Copyright (c) 2016 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,90 +1,12 @@
|
|||||||
# tiny-ecs #
|
# NOTE - Up to date version of this project [here](https://github.com/bakpakin/CommandoKibbles)
|
||||||
|
|
||||||
[](https://travis-ci.org/bakpakin/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 also works well with objected oriented programming in Lua because
|
## tiny-ecs example: Commando Kibbles
|
||||||
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.
|
|
||||||
|
|
||||||
## Overview ##
|
Fight against invading pigs as a feisty feline with a cannon strapped to your back.
|
||||||
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.
|
|
||||||
|
|
||||||
### Entities ###
|
# Running
|
||||||
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.
|
|
||||||
|
|
||||||
### Worlds ###
|
Uses [LOVE](https://love2d.org/) to run. Run the love executable from the project directory to test.
|
||||||
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(("%s who weighs %d pounds, says %q."):format(e.name, e.mass, 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.
|
|
||||||
|
|
||||||
## 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).
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 811 B |
|
After Width: | Height: | Size: 953 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 187 B |
@@ -0,0 +1,258 @@
|
|||||||
|
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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 = 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, 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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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,367 @@
|
|||||||
|
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",
|
||||||
|
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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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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 = 80,
|
||||||
|
height = 80,
|
||||||
|
visible = true,
|
||||||
|
opacity = 1,
|
||||||
|
properties = {
|
||||||
|
["collidable"] = "true"
|
||||||
|
},
|
||||||
|
encoding = "lua",
|
||||||
|
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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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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 = {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 612 B |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
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
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
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,5 +0,0 @@
|
|||||||
-- Helper Lua file for easy require if tiny-ecs is used as a git submodule or
|
|
||||||
-- folder. Not needed in many cases, including luarocks distribution.
|
|
||||||
|
|
||||||
local directory = (...):match("(.-)[^%.]+$")
|
|
||||||
return require(directory .. 'tiny')
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
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 })
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
-- 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
|
||||||
@@ -0,0 +1,770 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
-- 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
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
--[[
|
||||||
|
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
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
--[[
|
||||||
|
-- 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
|
||||||
@@ -22,8 +22,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
--- @module tiny-ecs
|
--- @module tiny-ecs
|
||||||
-- @author Calvin Rose
|
-- @author Calvin Rose
|
||||||
-- @license MIT
|
-- @license MIT
|
||||||
-- @copyright 2016
|
-- @copyright 2015
|
||||||
local tiny = {}
|
local tiny = { _VERSION = "scm" }
|
||||||
|
|
||||||
-- Local versions of standard lua functions
|
-- Local versions of standard lua functions
|
||||||
local tinsert = table.insert
|
local tinsert = table.insert
|
||||||
@@ -41,13 +41,12 @@ local tiny_addSystem
|
|||||||
local tiny_add
|
local tiny_add
|
||||||
local tiny_removeEntity
|
local tiny_removeEntity
|
||||||
local tiny_removeSystem
|
local tiny_removeSystem
|
||||||
|
local tiny_remove
|
||||||
|
|
||||||
--- Filter functions.
|
--- Filter functions.
|
||||||
-- A Filter is a function that selects which Entities apply to a System.
|
-- A Filter is a function that selects which Entities apply to a System.
|
||||||
-- Filters take two parameters, the System and the Entity, and return a boolean
|
-- Filters take two parameters, the System and the Entity, and return a boolean
|
||||||
-- value indicating if the Entity should be processed by the System. A truthy
|
-- value indicating if the Entity should be processed by the System.
|
||||||
-- value includes the entity, while a falsey (nil or false) value excludes the
|
|
||||||
-- entity.
|
|
||||||
--
|
--
|
||||||
-- Filters must be added to Systems by setting the `filter` field of the System.
|
-- Filters must be added to Systems by setting the `filter` field of the System.
|
||||||
-- Filter's returned by tiny-ecs's Filter functions are immutable and can be
|
-- Filter's returned by tiny-ecs's Filter functions are immutable and can be
|
||||||
@@ -109,18 +108,17 @@ do
|
|||||||
if type(item) == 'string' then
|
if type(item) == 'string' then
|
||||||
accum[#accum + 1] = ("(e[%s] ~= nil)"):format(make_safe(item))
|
accum[#accum + 1] = ("(e[%s] ~= nil)"):format(make_safe(item))
|
||||||
elseif type(item) == 'function' then
|
elseif type(item) == 'function' then
|
||||||
build[#build + 1] = ('local subfilter_%d_ = select(%d, ...)')
|
build[#build + 1] = ('local subfilter_%d_ = select(%d, ...)'):format(i, i)
|
||||||
:format(i, i)
|
|
||||||
accum[#accum + 1] = ('(subfilter_%d_(system, e))'):format(i)
|
accum[#accum + 1] = ('(subfilter_%d_(system, e))'):format(i)
|
||||||
else
|
else
|
||||||
error 'Filter token must be a string or a filter function.'
|
error 'Filter token must be a string or a filter function.'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local source = ('%s\nreturn function(system, e) return %s(%s) end')
|
local source = ('do %s\n return function(system, e) return %s(%s) end end'):format(
|
||||||
:format(
|
|
||||||
table.concat(build, '\n'),
|
table.concat(build, '\n'),
|
||||||
prefix,
|
prefix,
|
||||||
table.concat(accum, seperator))
|
table.concat(accum, seperator)
|
||||||
|
)
|
||||||
local loader, err = loadstring(source)
|
local loader, err = loadstring(source)
|
||||||
if err then error(err) end
|
if err then error(err) end
|
||||||
return loader(...)
|
return loader(...)
|
||||||
@@ -138,14 +136,12 @@ do
|
|||||||
subParts[#subParts + 1] = buildPart(p:sub(2, -2))
|
subParts[#subParts + 1] = buildPart(p:sub(2, -2))
|
||||||
return ('\255%d'):format(#subParts)
|
return ('\255%d'):format(#subParts)
|
||||||
end)
|
end)
|
||||||
for invert, part, sep in str:gmatch('(%!?)([^%|%&%!]+)([%|%&]?)') do
|
for invert, part, sep in str:gmatch('(%!?)([^%|%&%!]+)([%|%&%!]?)') do
|
||||||
if part:match('^\255%d+$') then
|
if part:match('^\255%d+$') then
|
||||||
local partIndex = tonumber(part:match(part:sub(2)))
|
local partIndex = tonumber(part:match(part:sub(2)))
|
||||||
accum[#accum + 1] = ('%s(%s)')
|
accum[#accum + 1] = ('%s(%s)'):format(invert == '' and '' or 'not', subParts[partIndex])
|
||||||
:format(invert == '' and '' or 'not', subParts[partIndex])
|
|
||||||
else
|
else
|
||||||
accum[#accum + 1] = ("(e[%s] %s nil)")
|
accum[#accum + 1] = ("(e[%s] %s nil)"):format(make_safe(part), invert == '' and '~=' or '==')
|
||||||
:format(make_safe(part), invert == '' and '~=' or '==')
|
|
||||||
end
|
end
|
||||||
if sep ~= '' then
|
if sep ~= '' then
|
||||||
accum[#accum + 1] = (sep == '|' and ' or ' or ' and ')
|
accum[#accum + 1] = (sep == '|' and ' or ' or ' and ')
|
||||||
@@ -155,8 +151,7 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
function filterBuildString(str)
|
function filterBuildString(str)
|
||||||
local source = ("return function(_, e) return %s end")
|
local source = ("return function(_, e) return %s end"):format(buildPart(str))
|
||||||
:format(buildPart(str))
|
|
||||||
local loader, err = loadstring(source)
|
local loader, err = loadstring(source)
|
||||||
if err then
|
if err then
|
||||||
error(err)
|
error(err)
|
||||||
@@ -194,11 +189,11 @@ end
|
|||||||
--
|
--
|
||||||
-- * Tokens are alphanumeric strings including underscores.
|
-- * Tokens are alphanumeric strings including underscores.
|
||||||
-- * Tokens can be separated by |, &, or surrounded by parentheses.
|
-- * Tokens can be separated by |, &, or surrounded by parentheses.
|
||||||
-- * Tokens can be prefixed with !, and are then inverted.
|
-- * Tokens can be prefixed with !, and are then operated on with a boolean 'not'.
|
||||||
--
|
--
|
||||||
-- Examples are best:
|
-- Examples are best:
|
||||||
-- 'a|b|c' - Matches entities with an 'a' OR 'b' OR 'c'.
|
-- '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' AND NOT 'b' AND 'c'.
|
-- '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'
|
-- 'a|(b&c&d)|e - Matches 'a' OR ('b' AND 'c' AND 'd') OR 'e'
|
||||||
-- @param pattern
|
-- @param pattern
|
||||||
function tiny.filter(pattern)
|
function tiny.filter(pattern)
|
||||||
@@ -228,19 +223,6 @@ end
|
|||||||
-- to the World, before any entities are added to the system.
|
-- to the World, before any entities are added to the system.
|
||||||
-- * `function system:onRemoveFromWorld(world)` - Called when the System is
|
-- * `function system:onRemoveFromWorld(world)` - Called when the System is
|
||||||
-- removed from the world, after all Entities are removed from the System.
|
-- removed from the world, after all Entities are removed from the System.
|
||||||
-- * `function system:preWrap(dt)` - Called on each system before update is
|
|
||||||
-- called on any system.
|
|
||||||
-- * `function system:postWrap(dt) - Called on each system in reverse order
|
|
||||||
-- after update is called on each system. The idea behind `preWrap` and
|
|
||||||
-- `postWrap` is to allow for systems that modify the behavior of other systems.
|
|
||||||
-- Say there is a DrawingSystem, which draws sprites to the screen, and a
|
|
||||||
-- PostProcessingSystem, that adds some blur and bloom effects. In the preWrap
|
|
||||||
-- method of the PostProcessingSystem, the System could set the drawing target
|
|
||||||
-- for the DrawingSystem to a special buffer instead the screen. In the postWrap
|
|
||||||
-- method, the PostProcessingSystem could then modify the buffer and render it
|
|
||||||
-- to the screen. In this setup, the PostProcessingSystem would be added to the
|
|
||||||
-- World after the drawingSystem (A similar but less flexible behavior could
|
|
||||||
-- be accomplished with a single custom update function in the DrawingSystem).
|
|
||||||
--
|
--
|
||||||
-- 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
|
||||||
@@ -276,13 +258,13 @@ 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
|
-- There is another option to (hopefully) increase performance in systems that have
|
||||||
-- have items added to or removed from them often, and have lots of entities in
|
-- items added to or removed from them often, and have lots of entities in them.
|
||||||
-- them. Setting the `nocache' field of the system might improve performance.
|
-- Setting the `nocache' field of the system might improve performance. It is still
|
||||||
-- It is still experimental. There are some restriction to systems without
|
-- experimental. There are some restriction to systems without caching, however.
|
||||||
-- caching, however. * There is no `entities` table. * Callbacks such onAdd,
|
-- * There is no `entities` table.
|
||||||
-- onRemove, and onModify will never be called * Noncached systems cannot be
|
-- * Callbacks such onAdd, onRemove, and onModify will never be called
|
||||||
-- sorted (There is no entities list to sort).
|
-- * Noncached systems cannot be sorted (There is no entities list to sort).
|
||||||
--
|
--
|
||||||
-- @section System
|
-- @section System
|
||||||
|
|
||||||
@@ -331,7 +313,7 @@ local function processingSystemUpdate(system, dt)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Sorts Systems by a function system.sortDelegate(entity1, entity2) on modify.
|
-- Sorts Systems by a function system.sortDelegate(entity1, entity2) on modify.
|
||||||
local function sortedSystemOnModify(system)
|
local function sortedSystemOnModify(system, dt)
|
||||||
local entities = system.entities
|
local entities = system.entities
|
||||||
local indices = system.indices
|
local indices = system.indices
|
||||||
local sortDelegate = system.sortDelegate
|
local sortDelegate = system.sortDelegate
|
||||||
@@ -421,6 +403,9 @@ local worldMetaTable
|
|||||||
function tiny.world(...)
|
function tiny.world(...)
|
||||||
local ret = setmetatable({
|
local ret = setmetatable({
|
||||||
|
|
||||||
|
-- List of Entities to add
|
||||||
|
entitiesToAdd = {},
|
||||||
|
|
||||||
-- List of Entities to remove
|
-- List of Entities to remove
|
||||||
entitiesToRemove = {},
|
entitiesToRemove = {},
|
||||||
|
|
||||||
@@ -436,9 +421,14 @@ function tiny.world(...)
|
|||||||
-- Set of Entities
|
-- Set of Entities
|
||||||
entities = {},
|
entities = {},
|
||||||
|
|
||||||
|
-- List of Entities
|
||||||
|
entityList = {},
|
||||||
|
|
||||||
|
-- Number of Entities in World
|
||||||
|
entityCount = 0,
|
||||||
|
|
||||||
-- List of Systems
|
-- List of Systems
|
||||||
systems = {}
|
systems = {}
|
||||||
|
|
||||||
}, worldMetaTable)
|
}, worldMetaTable)
|
||||||
|
|
||||||
tiny_add(ret, ...)
|
tiny_add(ret, ...)
|
||||||
@@ -452,8 +442,13 @@ end
|
|||||||
-- 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
|
local e2c = world.entitiesToChange
|
||||||
e2c[#e2c + 1] = entity
|
e2c[#e2c + 1] = entity
|
||||||
|
else
|
||||||
|
local e2a = world.entitiesToAdd
|
||||||
|
e2a[#e2a + 1] = entity
|
||||||
|
end
|
||||||
return entity
|
return entity
|
||||||
end
|
end
|
||||||
tiny_addEntity = tiny.addEntity
|
tiny_addEntity = tiny.addEntity
|
||||||
@@ -485,7 +480,7 @@ function tiny.add(world, ...)
|
|||||||
end
|
end
|
||||||
tiny_add = tiny.add
|
tiny_add = tiny.add
|
||||||
|
|
||||||
--- Removes an Entity from the World. Returns the Entity.
|
--- Removes an Entity to the World. Returns the Entity.
|
||||||
function tiny.removeEntity(world, entity)
|
function tiny.removeEntity(world, entity)
|
||||||
local e2r = world.entitiesToRemove
|
local e2r = world.entitiesToRemove
|
||||||
e2r[#e2r + 1] = entity
|
e2r[#e2r + 1] = entity
|
||||||
@@ -517,6 +512,7 @@ function tiny.remove(world, ...)
|
|||||||
end
|
end
|
||||||
return ...
|
return ...
|
||||||
end
|
end
|
||||||
|
tiny_remove = tiny.remove
|
||||||
|
|
||||||
-- Adds and removes Systems that have been marked from the World.
|
-- Adds and removes Systems that have been marked from the World.
|
||||||
function tiny_manageSystems(world)
|
function tiny_manageSystems(world)
|
||||||
@@ -530,7 +526,7 @@ function tiny_manageSystems(world)
|
|||||||
world.systemsToAdd = {}
|
world.systemsToAdd = {}
|
||||||
world.systemsToRemove = {}
|
world.systemsToRemove = {}
|
||||||
|
|
||||||
local worldEntityList = world.entities
|
local worldEntityList = world.entityList
|
||||||
local systems = world.systems
|
local systems = world.systems
|
||||||
|
|
||||||
-- Remove Systems
|
-- Remove Systems
|
||||||
@@ -610,29 +606,28 @@ end
|
|||||||
-- Adds, removes, and changes Entities that have been marked.
|
-- Adds, removes, and changes Entities that have been marked.
|
||||||
function tiny_manageEntities(world)
|
function tiny_manageEntities(world)
|
||||||
|
|
||||||
|
local e2a = world.entitiesToAdd
|
||||||
local e2r = world.entitiesToRemove
|
local e2r = world.entitiesToRemove
|
||||||
local e2c = world.entitiesToChange
|
local e2c = world.entitiesToChange
|
||||||
|
|
||||||
-- Early exit
|
-- Early exit
|
||||||
if #e2r == 0 and #e2c == 0 then
|
if #e2a == 0 and #e2r == 0 and #e2c == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
world.entitiesToChange = {}
|
world.entitiesToChange = {}
|
||||||
|
world.entitiesToAdd = {}
|
||||||
world.entitiesToRemove = {}
|
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
|
||||||
|
|
||||||
-- Change Entities
|
-- Change Entities
|
||||||
for i = 1, #e2c do
|
for i = 1, #e2c do
|
||||||
local entity = e2c[i]
|
local entity = e2c[i]
|
||||||
-- Add if needed
|
if entities[entity] then
|
||||||
if not entities[entity] then
|
|
||||||
local index = #entities + 1
|
|
||||||
entities[entity] = index
|
|
||||||
entities[index] = entity
|
|
||||||
end
|
|
||||||
for j = 1, #systems do
|
for j = 1, #systems do
|
||||||
local system = systems[j]
|
local system = systems[j]
|
||||||
if not system.nocache then
|
if not system.nocache then
|
||||||
@@ -665,6 +660,7 @@ function tiny_manageEntities(world)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
e2c[i] = nil
|
e2c[i] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -675,11 +671,12 @@ function tiny_manageEntities(world)
|
|||||||
local listIndex = entities[entity]
|
local listIndex = entities[entity]
|
||||||
if listIndex then
|
if listIndex then
|
||||||
-- Remove Entity from world state
|
-- Remove Entity from world state
|
||||||
local lastEntity = entities[#entities]
|
local lastEntity = entityList[#entityList]
|
||||||
entities[lastEntity] = listIndex
|
entities[lastEntity] = listIndex
|
||||||
entities[entity] = nil
|
entities[entity] = nil
|
||||||
entities[listIndex] = lastEntity
|
entityList[listIndex] = lastEntity
|
||||||
entities[#entities] = nil
|
entityList[#entityList] = nil
|
||||||
|
entityCount = entityCount - 1
|
||||||
-- Remove from cached systems
|
-- Remove from cached systems
|
||||||
for j = 1, #systems do
|
for j = 1, #systems do
|
||||||
local system = systems[j]
|
local system = systems[j]
|
||||||
@@ -703,6 +700,39 @@ function tiny_manageEntities(world)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Add Entities
|
||||||
|
for i = 1, #e2a do
|
||||||
|
local entity = e2a[i]
|
||||||
|
if not entities[entity] then
|
||||||
|
local listIndex = #entityList + 1
|
||||||
|
entities[entity] = listIndex
|
||||||
|
entityList[listIndex] = entity
|
||||||
|
entityCount = entityCount + 1
|
||||||
|
for j = 1, #systems do
|
||||||
|
local system = systems[j]
|
||||||
|
if not system.nocache then
|
||||||
|
local ses = system.entities
|
||||||
|
local seis = system.indices
|
||||||
|
local filter = system.filter
|
||||||
|
if filter and filter(system, entity) then
|
||||||
|
system.modified = true
|
||||||
|
local index = #ses + 1
|
||||||
|
ses[index] = entity
|
||||||
|
seis[entity] = index
|
||||||
|
local onAdd = system.onAdd
|
||||||
|
if onAdd then
|
||||||
|
onAdd(system, entity)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
e2a[i] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Update Entity count
|
||||||
|
world.entityCount = entityCount
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Manages Entities and Systems marked for deletion or addition. Call this
|
--- Manages Entities and Systems marked for deletion or addition. Call this
|
||||||
@@ -712,7 +742,7 @@ function tiny.refresh(world)
|
|||||||
tiny_manageSystems(world)
|
tiny_manageSystems(world)
|
||||||
tiny_manageEntities(world)
|
tiny_manageEntities(world)
|
||||||
local systems = world.systems
|
local systems = world.systems
|
||||||
for i = #systems, 1, -1 do
|
for i = 1, #systems do
|
||||||
local system = systems[i]
|
local system = systems[i]
|
||||||
if system.active then
|
if system.active then
|
||||||
local onModify = system.onModify
|
local onModify = system.onModify
|
||||||
@@ -735,27 +765,16 @@ function tiny.update(world, dt, filter)
|
|||||||
|
|
||||||
local systems = world.systems
|
local systems = world.systems
|
||||||
|
|
||||||
-- Iterate through Systems IN REVERSE ORDER
|
-- Iterate through Systems IN ORDER
|
||||||
for i = #systems, 1, -1 do
|
for i = 1, #systems do
|
||||||
local system = systems[i]
|
local system = systems[i]
|
||||||
if system.active 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
|
local onModify = system.onModify
|
||||||
if onModify and system.modified then
|
if onModify and system.modified then
|
||||||
onModify(system, dt)
|
onModify(system, dt)
|
||||||
end
|
end
|
||||||
local preWrap = system.preWrap
|
|
||||||
if preWrap and
|
|
||||||
((not filter) or filter(world, system)) then
|
|
||||||
preWrap(system, dt)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Iterate through Systems IN ORDER
|
|
||||||
for i = 1, #systems do
|
|
||||||
local system = systems[i]
|
|
||||||
if system.active and ((not filter) or filter(world, system)) then
|
|
||||||
|
|
||||||
-- Update Systems that have an update method (most Systems)
|
-- Update Systems that have an update method (most Systems)
|
||||||
local update = system.update
|
local update = system.update
|
||||||
@@ -765,8 +784,10 @@ function tiny.update(world, dt, filter)
|
|||||||
local bufferedTime = (system.bufferedTime or 0) + dt
|
local bufferedTime = (system.bufferedTime or 0) + dt
|
||||||
while bufferedTime >= interval do
|
while bufferedTime >= interval do
|
||||||
bufferedTime = bufferedTime - interval
|
bufferedTime = bufferedTime - interval
|
||||||
|
if update then
|
||||||
update(system, interval)
|
update(system, interval)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
system.bufferedTime = bufferedTime
|
system.bufferedTime = bufferedTime
|
||||||
else
|
else
|
||||||
update(system, dt)
|
update(system, dt)
|
||||||
@@ -776,22 +797,11 @@ function tiny.update(world, dt, filter)
|
|||||||
system.modified = false
|
system.modified = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Iterate through Systems IN ORDER AGAIN
|
|
||||||
for i = 1, #systems do
|
|
||||||
local system = systems[i]
|
|
||||||
local postWrap = system.postWrap
|
|
||||||
if postWrap and system.active and
|
|
||||||
((not filter) or filter(world, system)) then
|
|
||||||
postWrap(system, dt)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Removes all Entities from the World.
|
--- Removes all Entities from the World.
|
||||||
function tiny.clearEntities(world)
|
function tiny.clearEntities(world)
|
||||||
local el = world.entities
|
local el = world.entityList
|
||||||
for i = 1, #el do
|
for i = 1, #el do
|
||||||
tiny_removeEntity(world, el[i])
|
tiny_removeEntity(world, el[i])
|
||||||
end
|
end
|
||||||
@@ -807,12 +817,18 @@ end
|
|||||||
|
|
||||||
--- Gets number of Entities in the World.
|
--- Gets number of Entities in the World.
|
||||||
function tiny.getEntityCount(world)
|
function tiny.getEntityCount(world)
|
||||||
return #world.entities
|
return world.entityCount
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Gets number of Systems in World.
|
--- Gets number of Systems in World.
|
||||||
function tiny.getSystemCount(world)
|
function tiny.getSystemCount(world)
|
||||||
return #world.systems
|
return #(world.systems)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Gets the index of the System in the World.
|
||||||
|
-- A simpler alternative is `system.index`.
|
||||||
|
function tiny.getSystemIndex(world, system)
|
||||||
|
return system.index
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Sets the index of a System in the World, and returns the old index. Changes
|
--- Sets the index of a System in the World, and returns the old index. Changes
|
||||||
@@ -851,9 +867,10 @@ worldMetaTable = {
|
|||||||
clearSystems = tiny.clearSystems,
|
clearSystems = tiny.clearSystems,
|
||||||
getEntityCount = tiny.getEntityCount,
|
getEntityCount = tiny.getEntityCount,
|
||||||
getSystemCount = tiny.getSystemCount,
|
getSystemCount = tiny.getSystemCount,
|
||||||
|
getSystemIndex = tiny.getSystemIndex,
|
||||||
setSystemIndex = tiny.setSystemIndex
|
setSystemIndex = tiny.setSystemIndex
|
||||||
},
|
},
|
||||||
__tostring = function()
|
__tostring = function(self)
|
||||||
return "<tiny-ecs_World>"
|
return "<tiny-ecs_World>"
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
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)
|
||||||
|
After Width: | Height: | Size: 3.6 MiB |
@@ -1,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.0-2"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.1-1"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.1-2"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.1-3"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.1-4"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.1-5"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.1-6"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.1-7"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.2-1"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.3-1"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.3-2"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,24 +0,0 @@
|
|||||||
package = "tiny-ecs"
|
|
||||||
version = "1.3-3"
|
|
||||||
source = {
|
|
||||||
url = "git://github.com/bakpakin/tiny-ecs",
|
|
||||||
tag = version
|
|
||||||
}
|
|
||||||
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,313 +0,0 @@
|
|||||||
local GLOBALS = {}
|
|
||||||
for k, v in pairs(_G) do
|
|
||||||
GLOBALS[k] = v
|
|
||||||
end
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
it("Can use functions as subfilters", function()
|
|
||||||
|
|
||||||
local f1 = tiny.requireAny('a', 'b', 'c')
|
|
||||||
local f2 = tiny.requireAll('x', 'y', 'z')
|
|
||||||
local f = tiny.requireAll(f1, f2)
|
|
||||||
|
|
||||||
assert.truthy(f(nil, {
|
|
||||||
x = true, y = true, z = true, a = true, b = true, c = true
|
|
||||||
}))
|
|
||||||
assert.truthy(f(nil, {
|
|
||||||
x = true, y = true, z = true, a = true
|
|
||||||
}))
|
|
||||||
assert.falsy(f(nil, {
|
|
||||||
x = true, y = true, a = true
|
|
||||||
}))
|
|
||||||
assert.falsy(f(nil, {
|
|
||||||
x = true, y = true, z = true
|
|
||||||
}))
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
it("Can use string filters", function()
|
|
||||||
|
|
||||||
local f = tiny.filter('a|b|c')
|
|
||||||
|
|
||||||
assert.truthy(f(nil, {
|
|
||||||
a = true, b = true, c = true
|
|
||||||
}))
|
|
||||||
assert.truthy(f(nil, {
|
|
||||||
a = true
|
|
||||||
}))
|
|
||||||
assert.truthy(f(nil, {
|
|
||||||
b = true
|
|
||||||
}))
|
|
||||||
assert.truthy(f(nil, {
|
|
||||||
c = true
|
|
||||||
}))
|
|
||||||
assert.falsy(f(nil, {
|
|
||||||
x = true, y = true, z = true
|
|
||||||
}))
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
after_each(function()
|
|
||||||
world:clearSystems()
|
|
||||||
world:refresh()
|
|
||||||
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()
|
|
||||||
assert.equals(3, world:getEntityCount())
|
|
||||||
world:update(1)
|
|
||||||
world:remove(entity1, entity2, entity3)
|
|
||||||
world:update(2)
|
|
||||||
assert.equals(0, world:getEntityCount())
|
|
||||||
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)
|
|
||||||
assert.has_error(function() world:add(moveSystem, oneTimeSystem) end, "System already belongs to a World.")
|
|
||||||
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)
|
|
||||||
assert.has_error(function() world:remove(moveSystem) end, "System does not belong to this World.")
|
|
||||||
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.filter("vel|xform")
|
|
||||||
function sortsys:compare(e1, e2)
|
|
||||||
return e1.vel.x < e2.vel.x
|
|
||||||
end
|
|
||||||
world:add(sortsys)
|
|
||||||
world:refresh()
|
|
||||||
assert.equals(sortsys.entities[1], entity2)
|
|
||||||
assert.equals(sortsys.entities[2], entity3)
|
|
||||||
assert.equals(sortsys.entities[3], entity1)
|
|
||||||
end)
|
|
||||||
|
|
||||||
it("Runs preWrap and postWrap for systems.", function()
|
|
||||||
local str = ""
|
|
||||||
local sys1 = tiny.system()
|
|
||||||
local sys2 = tiny.system()
|
|
||||||
function sys1:preWrap(dt)
|
|
||||||
str = str .. "<"
|
|
||||||
end
|
|
||||||
function sys2:preWrap(dt)
|
|
||||||
str = str .. "{"
|
|
||||||
end
|
|
||||||
function sys1:postWrap(dt)
|
|
||||||
str = str .. ">"
|
|
||||||
end
|
|
||||||
function sys2:postWrap(dt)
|
|
||||||
str = str .. "}"
|
|
||||||
end
|
|
||||||
world:add(sys1, sys2)
|
|
||||||
world:update(1)
|
|
||||||
assert.equals(str, "{<>}")
|
|
||||||
end)
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
it("Doesn't pollute the global namespace", function()
|
|
||||||
assert.are.same(_G, GLOBALS)
|
|
||||||
end)
|
|
||||||
|
|
||||||
end)
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
local TimerEvent = class "TimerEvent"
|
||||||
|
|
||||||
|
function TimerEvent:init(time, fn)
|
||||||
|
self.lifetime = time
|
||||||
|
self.timerCallback = fn
|
||||||
|
end
|
||||||
|
|
||||||
|
function TimerEvent:onLifeover()
|
||||||
|
self.timerCallback()
|
||||||
|
end
|
||||||
|
|
||||||
|
return TimerEvent
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
local UpdateSystem = tiny.processingSystem(class "UpdateSystem")
|
||||||
|
|
||||||
|
UpdateSystem.filter = tiny.requireAll("update")
|
||||||
|
|
||||||
|
function UpdateSystem:process(e, dt)
|
||||||
|
e:update(dt)
|
||||||
|
end
|
||||||
|
|
||||||
|
return UpdateSystem
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
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
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||