AGE

AGE

29 devlogs
54h
Created by HQ2000

AGE, short for "Another Game Engine", is supposed to be a simple game engine written in Rust with basic support for things like graphics,audio , assets and so on. Making a project using it should not take much boilerplate, be straightforward and also beginner-friendly. I will make a custom scripting language for the graphics if I have some time left.

Timeline

Finished audio error handling (and repo update), currently working on unifying the wgpu tutorial App and my Game which essentially has more information in it.
Also, I will need to introduce an additional field for game functions so the end user can modify the graphics etc.
As said, when there's something to show, I will show it, but if that's not the case, I'll just put a screenshot of my code here...

Update attachment

Testing and improving the event system at the moment, will finish + upload tomorrow

Update attachment

Messed around way more, now I'm giving up..functions always need to have one exact signature if you want to integrate them into the game...

Update attachment

Messing around with the trait system, I think I found a nice abstraction now so users can just input an ordinary function (or closure) into the add_once or add_update functions (see below). It does require some mass impl work, but I'm ok with that little bit since the use of the AnyMap also enabled me to remove the &GameInfo parameter which reduced the possibilities to cover with the impl work from 2 3 to 2 2 which is definitely a big improvement.

Update attachment
HQ2000 HQ2000 1 day ago
for rustaceans: I basically relied on the From / Into trait to instead of (direct) dynamic dispatch
HQ2000 HQ2000 1 day ago
the space between to numbers was supposed to be a “to the power of”…
HQ2000
HQ2000
1h 25m 2 days ago

messed around with the game_fn trait, bumped up rodio (eve though there were breaking changes, they definitely improved it, it saved me a field in my output-handler struct.
Next: finish better audio error handling and 2d graphics

Update attachment
HQ2000
HQ2000
1h 49m 5 days ago

Uploaded everything to github, nearly forgot the possibility to bulk upload...
- worked on the scheduler, now variable function parameters for those you can add to the game (once, update)
- using AnyMap instead of HashMap now, way more convenient.
- Finished refactoring into a workspace (see the image below)
- Messed around with derive macros
(I really hope I get this whole thing done in time...)

Update attachment
HQ2000
HQ2000
5h 48m 5 days ago

I already thought I did a devlog for 4 of these hours...anyways, here you go (code on the repo later):
I refactored the whole project into a workspace (way cleaner now), messed around with long types and with proc-macros (they're a pain if you don't know how to use them, like me, screenshot attached).
I know it would be really cool to be able to show something, but sadly, it's only the code right now.
(Maybe I am gonna do some showcases when I finish the scheduler and event system).
Also, this is the time from today AND the 10 last days where I just worked on the event system a bit.
Anyways, this probably won't be the last devlog for today, so stay tuned!

Update attachment

So, what should I say? I'm not that proud of the work I achieved in the last hour (or 2?, spoiler: FnOnce vs FnMut...), but overall it goes well, I guess the scheduler will be pretty finished by tomorrow so I can really take myself the time to work on the graphics core so it's not just some adjusted tutorial code. For everyone checking the fresh code at the repo: I'm still getting into Rust! Also, I can already say that this game engine will be inspired by bevy (game setup etc) but prob ( I'm not 100% sure) becoming data-oriented (I don't have that much time...). Also, HUGE props to Rust itself: I did encounter some issues that seemed pretty nasty, but none of them was really after reading the error again some times or looking up some stuff I had slight misconception of. I think C/C++ wouldn't have achieved that! Fun fact btw: Due to the fact that I learned some libraries, have test projects and switched due to name issues and more, I have f*cking 13 (!) RustRover projects attached to the SoM project! Also, for everyone attempting the same: USE A WORKSPACE. really. I should have done that....

Update attachment

Commited the stuff, basically restructured the tutorial code for the rendering core so I have a working basis, began making a scheduler and an event system (the stuff from the tutorial will be changed later, obviously. I think there will be more than one restructuring, especially for the core, as there isn't just rendering. Also making my other project, Sacrifice After Sacrifice, in parallel.

Update attachment

Making the graphics finally. The tutorial was good, it also provides some code to build on. I hope the fun part starts now!

Update attachment

Nearly finished learning wgpu yesterday

Update attachment

Audio done! I learned a lot, more restructurung, after bumping rodio up I can (finally!) continue with graphics.

Update attachment

Found the bug, a lifetime issue, woohoo!! Next restructuring incoming...

Update attachment

3 hours and it's still not playing...if I set it up normally, everything is fine. But if I want to do it using the modular way, playing IS JUST NOT WORKING, and I have no idea why 😭

Update attachment

More restructuring, approaching a minimal partially working state...It feels bad not really having to show this much (expect for the code uploaded to the repo...)

Update attachment

Sorry for the devlog after such a short time, but the first results are on github!
Also, I don't want to know how many changes the architecture will undergo...

Update attachment

Some more audio, think I found an acceptable architecture for the audio handling now, gonna upload a bit after reimplementing the functions :)
Also, I have 11(!) WakaTime projects associated now!
(testing winit, cpal, rodio, phantomdata, wgpu and so on...)
So yeah, like a quarter of my time was actually coding something that's contained in the end product. Only 55 days left now!

Update attachment

Tried out rodio a bit, also working on a custom ByteBuffer since I didn't find a proper one since I want the people using my engine to be able to pre-load songs instead of loading one chunk after another for faster access...

Update attachment

Damn...spent 1h today and some more this week to get familiar with cpal...but yeah it's to ground-up to me to program audio functionality with it, so I'm gonna stick with rodio...also, this basically erases 50% of my code to upload, so I guess now is not the time.

Update attachment

Did some refactoring as well as audio stuff...I think I will upload some code to the repo tomorrow, it is still not much, max 150 LOC distributed around 10-15 files

Update attachment

Played around with audio, seems to be pretty important to have a structure in mind beforehand…

Update attachment

Played around with cpal today, I guess I need to think of a concept for an architecture of a possible wrapper.
Also, new structure!
(I prob won't be the last one...)

Update attachment
HQ2000 HQ2000 about 1 month ago
“It” not “I”….

More Tutorial and trying....maybe I'm gonna make custom language and a transpiler...

Update attachment

I learned really much about wgpu (and graphics in general), so yeah...I still need a better folder structure, just learned that 2d is basically 3d in term of rendering, also, I now actually understand which specific things make it so hard...I'm looking form´ward to this challenge!
Still, wgpu is awesome since it takes care of the cross-platform capabilities so I can focus on the rest (which is by far enough).
Hope this pays off!

Update attachment

Another hour spent, mostly messing around. I got an error while compiling tutorial code because of too many dependencies, so I even needed to switch the linker (meaning the toolchain). I also made the decision to make a simple scripting language for arranging objects (3d and maybe 2d) since I definitely do not have the competence (and time) to make a whole new editor...or maybe I'll do that, idk.

Update attachment
HQ2000 HQ2000 about 2 months ago
NOTICE: This is a mix of time on some projects, today I only spent half an hour, but due to renaming I forgot to include another project that had around 20 min to with some other stuff. I also spent time reading the tutorial…

Again...I have to make a devlog not to let that half hour experimenting be gone (not to speak of the time reading the wgpu tutorial). Folder structure is ready!

Update attachment

Still learning wgpu...
Decisions made:
1. I guess will use cpal as an audio library
2. I need a different folder structure (picture in one of the next devlogs)

Update attachment

hours of learning (and chatting) have passed by (not measured by wakatime 😪) and there are some choice I have made after extensive research. I won't let people compile this with wasm (would make it way too complicated) and definitely use wgpu as a backend and partial front-end for graphics because of it's cross-platform ease-of-use. Also, I think I have a structure for what I want to implement (not set in stone):

Update attachment
HQ2000 HQ2000 about 2 months ago
EDIT: not “with”, but “as” wasm ofc…

fn main() {
let HQ2000=Human::new();
HQ2000.name=HQ2000;
HQ2000.project=AGE game engine;
HQ2000.activity=learning wgpu;
}

Update attachment