You are browsing as a guest. Sign up (or log in) to start making projects!

torkel

@torkel

Joined June 1st, 2026

  • 36Devlogs
  • 1Projects
  • 0Ships
  • 0Votes
Open comments for this post

6h 9m 28s logged

added switch statements, foreach-loop, objects, modules (imports), and a standard library to the scripting language

added switch statements, foreach-loop, objects, modules (imports), and a standard library to the scripting language

Replying to @torkel

0
4
Open comments for this post

2h 20m 17s logged

I’m working down my todo-list for the scripting language (ObSL). Right now i’ve got arrays implemented!

i also made a method to define functions from the c++ source so that I can access c++ stuff
(like std::chrono functions that im using for testing right now from the test.obsl script),
and whatever other functions i want to have accessible,

this will be very useful later on as I to integrate the scripting language with the game engine, as now i have an easy way to call functions already defined in the engine source code from the scripting language by just calling interpreter.bind_native(args blah blah); and then I can call the function from the interpreted scripts.. very useful :D

I’m working down my todo-list for the scripting language (ObSL). Right now i’ve got arrays implemented!

i also made a method to define functions from the c++ source so that I can access c++ stuff
(like std::chrono functions that im using for testing right now from the test.obsl script),
and whatever other functions i want to have accessible,

this will be very useful later on as I to integrate the scripting language with the game engine, as now i have an easy way to call functions already defined in the engine source code from the scripting language by just calling interpreter.bind_native(args blah blah); and then I can call the function from the interpreted scripts.. very useful :D

Replying to @torkel

0
6
Open comments for this post

2h 7m 22s logged

the scripting language now has some more mathematical operators and functions !

the scripting language now has some more mathematical operators and functions !

Replying to @torkel

0
3
Open comments for this post

2h 15m logged

The scripting language is now technically Turing complete, as i have added state environment (basically variables persist throughout the session), conditional branching via if / else statements
basic repetition via while & for loops

the screenshot below shows a fibonacci sequence &
an example of the conditional branching w. looping .

of course it’s not done yet though, i still have a lot of work ahead :)

The scripting language is now technically Turing complete, as i have added state environment (basically variables persist throughout the session), conditional branching via if / else statements
basic repetition via while & for loops

the screenshot below shows a fibonacci sequence &
an example of the conditional branching w. looping .

of course it’s not done yet though, i still have a lot of work ahead :)

Replying to @torkel

0
3
Open comments for this post

2h 4m 12s logged

still working on parsing and implementing new nodes :)

still working on parsing and implementing new nodes :)

Replying to @torkel

0
3
Open comments for this post

2h 20m 43s logged

Working on trying to implement a scripting language for my game engine…

i’ve got a simple parser working,
it definitely went faster than i expected. Going back and reviewing an old parser i made in C# a while ago helped a lot in this :)

Working on trying to implement a scripting language for my game engine…

i’ve got a simple parser working,
it definitely went faster than i expected. Going back and reviewing an old parser i made in C# a while ago helped a lot in this :)

Replying to @torkel

0
3
Open comments for this post

3h 50m 31s logged

I’d like Entities to be scriptable in a future editor application / in general without having to edit c++ source files of the editor to implement new logic systems for one entity, so i’m planning on implementing a very basic scripting language, the way i plan on it working is that you attach a script to an entinty as a component, and it will hold the actual game logic in that script, im not great at explaining with words but what im doing now is starting on implementing lexical analysis for a simple interpreter just to test things out, while I have written small interpreters before, alot of this is still new to me so I am learning along the way. the idea is that its just a very basic scripting language to interact with entities and the current scene, with basic apis for interacting with the current scenes ECS registry,we will see how it goes :)

I’d like Entities to be scriptable in a future editor application / in general without having to edit c++ source files of the editor to implement new logic systems for one entity, so i’m planning on implementing a very basic scripting language, the way i plan on it working is that you attach a script to an entinty as a component, and it will hold the actual game logic in that script, im not great at explaining with words but what im doing now is starting on implementing lexical analysis for a simple interpreter just to test things out, while I have written small interpreters before, alot of this is still new to me so I am learning along the way. the idea is that its just a very basic scripting language to interact with entities and the current scene, with basic apis for interacting with the current scenes ECS registry,we will see how it goes :)

Replying to @torkel

0
3
Open comments for this post

2h 11m 40s logged

I’m working on a simple map lighting system, which seems to be working alright.

Also scene files now have background color information (which ends up getting wired into glClearColor), also implemented name field for entities because why not.

I’m also messing around a bit with the UI since im not super experienced with ImGui but I like trying things out…

I’m working on a simple map lighting system, which seems to be working alright.

Also scene files now have background color information (which ends up getting wired into glClearColor), also implemented name field for entities because why not.

I’m also messing around a bit with the UI since im not super experienced with ImGui but I like trying things out…

Replying to @torkel

0
3
Open comments for this post

2h 4m 38s logged

I’ve been focusing mostly on my scene serialization lately.
First, I refactored the maps to remove the hardcoded TileTypes enum, which used to map 0 to grass and 1 to sand.
Instead, I implemented a system where this is defined in the grid section of the scene’s json file. The “id” property is now a generic unsigned integer for the tile type, and the “texture” property references a specific asset loaded in the scene.

I also added a “properties” section for the scene’s name and a “clear_color” array. This lets you dynamically change the window’s background color on the fly instead of always defaulting to a hardcoded black.

Writing the new methods and sorting out the custom serialization logic took a bit of work, but it is working great now.

also bumped the map file “version” to 2, even though the reading/writing of map files didn’t change at all, the usage of some bytes did kind of change (for the tiletype) so i felt it was fitting

I’ve been focusing mostly on my scene serialization lately.
First, I refactored the maps to remove the hardcoded TileTypes enum, which used to map 0 to grass and 1 to sand.
Instead, I implemented a system where this is defined in the grid section of the scene’s json file. The “id” property is now a generic unsigned integer for the tile type, and the “texture” property references a specific asset loaded in the scene.

I also added a “properties” section for the scene’s name and a “clear_color” array. This lets you dynamically change the window’s background color on the fly instead of always defaulting to a hardcoded black.

Writing the new methods and sorting out the custom serialization logic took a bit of work, but it is working great now.

also bumped the map file “version” to 2, even though the reading/writing of map files didn’t change at all, the usage of some bytes did kind of change (for the tiletype) so i felt it was fitting

Replying to @torkel

0
3
Open comments for this post

1h 22m 5s logged

i’ve been playing with loading in entities and meshes..
ignore the weird fps drops and generally low fps (compared to normally), screenshots and recordings loves messing with performance for some reason

i’ve been playing with loading in entities and meshes..
ignore the weird fps drops and generally low fps (compared to normally), screenshots and recordings loves messing with performance for some reason

Replying to @torkel

0
3
Open comments for this post

5h 9m 57s logged

i’ve implemented instanced draw calls alongside regular draw calls in my renderer, which currently im using instancing for drawing the map, I also implemented culling for the map depending on viewport and some other small optimizations, I also spent some time on fixing and improving my “Systems” and some general cleanup

i’ve implemented instanced draw calls alongside regular draw calls in my renderer, which currently im using instancing for drawing the map, I also implemented culling for the map depending on viewport and some other small optimizations, I also spent some time on fixing and improving my “Systems” and some general cleanup

Replying to @torkel

0
2
Open comments for this post

1h 33m 7s logged

Managed to fix the segfault..
Mesh::Upload was updating buffer data without binding its own VAO first, which polluted the global OpenGL state. When a new scene loaded, the driver tweaked out on the broken index bindings and crashed on the next draw call …

Managed to fix the segfault..
Mesh::Upload was updating buffer data without binding its own VAO first, which polluted the global OpenGL state. When a new scene loaded, the driver tweaked out on the broken index bindings and crashed on the next draw call …

Replying to @torkel

0
1
Open comments for this post

1h 24m 49s logged

I’ve got saving scenes working fully now! ^-^,

but an issue ive run into is a segmentation fault on switching scenes, I theorize that it’s due to me not cleaning up / reassigning things when I load in new meshes etc from the scene, thus leaving old pointers in the render queue which don’t exist anymore. This i will work on fixing next..

But for now I am quite happy that i have scenes loading and saving to json :)

I’ve got saving scenes working fully now! ^-^,

but an issue ive run into is a segmentation fault on switching scenes, I theorize that it’s due to me not cleaning up / reassigning things when I load in new meshes etc from the scene, thus leaving old pointers in the render queue which don’t exist anymore. This i will work on fixing next..

But for now I am quite happy that i have scenes loading and saving to json :)

Replying to @torkel

0
2
Open comments for this post

4h 27m 2s logged

I’ve got loading in scenes working pretty well,
but I still have work todo before I can save them properly, im pretty tired already since i spent all day chasing a bug regarding render sorting and ended up refactoring a ton of stuff that i probably didnt have too as i was searching for the issue, but atleast the codebase is somewhat cleaner

I’ve got loading in scenes working pretty well,
but I still have work todo before I can save them properly, im pretty tired already since i spent all day chasing a bug regarding render sorting and ended up refactoring a ton of stuff that i probably didnt have too as i was searching for the issue, but atleast the codebase is somewhat cleaner

Replying to @torkel

0
3
Open comments for this post

21m 54s logged

running some tests.. messing around with funny map generation shapes too but i dont know how i feel about them

running some tests.. messing around with funny map generation shapes too but i dont know how i feel about them

Replying to @torkel

0
2
Open comments for this post

5h 23m 14s logged

rather than using another custom file format i decided to just use json to serialize scenes which is coming along rather nicely …

rather than using another custom file format i decided to just use json to serialize scenes which is coming along rather nicely …

Replying to @torkel

0
3
Open comments for this post

2h 21m 57s logged

I’ve been restructuring the and moving things to run actual game logic via “Systems”.

I’ve temporarily been testing this in a messy way directly in the scene class, but I’m planning on implementing maybe some sort of basic scripting language that can be used for game logic in entities as a Component w. accompanying systems ofc,
so game logic can be defined outside of engine source files and serialized into a scene’s registry from a given file rather than the things im messing around with now.
serialization of scenes is what im planning to implement next once im happy with how scenes are working, but i need to plan ahead alot.
So for now I’m still going to focus on making sure my Scene implementation is good enough before I focus on implementing serialization and scripting etc, and I have alot to think about regarding the design and architecture of this thing that seems to have evolved into a Game Engine :)

I’ve been restructuring the and moving things to run actual game logic via “Systems”.

I’ve temporarily been testing this in a messy way directly in the scene class, but I’m planning on implementing maybe some sort of basic scripting language that can be used for game logic in entities as a Component w. accompanying systems ofc,
so game logic can be defined outside of engine source files and serialized into a scene’s registry from a given file rather than the things im messing around with now.
serialization of scenes is what im planning to implement next once im happy with how scenes are working, but i need to plan ahead alot.
So for now I’m still going to focus on making sure my Scene implementation is good enough before I focus on implementing serialization and scripting etc, and I have alot to think about regarding the design and architecture of this thing that seems to have evolved into a Game Engine :)

Replying to @torkel

0
1
Open comments for this post

2h 46m 59s logged

I completely refactored my ECS into an actual proper entity component system and added a lil fancy inspector for entities/components in the UI, everything works with the new system :)
Now that my ECS is properly implemented I’m going to start focusing on implementing proper Levels/Scenes rather than the mess I have right now in my “Game” class which I’ve been using for testing stuff

(ignore the weird framedrops my screen recorder was tweaking out)

I completely refactored my ECS into an actual proper entity component system and added a lil fancy inspector for entities/components in the UI, everything works with the new system :)
Now that my ECS is properly implemented I’m going to start focusing on implementing proper Levels/Scenes rather than the mess I have right now in my “Game” class which I’ve been using for testing stuff

(ignore the weird framedrops my screen recorder was tweaking out)

Replying to @torkel

0
6
Open comments for this post

32m 12s logged

i made a npc (the red super mutant) that just wanders around

i made a npc (the red super mutant) that just wanders around

Replying to @torkel

0
4
Loading more…

Followers

Loading…