Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

Current design decisions for my game engine:

Uncategorized
85 1 0
  • Camera controls for the engine editor. I stole the exact keybindings from Godot >:)

    Finally had some time again to work on the project. The scene tree is now shown in a QTreeView and you can toggle the visibility of individual nodes. Also re-implemented the resource manager and scene deserialization from the previous version.

    Next up: Let the editor actually edit the scene and save it to disk!

  • Finally had some time again to work on the project. The scene tree is now shown in a QTreeView and you can toggle the visibility of individual nodes. Also re-implemented the resource manager and scene deserialization from the previous version.

    Next up: Let the editor actually edit the scene and save it to disk!

    Wait, this isn't progressing in the right direction - maybe I should take a break...

  • Wait, this isn't progressing in the right direction - maybe I should take a break...

    Today has been a very relaxing goblin mode coding Sunday :D Some more non-visual updates:

    - StringIDs. Like Godot's StringNames, interned¹ strings are hashed and stored in an internal database. "bla"_id gets converted to a handle that is faster to compare for equality than std::strings.

    - Loading scenes from the editor via a file dialog, including a "Recents" menu. The UI was surprisingly easy to implement with Qt!

    ¹ https://en.wikipedia.org/wiki/String_interning

  • Today has been a very relaxing goblin mode coding Sunday :D Some more non-visual updates:

    - StringIDs. Like Godot's StringNames, interned¹ strings are hashed and stored in an internal database. "bla"_id gets converted to a handle that is faster to compare for equality than std::strings.

    - Loading scenes from the editor via a file dialog, including a "Recents" menu. The UI was surprisingly easy to implement with Qt!

    ¹ https://en.wikipedia.org/wiki/String_interning

    Thinking about the next steps for the editor. I want to add a transform gizmo, which means I need some way of recognizing when I click/drag things in the 3D viewport, so I'll try to find out how other editors do that. Naively I'd think I need a physics engine for that, but in Godot I can accurately select meshes without collision shapes 🤔

  • Thinking about the next steps for the editor. I want to add a transform gizmo, which means I need some way of recognizing when I click/drag things in the 3D viewport, so I'll try to find out how other editors do that. Naively I'd think I need a physics engine for that, but in Godot I can accurately select meshes without collision shapes 🤔

    AABBs (partially) implemented

    They don't support scaling and rotations yet, but for starters it's good enough for (1) visualizing selected nodes and (2) testing raycasts from the cursor position against.

  • AABBs (partially) implemented

    They don't support scaling and rotations yet, but for starters it's good enough for (1) visualizing selected nodes and (2) testing raycasts from the cursor position against.

    Got node selection working, without a physics engine or CPU-side triangle raycasting! Used this idea from a colleague:

    - Put mouse position and node ID into push constants
    - In the fragment shader, check if current pixel is under the mouse
    - If so, write node ID and depth into a list in a storage buffer
    - On CPU, read back the buffer and sort by depth

    Upside: No need for AABB testing, proxy meshes, or duplicating skinning code on the CPU

    Downside: Has to be included in most shaders

  • Got node selection working, without a physics engine or CPU-side triangle raycasting! Used this idea from a colleague:

    - Put mouse position and node ID into push constants
    - In the fragment shader, check if current pixel is under the mouse
    - If so, write node ID and depth into a list in a storage buffer
    - On CPU, read back the buffer and sort by depth

    Upside: No need for AABB testing, proxy meshes, or duplicating skinning code on the CPU

    Downside: Has to be included in most shaders

    Weekend progress update: we have a transform gizmo!

    It can't actually transform anything yet but it jumps to the average position of the selected nodes and disappears when nothing is selected.

  • Weekend progress update: we have a transform gizmo!

    It can't actually transform anything yet but it jumps to the average position of the selected nodes and disappears when nothing is selected.

    Bonus screenshot: one of the fun things that can happen when you mess up and bind invalid descriptor handles. Had a lot of GPU hangs today :P

  • Bonus screenshot: one of the fun things that can happen when you mess up and bind invalid descriptor handles. Had a lot of GPU hangs today :P

    The translate gizmo is now functional :D

  • The translate gizmo is now functional :D

    For a second there I thought my refactor of the materials system just worked on first try, but no, it only seemed to work by accident and now my GPU crashed. Time to go to bed :D

  • For a second there I thought my refactor of the materials system just worked on first try, but no, it only seemed to work by accident and now my GPU crashed. Time to go to bed :D

    The refactor being: First I had a global buffer of materials with albedo color, roughness, metallic, bindless texture indices etc that's always bound to every shader and I pass a material ID via push constants with each object. But not every material is PBR, there's going to be custom shaders using different data. So now the global buffer is an array of pointers to material buffers of different types, and I send an additional material type index via push constants as well.

  • The refactor being: First I had a global buffer of materials with albedo color, roughness, metallic, bindless texture indices etc that's always bound to every shader and I pass a material ID via push constants with each object. But not every material is PBR, there's going to be custom shaders using different data. So now the global buffer is an array of pointers to material buffers of different types, and I send an additional material type index via push constants as well.

    Update:
    - Proper dynamic point lights based on nodes (previously the light was just hardcoded in the fragment shader)
    - Billboard shader
    - Badly drawn icons for point lights in the editor using billboard shader
    - Icons have the color of the light

  • Update:
    - Proper dynamic point lights based on nodes (previously the light was just hardcoded in the fragment shader)
    - Billboard shader
    - Badly drawn icons for point lights in the editor using billboard shader
    - Icons have the color of the light

    Update: KTX2 texture support. Smaller VRAM usage due to GPU block encoding, much faster loading times since I also downscaled some textures, and much better looking textures from afar due to mimapping that comes for free (the toktx tool I use to convert to ktx can automatically generate them).

    Conversion to KTX isn't automated yet, but I hope to do that as part of the import process in the future.

    Again mostly copied from the old engine and slightly adjusted

  • Update: KTX2 texture support. Smaller VRAM usage due to GPU block encoding, much faster loading times since I also downscaled some textures, and much better looking textures from afar due to mimapping that comes for free (the toktx tool I use to convert to ktx can automatically generate them).

    Conversion to KTX isn't automated yet, but I hope to do that as part of the import process in the future.

    Again mostly copied from the old engine and slightly adjusted

    The temptation to rush ahead and implement the the fun stuff is real :§ But before that I really gotta make a proof of concept at least for a core architectural system.

    In Godot you have individual .tres / .tscn files for custom resources and scenes. I want to instead use a single SQL database for everything (or at very least for resources like items etc., but ideally also for whole scene hierarchies). That idea needs testing.

  • The temptation to rush ahead and implement the the fun stuff is real :§ But before that I really gotta make a proof of concept at least for a core architectural system.

    In Godot you have individual .tres / .tscn files for custom resources and scenes. I want to instead use a single SQL database for everything (or at very least for resources like items etc., but ideally also for whole scene hierarchies). That idea needs testing.

    Mods would then just be collections of insert / update statements. Upside is you could very easily modify the whole game based on complex parameters, like dimming all light sources in dungeons or changing the stats city guards based on the economic status of the town they're posted in calculated by the wealth of local shopkeepers, in a single SQL statement. No need to touch hundreds of files.

  • Mods would then just be collections of insert / update statements. Upside is you could very easily modify the whole game based on complex parameters, like dimming all light sources in dungeons or changing the stats city guards based on the economic status of the town they're posted in calculated by the wealth of local shopkeepers, in a single SQL statement. No need to touch hundreds of files.

    Downside is I'm lazy and only want to maintain a single source of truth regarding data structure, so I'm experimenting with automatically generating an SQL table for every data class in my game by analyzing source code (with annotations). Let's see how that goes!

  • Downside is I'm lazy and only want to maintain a single source of truth regarding data structure, so I'm experimenting with automatically generating an SQL table for every data class in my game by analyzing source code (with annotations). Let's see how that goes!

    Testing it by making a tiny text-based RPG in a separate project first. Depending on how much fun that is it will either stay a tech demo or become something to practice writing as well. Could be like a demo to put on itch to give a preview of the world and its characters.

  • Testing it by making a tiny text-based RPG in a separate project first. Depending on how much fun that is it will either stay a tech demo or become something to practice writing as well. Could be like a demo to put on itch to give a preview of the world and its characters.

    Slowly hacking away at prototyping a data resource system that's backed by sqlite. Not really sure what I'm doing...

    Currently I have C++ classes representing data which have an equivalent table in the database. The classes have a static getter taking the ID as input. This does a select statememt on the DB, creates an instance of the class, puts it into a pool, and returns a handle to get a reference to the instance.

  • Slowly hacking away at prototyping a data resource system that's backed by sqlite. Not really sure what I'm doing...

    Currently I have C++ classes representing data which have an equivalent table in the database. The classes have a static getter taking the ID as input. This does a select statememt on the DB, creates an instance of the class, puts it into a pool, and returns a handle to get a reference to the instance.

    I'm wondering how to handle relations between classes / tables. E.g. Actors have an inventory of Items. I know how to represent this on the DB, but on the C++ side I need to replace the foreign keys and utility tables for many-to-many relations with arrays of handles / pointers etc. But how much do I want to load into memory? Loading an actor shouldn't always load all items in their inventory and everything those items have relations to, not until actually needed.

  • I'm wondering how to handle relations between classes / tables. E.g. Actors have an inventory of Items. I know how to represent this on the DB, but on the C++ side I need to replace the foreign keys and utility tables for many-to-many relations with arrays of handles / pointers etc. But how much do I want to load into memory? Loading an actor shouldn't always load all items in their inventory and everything those items have relations to, not until actually needed.

    So I guess I'll use getter methods which query the DB on the first time, and later just directly return the already loaded data. The database will not change during runtime of the game so it seems reasonable.

    But it WILL change when using the editor... hmm...

    Wondering if it'd be reasonable to skip the C++ class instances entirely and query the DB every time any data gets accessed using helper functions 🤔


Gli ultimi otto messaggi ricevuti dalla Federazione
  • read more

  • Viaggiatori, è quasi tutto pronto per il mio viaggio a La Gomera (isole Canarie).

    Durante il viaggio cercherò di postare foto e pensieri, si Pixelfed, e sul neonato gruppo "Viaggi e Foto" su (https://www.feddit.it/c/viaggi).

    Ogni giorno scriverò qualcosa, Nun mini blog del giorno, anche sulla sezione dedicata del mio sito:

    https://simoneviaggiatore.wordpress.com/la-gomera/

    Restiamo in contatto! 🙂

    @Viaggi

    read more

  • La targa per Giuseppe Pinelli è stata vandalizzata per la sesta volta

    @milano

    È stata vandalizzata per la sesta volta la targa in ricordo di Giuseppe Pinelli, ferroviere e attivista anarchico morto il 15 dicembre 1969 nei locali della questura di Milano. La targa è posizionata in piazzale Segesta, a San Siro, non lontano dalla sua abitazione.

    da https://www.milanotoday.it/politica/vandalizzata-targa-pinelli-ottobre-2025.html

    Aggiungo un'altra foto, che nell'articolo non compare, di un cartello apparso questa estate "tra una vandalizzazione e l'altra" che riporto testualmente:

    "Giuseppe Pinelli: assassinato e vilipeso. Il Cippo in Piazzale Segesta, in memoria di Giuseppe Pinelli, partigiano-ferroviere-anarchico, ancora una volta è stato vandalizzato per mano della topaia fascista, avvalendosi delle coperture del governo di destra.

    Un governo che vuole riscrivere la storia e che utilizza il Decreto "Insicurezza" per reprimere le lotte rivendicative di lavoratori, studenti e movimenti vari.

    Una legge bocciata anche dalla Corte di Cassazione, ma l'attuale governo, come già nel ventennio fascista, risponde: "Ce ne freghiamo".

    read more

  • I made a couple of points where excels over
    https://youtu.be/pkvTIrKRLas

    read more

  • The Supercon 2025 Badge is Built to be Customized

    For anyone who’s joined us for previous years, you’ll know that badge hacking and modification are core to the Hackaday Supercon experience. While you’re of course free to leave the badge completely stock, we encourage attendees to tear it apart, learn how it works, and (hopefully) rebuild it into something unique. There are even prizes for the best hacks.

    As such, every decision about the badge’s hardware and software is made with hackability in mind. It’s why we always try to add an expansion port to the badge and, in recent years, have leaned into MicroPython to make it easier for attendees to modify the code.

    But one thing that’s been largely missing in previous badges is aesthetic customization. Sure, you could strip out the firmware and write something entirely new, or hang some oddball peripheral off the side of the thing, but ultimately it still looked like the badge we gave you at the door. That’s because, at the end of the day, the badges are just PCBs. Short of designing your own enclosure (which has certainly been done), every badge looks the same. That is, until now.

    This year’s badge is unique among Supercon badges because it isn’t just a PCB. It’s actually a stack-up of two PCBs! That might not sound like much of a distinction, but in this case, the front board has no electrical function — its only purpose is to hold the keyboard membrane against the dome switches on the rear PCB. The only reason we made it out of a PCB in the first place is that it was convenient and cheap at the scale we needed. But if those weren’t concerns, it could just as easily have been 3D-printed or cut out with a laser or a CNC router.

    While the necessities of running two hacker cons on opposite sides of the planet within a couple of months of each other meant we needed to think at scale, attendees are free to do whatever they want between now and when they get their badges on Friday. Want to carve a front panel out of aluminum on your CNC? Awesome. Perhaps laser-cut some thin plywood and give it a nice stain for that old-school look? We love it. Want to see what that fancy multi-material 3D printer you’ve got is capable of? So do we.
    Hailing frequencies open, Captain.

    Some Assembly Required


    Want to make the 2025 Hackaday Supercon badge your own? Just head over to the “hardware/mechanicals_and_models” directory in the badge’s GitHub repository and you’ll find STEP, DXF, and SVG versions of the front panel. We’re eager to see some wild and wonderful front panels, but there are a few things to keep in mind:

    Spacing between the rear and front boards should be approximately 2 mm.The area around the keyboard should be roughly PCB thickness (~1.7 mm) for optimal typing.You’ll need to provide hardware (M3 nuts/bolts work well) to attach the front panel to the badge.

    If you’ve got other questions or need some assistance, leave a comment below or check in on the #badge-hacking channel in the Hackaday Discord server. See you at Supercon!

    hackaday.com/2025/10/27/the-su…

    read more

  • Is the internet today the internet you want for future generations? What if instead of for-profit greed, rampant privacy violations, and pervasive government spying, we could have a different relationship with the internet?

    Join us in building a free and open internet – free from the chains of surveillance and censorship! ⛓️‍💥

    https://blog.torproject.org/2025-fundraiser-donations-matched/

    read more

  • @snow Infatti, è così. Era di quei ragni col corpo come la punta di una biro e zampe lunghissime e sottili.

    read more

  • BREAKING NEWS: Meloni Endorses Sanctions on Israel.

    Italian Prime Minister Giorgia Meloni has declared Italy would openly back sanctions against Israel, a dramatic reversal from her staunch support just a year ago amid escalating Gaza tensions. According to the Brics News, Meloni's shift signals growing European frustration with Tel Aviv's actions, potentially reshaping Rome's foreign policy in the Middle East.

    https://www.instagram.com/p/DQUi92cEn7p/

    https://signal.group/#CjQKIPZ9lUX9gmPzwEg-OYlBIeimBmuTErSoE6GNJpoS8z0XEhDQ6FbNt3tZQN6Meh1dEZSw

    read more
Post suggeriti
  • 0 Votes
    1 Posts
    0 Views
    La targa per Giuseppe Pinelli è stata vandalizzata per la sesta volta@milano È stata vandalizzata per la sesta volta la targa in ricordo di Giuseppe Pinelli, ferroviere e attivista anarchico morto il 15 dicembre 1969 nei locali della questura di Milano. La targa è posizionata in piazzale Segesta, a San Siro, non lontano dalla sua abitazione.da https://www.milanotoday.it/politica/vandalizzata-targa-pinelli-ottobre-2025.htmlAggiungo un'altra foto, che nell'articolo non compare, di un cartello apparso questa estate "tra una vandalizzazione e l'altra" che riporto testualmente:"Giuseppe Pinelli: assassinato e vilipeso. Il Cippo in Piazzale Segesta, in memoria di Giuseppe Pinelli, partigiano-ferroviere-anarchico, ancora una volta è stato vandalizzato per mano della topaia fascista, avvalendosi delle coperture del governo di destra.Un governo che vuole riscrivere la storia e che utilizza il Decreto "Insicurezza" per reprimere le lotte rivendicative di lavoratori, studenti e movimenti vari.Una legge bocciata anche dalla Corte di Cassazione, ma l'attuale governo, come già nel ventennio fascista, risponde: "Ce ne freghiamo".
  • 0 Votes
    1 Posts
    0 Views
    I made a couple of points where #Linux excels over #Windowshttps://youtu.be/pkvTIrKRLas
  • 0 Votes
    1 Posts
    0 Views
    Is the internet today the internet you want for future generations? What if instead of for-profit greed, rampant privacy violations, and pervasive government spying, we could have a different relationship with the internet?Join us in building a free and open internet – free from the chains of surveillance and censorship! ⛓️‍💥https://blog.torproject.org/2025-fundraiser-donations-matched/
  • 0 Votes
    11 Posts
    0 Views
    @tinturadiodio @oblomov @Azalais finalmente stasera son riuscita a tirar fuori il maglione della foto dall'armadio, e in effetti probabilmente era stato fatto con i ferri del 4 (e tiene talmente caldo che riesco a metterlo solo in pieno inverno)