Diary of a Game: Day 8
Well, what is it they say about best-laid plans?
I went into the weekend full of vim and vigor, with a firm idea of what I wanted to achieve, and instead I woke up with terrible hayfever, which triggered a sinus headache which completely killed my productivity until it started clearing up Tuesday afternoon.
Oh, well.
Today I got back onto the horse, so to speak, and started getting Chipmunk and Flecs talking to each other. Actually, before doing that, I used the StarterKit to create a new codebase for Gravitas, so all future updates will be made in a private repository, and will be back-ported to the StarterKit once Gravitas has shipped.
I started by making Chipmunk structs, such as cpSpace
, cpBody
and cpShape
, first-class components in Flecs, which means Flecs would be responsible for managing their lifetime. But I just couldn’t get this working. Chipmunk asserts heavily that all data looks sane when compiled in debug mode, and I was triggering asserts left, right and centre.
Back to the drawing board, I worked to hack in the “hello chipmunk” example, not bothering to integrate it with Flecs at all, just to make sure things worked as expected. And they did. I really should have started from that point, and I’ll make a note to do so next time I integrate a third-party library like this.
I was then able to implement a few simple wrapper structs in Flecs, that just encapsulated pointers to Chipmunk data, leaving Chipmunk to manage the lifetime of its objects. And that all worked swimmingly. So I’m off to the races again.
Tomorrow I plan to get physics debug drawing working, and will then move on to rendering those spaceship sprites after all.
In future I will remember to slow down and to forget trying to keep a tight schedule. Nature abhors a workaholic, as they say.
Get Gravitas
Gravitas
Cave flyer party game.
Status | Released |
Author | the punk collective |
Genre | Shooter |
Tags | Flying, Gravity, Local multiplayer, party-game, Physics, Retro |
More posts
- Gravitas Trailer UnleashedDec 31, 2021
- Diary of a Game: Day 111Dec 24, 2021
- Diary of a Game: Day 61Nov 02, 2021
- Diary of a Game: Day 54Oct 25, 2021
- Diary of a Game: Day 51Oct 22, 2021
- Diary of a Game: Day 21Sep 21, 2021
- Diary of a Game: Day 13Sep 13, 2021
- Diary of a Game: Day 10Sep 10, 2021
- Diary of a Game: Day 9Sep 09, 2021
Leave a comment
Log in with itch.io to leave a comment.