Advertisement
Guest User

Untitled

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