Jump to content

Photo

ZC 2.5 RC 2.5 (Windows)


  • Please log in to reply
181 replies to this topic

#166 Saffith

Saffith

    IPv7 user

  • Members

Posted 22 February 2012 - 11:24 PM

There's no chance of that in 2.50. Any significant changes to solidity handling in the current codebase would be extremely difficult; we've still got a bug or two resulting from such a simple addition as solid damage combos.

#167 tox_von

tox_von

    Zelda Addict

  • Members
  • Real Name:Redgor
  • Location:Toxicville , Simcity

Posted 22 February 2012 - 11:39 PM

couldnt you use whatever a darknut has or manually move it with code?

#168 Kite

Kite

  • Members

Posted 24 February 2012 - 12:17 AM

I don't remember if I actually reported this before, so I'm sorry if this is redundant. icon_frown.gif

This has been an issue for the longest time (2.11?), but one thing I've noticed is that the "cool entrance/exit wipes" are using a Super Mario All-Stars wipe that was probably meant to be a test of this:

http://img487.images...nsitions8uf.gif

That's an old GIF by Dark Nation that I saved for some bizarre reason (I lost the TI-83 mockup, which makes me sad). The first circle wipe in the GIF is the effect that has been with ZC up until 2.11. Is there any chance that the circle opening can be restored and maybe the other wipes (if they still exist/ever existed) could be some sort of setting?

Edited by Nick, 24 February 2012 - 12:31 AM.


#169 Saffith

Saffith

    IPv7 user

  • Members

Posted 24 February 2012 - 02:44 PM

Huh. All four are implemented, and there's a simple variable to decide which is used, but it's always been set to use the same one. icon_razz.gif
I added in separate rules for all four. Enable more than one rule, and it'll pick a wipe at random each time.

#170 Eurysilas

Eurysilas

    Paladin

  • Members

Posted 24 February 2012 - 04:43 PM

QUOTE(Saffith)
Huh, I never noticed there's no launcher on Mac before. Well, I assume you can still go to Misc -> Fullscreen for that. You can set the resolution in ag.cfg (until RC3, it's limited to 320x240, 640x480, or 800x600).


Both fail miserably. The app crashes and burns, actually. Some log or another babbles about a failure in setting the resolution.

#171 Saffith

Saffith

    IPv7 user

  • Members

Posted 24 February 2012 - 04:59 PM

Well, shoot. I'll have to as _L_ about it, then. If you can give me the exact error message, that'd probably be helpful.

#172 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 26 February 2012 - 02:13 PM

This is just pure curiosity here, but what is the limit for the size of arrays? Saffith said we could have up to 4096 arrays at once, but how big can each be? Also, we do you do not declare the size of array (for example int x[] = "Hello world"), does x default to the maximum array size?

#173 Saffith

Saffith

    IPv7 user

  • Members

Posted 26 February 2012 - 02:35 PM

They're implemented as vectors, so the limiting factor is the largest number the compiler can handle, which is 214747.
If you don't declare a size, it'll use the smallest size possible for the given initializer. I suppose it's probably possible to initialize it with more than 214747 elements, but you still couldn't access the higher indices.

#174 blue_knight

blue_knight

    Adept

  • Members

Posted 26 February 2012 - 02:44 PM

QUOTE(Saffith @ Feb 26 2012, 11:35 AM) View Post

They're implemented as vectors, so the limiting factor is the largest number the compiler can handle, which is 214747.
If you don't declare a size, it'll use the smallest size possible for the given initializer. I suppose it's probably possible to initialize it with more than 214747 elements, but you still couldn't access the higher indices.
That is awesome, thanks. I got it in my head that you could have 4096 indices total for all the arrays - I'm not sure why I interpreted it that way in hindsight icon_razz.gif - so I've been working within that "limitation." Now I don't have to worry so much about array size.

Is there any way to have a globally accessible array without it being saved when the player saves the game? I've been declaring arrays locally and passing them as arguments to functions to avoid the issue but sometimes it'd be nice to have access to a global without increasing the save file size and read/write time. Of course, if there is no way to do this don't delay RC 3 to add it - I can live with the way it is now. [ I want RC 3 to be released in case you couldn't tell icon_lol.gif ]

#175 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 26 February 2012 - 02:45 PM

I thought it was defined as 2048 or 4096.

#176 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 26 February 2012 - 02:52 PM

QUOTE(Saffith @ Feb 26 2012, 01:35 PM) View Post

If you don't declare a size, it'll use the smallest size possible for the given initializer. I suppose it's probably possible to initialize it with more than 214747 elements, but you still couldn't access the higher indices.

That doesn't appear to be the case, at least with strings.

I initialized strings like the example above assuming that the length of the array would be the length of the string, but using the string copy function in string.zh, it lagged horrendously. When I manually set the size of the array to a number... say... 15, it didn't lag. The only explanation for this would be that it used a size much greater than necessary.

#177 Saffith

Saffith

    IPv7 user

  • Members

Posted 26 February 2012 - 03:03 PM

That's odd. strcpy just copies until it reaches the terminating null, so the actual array size shouldn't make any difference at all. I'll see if I can't work out what's going on there.

#178 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 26 February 2012 - 03:12 PM

Err... also, I did fail to mention that I was also clearing out the strings as well... and it was quite a few times a frame. I also printed the string (actually, the more I think about it, maybe this is this issue?).

Basically, to describe my setup, I'm creating a menu with around 8 items. However, due to various reasons, what I needed to do was have a global array for a string. A function would go in, clear out the global string, then copy one of the strings to the global string for printing. This would happen 8 times per frame.

Again, the more I think about it, maybe the printing is what's causing the problem.

#179 Saffith

Saffith

    IPv7 user

  • Members

Posted 26 February 2012 - 03:17 PM

The same thing would be true there, though... I tried a few things, and, as far as I can see, the size is set correctly. Is it possible you had an array somewhere that was too small, and the null terminator got cut off? That would certainly cause some issues.


Oh, sorry, missed this before.
QUOTE
I thought it was defined as 2048 or 4096.

It looks that way, but it's not. The constant named MAX_ZCARRAY_SIZE is really used for the number of arrays.

Actually, I'm looking at it now, and it looks like global and local arrays are stored separately, so I think it's really 4096 of each.

#180 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 26 February 2012 - 03:35 PM

QUOTE(Saffith @ Feb 26 2012, 02:17 PM) View Post

The same thing would be true there, though... I tried a few things, and, as far as I can see, the size is set correctly. Is it possible you had an array somewhere that was too small, and the null terminator got cut off? That would certainly cause some issues.

Ah. Yeah. I went back and did a test. Apparently what I must have been doing was copying string A with no manually set size to string B with a manually set size that was too small (it was 1 under, actually). When this happens, apparently ZScript still functions, but it lags terribly for whatever reason. icon_shrug.gif

Sorry for the confusion. icon_frown.gif I wasn't paying attention to the size of the string.

Edit: Also, you're correct. I have hit issues where if the source string is exactly the same size as the array, it locks up ZC completely. Say int x[2] = "hi" for example. I'm gussing x[] = "hi" actually saves 3 characters. 'h', 'i', and a null character.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users