Commit graph

46 commits

Author SHA1 Message Date
Kazhnuz
91fc55555f feat(camera): make the camera support multiple "mode" 2019-06-29 11:32:42 +02:00
Kazhnuz
e6c2af5429 feat(world): make object creation more customizable by worlds 2019-06-28 10:06:38 +02:00
Kazhnuz
7cce6ea99f improvement(world): separate queryRect into 2 functions 2019-06-27 21:20:54 +02:00
Kazhnuz
e916c28630 fix(actor2D): simplify gravity system by not handling x by default 2019-06-27 21:03:34 +02:00
Kazhnuz
eafc266544 fix(baseworld): make baseworld not crash when a body is loaded 2019-06-23 15:39:57 +02:00
Kazhnuz
8c1e9d8e05 feat(world): initial support for external hitbox
For the moment it doesn't add any real feature, but it allow the 
mainHitbox to be an external object to the actor, giving to it more 
power.
2019-06-22 19:27:31 +02:00
Kazhnuz
241baad935 fix(world): remove a forgotten debug function 2019-06-21 20:06:58 +02:00
Kazhnuz
408a71434f fix(world): use right camera internal coordinate
Fixes #15 and #17
2019-06-21 18:50:45 +02:00
Kazhnuz
3ced2dbef4 fix(world): separate getting data from the internal and advertised view
Use two functions instead of just one, one showing the actual dimensions 
of the internal "cam" (basically, the whole screen), and one showing the 
advertised displaced camera.

Fixes #16
2019-06-21 18:27:02 +02:00
Kazhnuz
a227bbb033 feat(world): add a function to reset world 2019-06-16 16:33:29 +02:00
Kazhnuz
f7040d1854 feat(world): draw actors according to their depth
It allow us to draw some sprites always over some others.

Fixes #8
2019-06-16 10:24:30 +02:00
Kazhnuz
54b01b0d94 feat(world): add a creationID variable to keep track of actors ID 2019-06-16 10:08:59 +02:00
Kazhnuz
61b3c29f6b improvement(world): only draw visible actors when a camera is active
It'll make the game less laggy. For the moment, no need to only update 
visible actors.

Fixes #14
2019-06-16 10:00:05 +02:00
Kazhnuz
65b0c74a06 feat(world): add a batchActor function activated by a bool in tiled
This way, you can add multiple actors with just one tiled object. It 
also bring better feature parity with Imperium Porcorum.

Fixes #10
2019-06-15 11:50:53 +02:00
Kazhnuz
4c2427bfd6 feat(world): add a drawHUD function to draw the current HUD
It is able to draw everything a player object want directly where it 
should go.

Fixes #3
2019-06-13 22:23:23 +02:00
Kazhnuz
80ef8b1a65 gamecore/world: add an activity system for the world 2019-05-30 13:37:55 +02:00
Kazhnuz
23f17491ad gamecore/world: make the world registerable directly by itself 2019-05-28 19:28:05 +02:00
Kazhnuz
b80566b4ec modules/world: add a way to check collisions 2019-05-05 13:01:00 +02:00
Kazhnuz
f04d0c6b4e modules/world: initial gravity system 2019-05-02 19:51:43 +02:00
Kazhnuz
5eed16bac4 modules/world: make local the vx and vy variables 2019-05-02 17:34:35 +02:00
Kazhnuz
eddf66595c modules/world: attach and detach view just once 2019-05-02 17:21:48 +02:00
Kazhnuz
aaf0b1882b modules/world: displace the map according to the view relative position 2019-05-02 16:21:24 +02:00
Kazhnuz
c41930fca4 modules/world: automatize multiple character handling 2019-05-01 17:21:38 +02:00
Kazhnuz
dd21878ee8 modules/world: add an initActors function 2019-05-01 16:25:44 +02:00
Kazhnuz
18d75f825c modules/world: separate map loading from level initialization 2019-05-01 14:36:40 +02:00
Kazhnuz
fd78d083af modules/world: add a way to load objects from tiled 2019-04-29 16:40:44 +02:00
Kazhnuz
882f98bf40 modules/world: add a way to link the camera to an actor 2019-04-29 15:03:28 +02:00
Kazhnuz
cc5de7d5ff modules/world: attach and detach the camera when drawing the map 2019-04-29 14:12:34 +02:00
Kazhnuz
a046eb5a9c modules/world: add camera system to the world system 2019-04-29 11:21:41 +02:00
Kazhnuz
42303da317 modules/world: fix movement functions for bump2D
The moveActor function is in bump2D a wrapper for the move function of
bump2D. But this function doesn't handle actual movement.

In order to make things samewise everywhere, let the actor handle actual
movement themselves.
2019-04-22 09:42:33 +02:00
Kazhnuz
eac75df874 modules/world: don't access directly to the actors manager inside worlds 2019-04-22 09:36:29 +02:00
Kazhnuz
f2680c37f3 modules/world: improve commenting and organisations 2019-04-08 19:58:41 +02:00
Kazhnuz
dd1e25969e modules/world: improve keys sending to player object 2019-04-07 22:46:28 +02:00
Kazhnuz
262bf97e67 modules/world: add basic move functions to entities 2019-04-07 18:33:41 +02:00
Kazhnuz
bdd837d4da modules/world: basic player system 2019-04-07 17:15:27 +02:00
Kazhnuz
064d5bd2a8 modules/world: separate actors functions from main functions 2019-04-07 14:06:04 +02:00
Kazhnuz
9a47584feb modules/world: add basic sti support 2019-04-07 14:03:44 +02:00
Kazhnuz
63238c4ec6 modules/world: add a function to add Actor from index 2019-04-07 13:46:08 +02:00
Kazhnuz
3bd7203e59 modules/world: correctly set actor list 2019-04-07 13:43:24 +02:00
Kazhnuz
f9ff7ff122 modules/world: fix typos 2019-04-07 13:36:21 +02:00
Kazhnuz
19cdf6c3ab modules/world: load the actorlist inside the world 2019-04-07 13:35:49 +02:00
Kazhnuz
5365f23c30 modules/world: port all actor functions from IP 2019-04-07 13:31:25 +02:00
Kazhnuz
171ff007e9 modules/world: add comment to make structure more explicit 2019-04-07 13:22:23 +02:00
Kazhnuz
3fce24a211 modules/world: use only the "actor" name 2019-04-01 13:09:21 +02:00
Kazhnuz
8ba5644fb2 modules/world: add a way of counting actors 2019-04-01 12:47:08 +02:00
Kazhnuz
02b6cbd87d modules/world: add basic actor system 2019-04-01 08:08:54 +02:00