Asterix Gaming Guild Logo GeneralXXLXXL 2XXL 3XXXLOlympic GamesXXL EditorToolsOff-TopicXXL RomasteredXXL 2 RemasteredOther GamesModsCaesar's ChallengeUnfair XXLPatchesFan ArtPersonal ArtSpeedrunningMediaRandomizerBETA RomeHSKALPresence AdrienPresence SPQRPresence Mr. RubinshteinSupport Bot Helpdesk

#hskal

alatinn
I don't see the problems with pointers tbh
hesopesomeso
I hate linked lists because they are 1. super fucking annoying and 2. very slow.
schmeling65
remembering correctly each player had one cg_t-struct; each cg_t had many other structs. And that went up to a maximum of 18 players. And now have fun doing memory editing in real time for each player xD
Download Structures.cs:


alatinn
I disagree. They are super optimized to insert an element after another one in O(1)
alatinn
Which basically never happens lol
alatinn
And that's not even right tbf
hesopesomeso
Like the elb guys wrote a whole linked list compilcated mess of a code for collisions, instead you can just use 2 vectors (lists) 🤦
hesopesomeso
Yeah, sure, but sequential access is just awful
alatinn
I love that, when you're a student, you're basically learning that linked lists can be pretty useful in many cases. But just a year after, you learn about using single memory blocks :Obelul:
hesopesomeso
Good thing I skipped going to any of those :Obelul:
schmeling65
look at my c#-structs. It is right, that you can just calculated every entry and modify it that way, but finding and understanding them is a pain in the ass.
alatinn
Guess you got the first point by yourself 🙂
schmeling65
I'd make these structs and let them be there for ever and just use functions to enter specific places that I want to know
alatinn
I don't rembember how std::vectors are coded though
alatinn
I use to code in python now (I mean the part that relies on a C implementation :Pauselix: )
hesopesomeso
Simple, in essence. You take a memory block, once full, you reallocate. If you pick a nice constant, amortized constant time insertion.
hesopesomeso
Python is great
alatinn
Oh, right, I remember now
hesopesomeso
Hold on I'll take a look once I'm in front of my computer
hesopesomeso
I guess the discussion has spiralled now :Obelul: hsk let's go :KEKW: