Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Logging started at Wed Jun 13 21:16:10 2018
- 21:16:10 <UberGewei> YO!
- 21:16:20 <UberGewei> Hit map variable limit lol.
- 21:16:24 <UberGewei> :(
- 21:16:53 <[SDA]Krawa> ooops
- 21:17:02 <[SDA]Krawa> does it show an error message?
- 21:17:24 <UberGewei> Not sure about ZD but DB doesn't even want to compile.
- 21:17:51 <[SDA]Krawa> so error message from compiler?
- 21:18:07 <UberGewei> Yes haven't tried for slade yet.
- 21:18:19 <UberGewei> But read somewhere that the limit is 128 map variables.
- 21:18:50 <UberGewei> And looking at the 12k lines + code I have, I guess I'm indeed close to that lol.
- 21:19:10 <[SDA]Krawa> LÖÖÖÖL
- 21:19:49 <UberGewei> https://cdn.discordapp.com/attachments/379645189968494603/456365742149992469/unknown.png
- 21:20:04 <[SDA]Krawa> YOYOOY
- 21:20:40 <[SDA]Krawa> Re: ACC: Too many map Variables
- 21:20:40 <[SDA]Krawa> Postby randi » Fri Jan 09, 2009 8:59 pm
- 21:20:40 <[SDA]Krawa> The limit is 128, actually. It used to be 32 in Hexen.
- 21:20:59 <[SDA]Krawa> Postby Graf Zahl » Sat Jan 10, 2009 1:00 pm
- 21:20:59 <[SDA]Krawa> Can't you use global arrays instead of a shitload of single variables?
- 21:21:01 <[SDA]Krawa> HAHAHA
- 21:21:05 <[SDA]Krawa> https://forum.zdoom.org/viewtopic.php?f=3&t=20412
- 21:22:16 <[SDA]Krawa> do you have tons of bool variables or something?
- 21:23:31 <UberGewei> Well Salty added a bunch with his minigames, so started to convert those. That saved me a couple.
- 21:23:40 <UberGewei> But yes, besides that I do have a lot of these:
- 21:23:41 <UberGewei> int player_wants_to_sell[MAXPLAYERS];
- 21:23:42 <UberGewei> int player_has_apartment[MAXPLAYERS];
- 21:25:28 <[SDA]Krawa> you could make all player arrays to one 2D array players[mode][MAXPLAYERS]
- 21:25:46 <[SDA]Krawa> and for mode e.g. wants_to_sell = 0 has_apartment = 1, ...
- 21:26:35 <[SDA]Krawa> e.g. #define WANTS_TO_SELL 0
- 21:29:58 <UberGewei> Hmm, do you have documentation for that?
- 21:30:20 <UberGewei> Ah wait
- 21:30:26 <UberGewei> 2 dimentional you mean
- 21:30:30 <[SDA]Krawa> yes
- 21:30:44 <[SDA]Krawa> what you now do is: https://ds055uzetaobb.cloudfront.net/image_optimizer/7bfe2713ecaf427164d14018608b826ffbeea531.jpg
- 21:30:44 <UberGewei> Could work in a few cases, yes.
- 21:31:12 <[SDA]Krawa> https://www.tutorialspoint.com/java/images/java_array.jpg
- 21:31:17 <[SDA]Krawa> better, 0-based
- 21:31:43 <[SDA]Krawa> you have "storage space" and index
- 21:32:07 <[SDA]Krawa> 2D is also possible http://www.tenouk.com/Module7_files/cplusarray008.png
- 21:32:50 <[SDA]Krawa> so you have many columns
- 21:33:23 <UberGewei> Not a bad idea actually, could do this for every specific function within zdcity.
- 21:33:45 <UberGewei> e.g Apartments have 2d index, but also pets, cars etc.
- 21:33:46 <[SDA]Krawa> so instead of using a new array variable, use a new column
- 21:34:00 <[SDA]Krawa> yeah
- 21:34:12 <UberGewei> Yes, that doesn't affect the memory?
- 21:34:17 <UberGewei> thought It had something to do with that.
- 21:34:28 <UberGewei> You know, the maximum memory it can use or something.
- 21:34:32 <[SDA]Krawa> memory is the same as making a new array
- 21:34:57 <[SDA]Krawa> so for array players[mode][MAXPLAYERS]:
- 21:35:33 <UberGewei> That's what I wonder. e.g a new array vs 2D indexes does it even matter? Isn't it just the max cap of the memory ACS can use?
- 21:35:39 <[SDA]Krawa> #define WANTS_TO_SELL 0 HAS_APPARTMENT 1 PET 2 CAR 3, ...
- 21:35:52 <[SDA]Krawa> so MAX for column mode will be 4
- 21:36:49 <[SDA]Krawa> in ZDoom forum they talk about variable limit reached
- 21:37:00 <[SDA]Krawa> they have no problem with memory limit
- 21:37:43 <[SDA]Krawa> how many MAXPLAYERS array do you have?
- 21:37:49 <[SDA]Krawa> 10? 100?`
- 21:38:07 <[SDA]Krawa> MAXPLAYERS is 100?
- 21:42:46 <UberGewei> <[SDA]Krawa> MAXPLAYERS is 100? <-- Yes, 100.
- 21:42:51 <[SDA]Krawa> https://pastebin.com/EZ41snsj
- 21:43:11 <[SDA]Krawa> 2000 colums compiles :)
- 21:43:54 <[SDA]Krawa> and runs in ZD
- 21:44:07 <UberGewei> never experimented with it in ZD, thanks for the example Krawa.
- 21:44:18 <[SDA]Krawa> np :)
- 21:44:19 <UberGewei> Think this is really gonna help me push the project out. :)
- 21:44:57 <[SDA]Krawa> so if you have e.g. 20 modes it saves 19 variables
- 21:45:07 <[SDA]Krawa> modes/settings
- 21:45:14 <[SDA]Krawa> columns :)
- 21:48:07 <[SDA]Krawa> http://85.214.149.120/temp/Coop-20180613-214704.png
- 22:09:51 <- UberGewei has quit IRC ["Quitting"]
- Logging stopped at Wed Jun 13 23:00:39 2018
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement