gamedev
Maybe it did fix the lag, but only slightly. I've also rearranged some if-statements, which also seemed to help.
Regardless, if you drive slowly enough, eventually all the cars in the level will appear on-screen at once because the only start moving once they are fully onscreen and will only disappear once they are on the bottom of the screen. So you will eventually get lag. But nobody is going to play the game that way so who cares?
Unlike my previous game, enemies do have some sort of AI, as opposed to just having patterns. Naturally, there are a few state machines and lot of if-statements even for this basic AI, but that's also because of poor planning. Some could be turned into switch statements.
Also, having a mine car does increase difficulty, a little bit. So, I probably won't need that much more cars on screen.
Anyway, the game is coming along nicely and quickly regardless. Like the last game, don't expect anything ground-breaking, just something that would be fun for a couple of minutes.
@beardalaxy @matana Well, he's both British and a Sony fanboy, so that comes with the territory. Apparently, what pissed off a lot of his former fans was him bragging about letting his step-children watch Peppa Pig including the woke parts (something about teaching kids about non-binary people). I know next to nothing about that show, so I can't verify anything. He was also known for shitting on One Angry Gamer even before they made that "Traitors of America" list during the George Floyd shitshow.
@beardalaxy @matana I remember watching him along with the other Hidden Block members back in high school. Apparently, this guy has gone full woke now.
gamedev
gamedev
So, I think I fixed the lag problem, key word being "think". So, in SFML, you have two objects for sounds: sf::SoundBuffer and sf::Sound. The sound buffer just loads the sound file. And sf::Sound is an instance of said sound with a pointer to the buffer. Up until now, I have every game object holding all of the sounds they play in their own sf::Sound objects. I thought it wouldn't be a strain on the memory because the actual sound data is stored in the buffers, but now I have a singleton class to handle all the sound playing.
I've noticed that there is somewhat less lag when there is a clutter of cars, but I haven't truly verified that yet. I haven't done it on a huge cluster of cars. Anyway, this should be a good thing, because the game is piss easy right now with amount of enemies on-screen.
My #ActivityPub server #Vocata is rapidly improving and approaching the milestone of 250 commits, very much thanks to @steve who has started to systematically test it and fix bugs.
https://codeberg.org/Vocata/vocata
While not planned, I am looking forward to actually using it ;)...
@10grans beg
DiscordFS: Use Discord as your personal cloud storage. Integrated natively with Windows Explorer.
Oh god why. First Discord as forum now Discord as filesystem.@vriska Why use LibreOffice when you can just write everything in LaTeX and convert to PDF?
Atari TOS – an operating system of Atari ST, Mega ST, STE, Mega STE, TT030, Falcon computers and their https://archiveos.org/atari-tos/ #atari #dos
@rasterman If you've gone down the conspiracy theory rabbit hole like I have, you would've came with the same conclusion.
@rasterman Don't worry. I've created a new term, "stockholm syndromite" because when you really think about it, statism is just stockholm syndrome. You just love your abusive rulers, don't you?
@realcaseyrollins @diedsuddenly_ Elon Musk is a total fraud. You should look into his history if you want to learn more. His grandfather was part of the Technocracy movement (basically a precursor to the Great Reset that was proposed back in the 1930s).
https://www.corbettreport.com/interview-1778-johnny-youtuber-defends-elon-musk/