Activity

sl4shed

Calamity engine devlog 17

a lot of new features :)

File API

I added a new file api, inspired by godot (of course, i love godot). it’s still SDL on the backend, so every time you open a file you do have to provide a mode (think of python file modes, like “r”, “a+”, etc..)
The file paths you use are "res://some/random/file.extension" to access files in the game’s base directory and "user://savedata/1738.extension" to access a folder in %AppData% or ~./local/share depending on the operating system (this is handled by SDL, so that means it should work on the PSP aswell). I still have to do some more testing, as i only just implemented this but for now it’s working fine.

Revamped Audio system (which now works properly)

The way audio sources worked before basically meant that you could only have one. in the entire runtime of your program. but i fixed that, and now there’s an Audio service to take care of the output device!
That means you should be able to output to a different device, however SDL maps audio devices by integers, and i have no idea how to list them, so for now the default is the operating system’s default.

Revamped examples

All examples now build to web (properly), and I plan to have an example website such as SDL’s example website. I need to work on more examples for features such as node trees, save data, etc…

However, I’m not done yet.

I still have to work on physics, I haven’t implemented impulses yet and you can’t have circles or capsules or rounded boxes yet (amazing, I know. But i wanted to implement these into PolygonSprite which is now ShapeSprite (it still takes in a polygon) so you can, you know… draw them? and SDL3 apparently has no function for drawing circles, or rounded boxes. For that I need ANOTHER library called SDL3_gfx which seems to be kinda maintained? so i think it would be fine…). And also, you can’t use impulses on bodies yet, which you know, is kinda important.

Also, Windows support is still WIP since I own ZERO machines which run windows :) Generally, it should just build provided you have both CMake and MSVC installed, or if you build it through Msys2. I know… It’s annoying to set all of that up, but don’t blame me! Building C++ apps on Windows is generally annoying.

Animated Sprites are also planned, since i figured texture atlases out. For that reason I also implemented Signals which are genuinely just godot signals (i really like how they work, at this point i might be building godot but more portable lmao)

Regardless, I think i see the light at the end of the tunnel, with ~2 weeks left of flavortown, i hope i can lock in and ship this project :) Also, i didn’t devlog for 12h (oops) since i was mainly fixing bugs, improving existing features. Nothing really noteworthy for me.

Attachment
0
sl4shed

portfolio devlog 4

added right clicking, just like in windows lmao

0
sl4shed

Calamity Engine devlog 16


maybe theres gonna be another devlog today but im making this one to share progress


Physics!!!!

I successfully started implementing box2d, after like a few hours of scratching my head i managed to make a small demo of boxes falling on another slanted box. im gonna implement impulses and whatnot, finish writing some documentation and add animated sprites and then i’ll ship this project (keep in mind, im not done with calamity engine, i still have the companion app to make)

0
sl4shed

Calamity Engine devlog 15

docs

I tried writing good documentation, and I believe it’s good so if you want to you can go to calamity.sl4shed.xyz like right now and try to make your own game using the engine :)

physics

I started integrating box2d into my engine and I have to say that box2d is very fried. just look at the function for creating a box. in what world would i really want to pass in half of the width and half of the height that i actually want the box to have (i presume it’s because, intuitively this means the origin point would be at the center but still what’s the point bro)

after im done with physics

i will implement animated sprites i hope i think and then i will start working on the project compiler

ok bye

Attachment
0
sl4shed

Calamity Engine devlog 14

ok i got robbed of some time because hackatime was down but oh well idrc. i added ttf support and i made kindof a backbone for the ui library.

labels

its kinda like the godot label, you have a lot of settings you can mess around with, the fonts also have a lot of options so go ham i guess. i attached a simple example of rendering some text. I also added a default font which is Trispace.

right now, todo list in order of what i want to do

  • write documentation
  • box2d/liquidfun integration
  • misc fixes
  • maybe work on the ui library?
  • unit tests maybe? i want a simple way to test that everything works for every platform
  • project compiler
  • companion app
Attachment
0
sl4shed

Calamity Engine devlog 13

input edition

input

so i basically copied whatever godot did with their input registry so now my input system is good too and its basically the same shit so i dont really need to explain it

although for now its really annoying to set events because its just a bunch of boilerplate. this will hopefully be fixed with the project templater/compiler thing im gonna cook up once im done with the framework itself :)

what im doing now

i want to add ttf support and make a ui library that has like mouse support and keyboard and tab and controller and whatever the fuck else just like in godot because godot is good i love godot

also what i also need to do

  • physics (box2d)
  • animated sprites
  • write more docs
  • tilesets (maybe)
  • 2d positional audio if i feel like it
  • project compiler
  • companion app (big one)
Attachment
0
sl4shed

Calamity engine devlog 12

the input system is actually good now; i basically copied godot’s homework and made it a lil different but i did it because godot input system is really good. i like how the api works now

0
sl4shed

Calamity Engine devlog 11

basic input

I have basic input working!! The input is gonna work a lot like in godot because i love godot input. take a look at the attached video for an example of the API. there is still a lot to do (like gamepads, mouse, mouse position, modifiers, input registry, etc) but im confident i can get it out in time

basic audio

i also have basic audio working with sdl audio streams. this means no sdl mixer! yay!!! (and also because sdl3 mixer isnt on the psp yet) (and also because i fucking hate sdl3 mixer)

also more documentation

im gonna setup the docs site to be on https://calamity.sl4shed.xyz soon i hope

ok bye

0
sl4shed

portfolio devlog 3

  • Added a virtual filesystem (only files for now. no folders) (i plan to add folders later)
  • Made icons on desktop sync with the file system
  • Added resizing to windows ( for some reason window height doesnt persist?? )
  • Started working on a markdown viewer/editor
0
sl4shed

portfolio devlog 2

I added icons to the desktop which you can drag around in a grid. Right now they can call methods in the main app file.

I added session persistence where the position of icons and windows are saved across page refreshes into localstorage.

0
sl4shed

Calamity Engine devlog 10 (yay!!)

serializing finished

while it was incredibly complicated for me to implement, for the end user it will be literally just the code i attached in the img

documentation update

while im too lazy to write documentation i also write documentation at the same time. its paradoxical. im gonna put up a website soon enough

right now

busy. school. i wanna finish before march ends and ft ends also. im gonna make input and audio and physics (if i have time) then ship this as it is in the framework state.

Attachment
0
sl4shed

Calamity Engine devlog 9

yay

serializing/node trees/prefabs

FINALLY, after like a month (well more like a week or so of work), someone answered my stackoverflow question and i finally got serializing and deserializing node trees working with cereal. Now, cereal is something i didnt abstract since honestly its good enough and i dont think i will ever swap it out (i hope im not jinxing myself here)

also

i don’t remember anything else i added but honestly for me this is huge. im also working on some documentation with doxygen and some doxygen theme to make it look like it wasnt made in 1998.

here is a random video of loading node trees working

(keep in mind this is like the cereal way of loading it. i will 100% have an abstract function to do this in a bit)

0
sl4shed

portfolio devlog 1

rewrote some old code i had lying around for window management. I used 7.css to replicate windows 7’s look pretty much exactly.
I have window ordering working, window closing and focusing/dragging.

0
sl4shed

I’m sorry for like zero devlogging in a while but I’ve become so desperate with random serialization bullshit related to cereal i haven’t been able to make any meaningful progress except some docs. so i guess in the next week stay tuned for some devlog hopefully if someone answers my stackoverflow post (i know very desperate of me)

Attachment
2

Comments

sl4shed
sl4shed about 2 months ago

i also got sidetracked with the 700 tests i had at school, hackcraft and blueprint

sl4shed
sl4shed about 2 months ago

i need to lock tf in to flavortown

sl4shed

Calamity Engine devlog 8

extra fun edition

preface

you may have noticed that there hasn’t been a devlog for 4 days, and there are 2 reasons for that:

  1. I have been really busy with school
  2. psp glibc

logger library

my logger class is literally just a wrapper around spdlog which is a very neat logging library, i made it a wrapper to have a nice API exposed to the user and for future-proofing.

however

spdlog came with some… considerations, and i decided ultimately it would be nicer to package up fmt & spdlog for the PSP and push them to the psp-packages repository
I had to scratch my head a little while patching the source code but in the end it worked out and I have logging working on the psp too!

also

honestly I don’t remember anything else I added so here’s an image of logging working on PPSSPP.

ok bye

Attachment
0
sl4shed

Calamity Engine devlog 7

major changes!! big win

rotation fix

ok so remember last post where i was talking about how painful it is to use matrices? well i was kinda right but also i was kinda stupid. i’m wiser now. aka my smarter friend helped me fix it and now rotation works properly.

with big rotation comes big consequences

positive consequences that is, i added a camera component!
you can add this camera component to any node, pretend it has the height and width of the screen (technically, nodes cannot have a pixel width and height unless they have a sprite. Scale is a multiplier as a consequence to adding matrices, however as in most game engines the camera’s pixel width and height is the size of the screen!). The camera also has an origin point that is set to 0.5 by default as in most game engines, so have fun i guess?

with major changes come major changes

so the game engine is now SDL3 (yes it still compiles to the PSP)! sdl3 is a lot better and it wasnt really that hard to port it because i barely used SDL in the first place, it was only used in graphics.cpp.

one more thing

the engine builds to the web now with emscripten! very exciting as this means my usability rating will not be 2 stars…

attached is video evidence that i’m not lying

it uses the calamity mod sprite from terraria because my friend thought it would be funny, anyways in the video the camera is spinning and zooming out at the same time. I don’t really have a “game” yet since no input/audio/file library but that is to come.
Next on the list is probably logging and error handling since i desperately need that (the engine segmentation faults if it tries to load a texture that doesnt exist when built natively lol)

ok bye

2

Comments

iris
iris 3 months ago

woa! good job!!

sl4shed
sl4shed 3 months ago

thank you!

sl4shed

Calamity Engine devlog 6

pain edition

So… I thought if i made a 2D game engine I wouldn’t have to deal with matrices (transformation matrices), but here we are!!!
remember that bug from like the second devlog? where the node was spinning around wrong? well, turns out to fix it you have to have matrices in the transform because yeah i guess you just do.
If by some weird coincidence you’re going through the same headache as me here is a good resource: matrices and transformations (godot)

other changes

nothing really, I wanted to start work on the camera but that requires (you guessed it) transformation matrices!!!

so not a lot for now, expect this bug to be fixed maybe tommorow if i feel like it or this weekend

ok bye

Attachment
1

Comments

sl4shed
sl4shed 3 months ago

i have really been feeling mega unproductive

sl4shed

Calamity Engine Devlog 5

fun scripting edition

Technically attaching scripts to nodes isnt part of the framework, however, it is part of the project compiler (more on that later), so, I drafted up how the scripting system would look like!

how does it actually work

You have a folder called “scripts” where you have .hpp files that look like the image attached. Basically just like unity’s scripting API, so it should be pretty simple to get used to! These “scripts” are just classes that extend the Script component which contains all of the base functions like update, start, etc…. Then, you just attach the script like a regular component and it just works!
This way, once you’ve set up the node tree and attached scripts you basically never have to touch main.cpp ever.

node trees

Basically a fancy way of saying “serialize and deserialize loaded nodes along with their corresponding components”. Exporting a node tree would just take every node under the root node and serialize it into a JSON file.

file access

I’m currently working on a file access API used for loading and writing node trees when needed, that is, of course, cross platform (not sure about wasm yet though).

project compiler (the middleman)

I’ve finally decided how this would be structured. I will have a project structure format (fancy name for json serialized node tree + script collection) that you pass into a standalone project compiler program to turn it into a compilable calamity framework C++ project.

what about the companion app?

The companion app (aka the engine itself) would be an editor made for the project structure format. This way, this one big project is split up into more handleable chunks that I can work on individually. I still have to create the standard project template: something that would compile to all platforms with no extra tinkering required (by tinkering i mean cmake stuff)

ok bye

Attachment
2

Comments

iris
iris 3 months ago

woah! sick project , it seems very well though out! i love old handhelds

sl4shed
sl4shed 3 months ago

thank you!!!

sl4shed

Calamity Engine Devlog 4

The app compiles cross-platform! 🔥🔥🔥 Turns out it seg faults when it tries to load a texture file that doesn’t exist.

how about really cross platform?

I know nobody really bothers to install standalone apps when they vote for projects, so i will be attempting to make calamity engine compile with emscripten (which will be a big pain in the bum bum)

plans for companion app

I will probably have to build the companion app with calamity engine so it will kinda be engine-ception, “playing” the game will just mean loading the scene node tree (i still have to figure out how to tie scripts to specific nodes 😬, the solution im thinking of right now is “if current scene is this, run this if this node exists” and i hope there’s a better way to do it perhaps)

for now

Here it is running horribly on my phone through termux x11 (1 frame per sometimes)

ok bye

0
sl4shed

Calamity engine devlog 3

im figuring shit out

Ordering will be done in the way that godot does it, aka, root node -> render -> renders children in order

scenes/prefabs

I will implement a serializer & deserializer (optimally in JSON) to load node trees instantly, this would be used for scenes and prefabs

saves

This would be a bit harder to achieve cross platform (did i mention i want the engine to be cross platform?), still i think json would be a good option.

cross platform

I want to stray away from inbuilt kernel functions for the PSP as much as possible, since technically the engine can be compiled to PC since it only uses SDL2, however:

ok bye

Attachment
0
sl4shed

Calamity Engine Devlog 2

im tweaking bro

i have implemented a child-parent system where you can have a node be a child of another node and etc etc i think if you’re reading this you’ve used a game engine before.

Anyways my last devlog didn’t go into detail at all, so i’m going into detail in this one:

structure of the engine

I want this game engine to be kind of like unity: The engine has a component system (for example, you can have a node and have a sprite component to render a sprite, or maybe you want a camera component or an audiolistener component, etc…)

end goal

right now im working on the basic framework (i still have audio and input and physics to implement) but after I’m done with that i want to have a desktop app that lets you generate a project with a level/scene designer and an individual node script system (that will be a pain to setup, but oh well, if it’s auto generated it shouldn’t be that hard). I guess there will be a certain layer of abstraction inbetween what you have in-editor and what the final compiled version is like, so perhaps errors will be hard to figure out among other output, but that’s a problem for future me!

right now

have a video of realistic flappy bird 3d spinning along incorrectly with another flappy bird 3d

2

Comments

sl4shed
sl4shed 3 months ago

also i like how its telling me that having a devlog each 100 minutes is “okay”. i guess when i post a devlog i want to have some progress to show yk

sl4shed
sl4shed 3 months ago

also if anyone knows how to change my username or pfp please let me know im stuck with my gmail prefix that i made when i was 7

sl4shed

Calamity Engine Devlog 1

This is a project I’ve been wanting to make for a while, ever since I’ve purchased my PSP.
Basically, Calamity Engine is a 2D PSP game engine.
Here is the result of 2-ish hours of work 🔥🔥🔥:

Attachment
0