Commit graph

65 commits

Author SHA1 Message Date
Stephen Gutekanst
33bfdee520 {module,Audio}: ability to store event name and send it later
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-29 20:17:26 -07:00
Stephen Gutekanst
7a1efdaa69 core: cleanup sysgpu feature flag logic
* `@import("mach").core.gpu` has been renamed to `@import("mach").gpu`
* `pub const SYSGPUInterface` now has a default value (i.e. you do not need to write it in your main.zig, if you were.)
* You can now check `if (comptime mach.use_sysgpu)` for any conditional code you might have that should only run with sysgpu.

This (old):

```
pub const mach_core_options = core.ComptimeOptions{
    .use_wgpu = false,
    .use_sysgpu = true,
};
```

Has been replaced by this:

```
pub const use_sysgpu = true;
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-19 20:48:33 -07:00
Stephen Gutekanst
87a7cd8ed8 engine: remove mach.Engine in favor of mach.Core for now
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-17 11:30:51 -07:00
Ali Chraghi
be3300b80a audio: add audio mixing/playback module 2024-04-16 10:50:59 -07:00
Stephen Gutekanst
16a895240d gfx: improve Sprite module pipeline management
* No longer abuse event arguments for pipeline information.
* Store pipeline information as entities/components.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 10:10:37 -07:00
Stephen Gutekanst
013546b189 core: add mach.Core module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-08 23:49:38 -07:00
Stephen Gutekanst
fda017663a mach: keep module types closer together
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-07 13:55:08 -07:00
Stephen Gutekanst
f578e1f5e2 {module,ecs}: Mach ECS becomes the Mach' module system
This moves the bulk of the ECS code into `src/module`. It also makes
types like `mach.ecs.EntityID` accessible at the top-level `mach.EntityID`
instead.

The motivation of this change is to make the Mach module system a
first-class property of Mach.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
5dbf9ece3b module: do not expose list of modules
Doing so would encourage accidentally creating dependency loops.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
b3663f7899 module: enable Module to analyze event handler signatures
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
0328598945 module: merge ecs/systems.zig -> module.zig
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
5e353e60bb module: improve testing
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
56fc29743f move mach.ecs.Module -> mach.Module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
f29b775b27 mach-core moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
fa3f6161ad mach-sysgpu moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
e38a441b69 fix linux build (gamemode requires libc)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
e77a5a2ca2 mach-sysaudio moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
d64d30c7db mach-gamemode moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
221364415e mach-ecs moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
87c3de78f5 gfx: font: begin adding text shaping via harfbuzz
Helps hexops/mach#877

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-10-05 20:35:13 -07:00
Stephen Gutekanst
3bcbdc4682 move mach.Atlas -> mach.gfx.Atlas
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-10-03 22:36:44 -07:00
Stephen Gutekanst
4e091f1cb8 replace module() helper; remove invalid re-exports;
Fixes hexops/mach#1041
Helps hexops/mach#1038

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-09-24 17:20:40 -07:00
Stephen Gutekanst
c16cddd250 all: refactor: cleanup module structure
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-09-22 08:24:16 -07:00
Stephen Gutekanst
52c4eb5d74 all: canonicalize import paths with mach- prefix
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-09-21 14:36:21 -07:00
Stephen Gutekanst
26a9392188 build: remove earcut dependency
Related to hexops/mach#967

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-09-21 14:10:22 -07:00
Stephen Gutekanst
8a57ea059c gfx2d: add initial text rendering ECS module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-09-21 07:27:28 -07:00
Stephen Gutekanst
5b25db1025 math: begin rewrite of mach.math
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-09-04 17:01:54 -07:00
Stephen Gutekanst
c505acf95c testing: add mach.testing module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-09-04 14:31:21 -07:00
Stephen Gutekanst
fd5d347f3e rename mach.Module -> mach.Engine; parameter injection
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-08-28 11:05:01 -07:00
Stephen Gutekanst
ad17aa940b change adapter anytype -> *mach.Engine
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-08-20 16:17:40 -07:00
Ali Chraghi
c26cfec0b6 update to latest mach-core API 2023-08-02 20:34:15 -07:00
RokKos
e96864242c mach: math lib added testing for vector functionalities 2023-07-15 13:42:25 -07:00
Stephen Gutekanst
a1b4c03f9d mach: add mach.Atlas implementation from Mitchell Hashimoto
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-07-04 08:25:14 -07:00
Stephen Gutekanst
0e1b79969f mach: remove ResourceManager for now
needs much more thought

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-06-30 20:40:30 -07:00
Stephen Gutekanst
816b5101b3 core: use mach-sysjs via package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-19 08:21:31 -07:00
Stephen Gutekanst
8d2d31f6cb mach: add gfx2d / Sprite2D ECS module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-17 20:34:28 -07:00
Stephen Gutekanst
03fe3d02a9 mach: add new mach.math module
https://machengine.org/next/engine/math/

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-17 20:32:57 -07:00
Stephen Gutekanst
1fbd36199a mach: depend on mach-ecs and mach-earcut standalone repositories
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-04-28 16:04:45 -07:00
Stephen Gutekanst
353cf6144b mach: update to latest ECS module layout
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
3ff4bcc2a3 mach: finish splitting Core and Engine
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Ali Chraghi
1d7cd4be80 mach: fundamental changes
- Core doesn't depend to `App` anymore
 - `setOptions` has replaced with some new functions (`setTitle`,
   `setSize`, etc)
   - and more
2023-01-12 01:54:48 -07:00
Keith Chambers
c151222011
mach: VertexWriter fixes (#633)
* mach: VertexWriter fixes
* mach: Reference decls in gfx
* remove comptime block from refAllDecls as is redundant
2022-11-30 09:27:00 -07:00
Stephen Gutekanst
212c902747 mach: test ResourceManager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-11-05 14:12:56 -07:00
Stephen Gutekanst
6a45971c6f trimesh2d: remove in favor of mach/earcut library
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-31 12:12:01 -07:00
Stephen Gutekanst
96c2e35ab3 all: integrate earcut library
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-31 12:12:01 -07:00
Stephen Gutekanst
af357c0a8a mach: expose trimesh2d package
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-19 07:30:11 -07:00
Stephen Gutekanst
2e61125601 mach: expose sysaudio/sysjs packages
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-28 23:37:56 -07:00
Ali Chraghi
b500b04c41 all: build: install tests exe 2022-07-25 11:21:37 -07:00
Stephen Gutekanst
6ec27861b4 mach: initial support for high-level ECS applications
Adds experimental support for high-level ECS-based applications
following hexops/mach#349

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 22:25:39 -07:00
Stephen Gutekanst
e79c9e075a mach: rename mach.Engine -> mach.Core
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 20:14:27 -07:00