Activity
Mon
Wed
Fri
Sun
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
What is this?
Less
More

Memberships

Ooga Booga Game Devs

3.1k members β€’ Free

21 contributions to Ooga Booga Game Devs
need help with wierd crash
i was tinkering with adding the bloom shader example to my game. whenever the game tries to make a new world file it crashes. it says the error happens when setting up a new world file but i don't think the world file creation is at fault because it's code hasn't changed and if I go back to before i tried adding shader stuff it works fine. so my best guess is i setup the shader code poorly and it is causing some sort of memory corruption? honestly i have no idea what's going on and could use some help.
need help with wierd crash
1 like β€’ Oct '24
@Joshua Watt I think i kind of get it, the only thing I don't get is that code has been that way for a long time why only now is it causing a crash?
1 like β€’ Oct '24
@Joshua Watt alright thanks for the help, this pointer and memory stuff is really easy to mess up, before this I only used C# with the unity game engine so it's all new to me.
Optimizing serialization
so a problem Iv been running into is how to make an optimized serializer for my floor thing. the main problem is the higher I put the limits for everything the more space each floor takes even if its not being used. like if the enemy per floor limit is 1000 but there's currently only 1 enemy on the floor it takes the same amount of space in memory as if 1000/1000 enemy slots were active as the size has to be reserved for them ahead of time or else there's out of memory error. I found a fix that makes it so that even if the max floors is 1000 that if you have only generated like 3 floors the save file will be tiny: u64 everything_but_floors = offsetof(World, floors); u64 active_floors = world -> active_floors * sizeof(FloorData); u64 all_save_data = everything_but_floors + active_floors; so it only saves the first X floor slots where X is the active floor amount and I think I could do something similar for the enemies and other stuff but it might be tough. the other problem is that if you do use all 1k floors the save file is still 1 GB or so which seems pretty large. if any serialize guru's have cooler ways to optimize stuff id be interested. Another fix I tried to do is to just load one floor at a time as was suggested to me before in a previous q&a, I feel like if I could figure this one out it would be a huge deal. but i was running to some problems last time I tried implementing the loading one floor at a time thing because serialization is tough for me i guess, I might give it another try soon.
1 like β€’ Oct '24
@Joshua Watt Wow there is a lot here thanks for all this info. I read over it all and there's so much to unpack here so I might just reply in small parts, for now. in this part: /* Then you want some serialise function that takes your world_data_t and turns it into the smallest file reasonable (that can still be deserialised) */ /* This is a good exercise for the reader. I only know exactly how to do this because I've had to do it previously and it's a good learning experience. do you have any tips on what this would look like or good learning resource links on how to do this? I don't really know where to even start here and I haven't found any good guides on it.
1 like β€’ Oct '24
@Joshua Watt Im a little confused but that's because i only gave it a quick read il probably have to read it more carefully a couple times but for now I think im kinda getting what needs to be done. its all about figuring out what size each thing is and making sure that after it is saved when it comes time to load it, before each section it has some way to know what that section is and how big it will be so it knows when it stops and the next section starts?
improved UI and slime charge attacks
made my Ui a little better and made the slime's attacks have some weight. iv been struggling with some burnout on the project lately but im still proud of how far Iv gotten, further then I thought i would anyway.
added upgrade system
It's been a while since i posted, I took a small break and then started working on this upgrade system. It turned out to be harder then i thought and I almost drowned in spaghetti and have a lot of crashes that still need to be fixed but it mostly works.
0 likes β€’ Oct '24
@Romanas Litvinas In my game projectiles are separate from my entities. They look at the current floor's entire enemy list and check for collisions.
Window running away
not sure if its an issue with oogabooga or me but, hjelp?
2 likes β€’ Sep '24
Hey I ran into a similar issue a while back, I found a couple of solutions: use instead: window.pixel_width = 1920; window.pixel_height = 1080; window.x = 0; window.y = 0; or this can be fixed by using fullscreen: window.fullscreen = true; window.force_topmost = false; "window.force_topmost" makes it easier to alt tab. @Charlie Malmqvist I think this doesn't happen for you because your monitor is bigger then 1920x1080
2 likes β€’ Sep '24
Actually i just noticed this didn't fix the problem my window will fly north as well if I set it up like yours. it's just that since with either of these on (I have both on right now in my game) you will never see the maximize button so it can't happen so I forgot about it.
1-10 of 21
Flynn V
4
74points to level up
@flynn-vollstedt-8337
I am a beginner programmer, before this I have done 2 game jams with the Unity Engine / C#. So C is brand new to me.

Active 357d ago
Joined Aug 10, 2024
Washington, USA