Knuckle Cracker

Knuckle Cracker => Support => Topic started by: Kingo on February 02, 2013, 01:48:09 AM

Title: A map and a question
Post by: Kingo on February 02, 2013, 01:48:09 AM
So I was working on my newest custom map (Blue Ops part 3) and I was trying to simulate a wave-like effect (using 0-intensity emitters spaced evenly around the emitters). I timed it so one emitter would fire 1 second after the first.
Well, in the game it worked as planned, except for the fact that after the first wave (it evaporates after it fires) of emitter firings, the emitters went all out of sync.
I believe this is a code-related issue. Is there any way to prevent this (or at least make it appear like it is working correctly). On the upside, this may provide some unpredictability for the map... :D
I've noticed a pattern in the cycle of which emitter fires first and which fires afterward... it goes back and forth for maybe 3 or 4 cycles, then changes to another pattern.

Another thing, for some reason my map editor is not adding the .cwm extension to my maps so they are blank documents instead of PDFs (as they appear on my computer).
And now the forum board is claiming I double-clicked something or posted tiwce when I am trying to hit save.
Jeese, technology is after me tonight.
Title: Re: A map and a question
Post by: Grauniad on February 02, 2013, 02:29:49 AM
Quote from: Kingo on February 02, 2013, 01:48:09 AM
So I was working on my newest custom map (Blue Ops part 3) and I was trying to simulate a wave-like effect (using 0-intensity emitters spaced evenly around the emitters). I timed it so one emitter would fire 1 second after the first.
Well, in the game it worked as planned, except for the fact that after the first wave (it evaporates after it fires) of emitter firings, the emitters went all out of sync.
I believe this is a code-related issue. Is there any way to prevent this (or at least make it appear like it is working correctly). On the upside, this may provide some unpredictability for the map... :D

Belief is emotional, knowledge is intellectual. Can you provide any facts that substantiate your claim that after 3 years, and after more than 5,000 custom maps you have found an undiscovered code defect?

Quote
Another thing, for some reason my map editor is not adding the .cwm extension to my maps so they are blank documents instead of PDFs (as they appear on my computer).

The map editor is fairly rudimentary and requires that you supply the file extension. You can do it after the fact if you forget to do so during the save process.

If at any time a .cwm map appears as a PDF on your computer, I'd suggest you have an issue. There is no conceivable manner in which the file can be processed in any way by the Adobe suite of products.

Edit: Corrected map type.
Title: Re: A map and a question
Post by: Ronini on February 02, 2013, 02:59:09 AM
I am sure he was talking about *.cwm files for CW1, which uses Adobe Air.
Title: Re: A map and a question
Post by: UpperKEES on February 02, 2013, 05:20:52 AM
All emitters with the same interval and start time will emit in the same frame. Within that frame the emitters are processed from the emitter you first placed on the map to the emitter you last placed on the map. This means that stacked emitters (multiple emitters on top of each other on the same square) will be processed from the bottom one to the top one.

This principle has never changed. I used it for most of my maps. See this one (http://knucklecracker.com/forums/index.php?topic=3064.0) as an example for what you're trying to do (waves by using 0-emitters).

NB: please note that everything expressed in seconds in the map editor is translated into frames in the CWM file and will never be translated back. This means 0.2 seconds is translated into 0.2 * 36 = 7.2 frames, rounded to 7 and stored like that in the CWM file, so it will fire more often than expected. Maybe nice to know the rounding is always downwards: an emitter with a frequency of 0.1 seconds is translated into 0.1 * 36 = 3.6 frames and rounded to 3! This means it is more than twice as powerful as a 0.2 frequency emitter and will cost you 2.3333 times more energy to cap it. This could also explain why your emitters get out of sync. If you work with whole or half seconds (36 or 18 frames) this shouldn't be a problem however. More of these game mechanics are explained here (http://knucklecracker.com/forums/index.php?topic=5081.msg27012#msg27012).
Title: Re: A map and a question
Post by: Grauniad on February 02, 2013, 09:54:28 AM
Quote from: Ronini on February 02, 2013, 02:59:09 AM
I am sure he was talking about *.cwm files for CW1, which uses Adobe Air.
Indeed he was and I will blame my mistake to the lateness of the hour. My answer is still correct in that he has to type the file extension and that it should not be identified as a pdt-related file.

I should point out that both CW and CW2 uses Adobe Air, still no reason to relate to a PDF.
Title: Re: A map and a question
Post by: Kingo on February 02, 2013, 02:22:32 PM
Funny, I recall that it automatically put .cwm after it...
Graun, when I phrased it, I didn't mean a code defect, just that it didn't work as it thought it would. I assumed that the emitters didn't go into sync because more code was being processed.
Funny, I made some changes and now the emitters are working...
Thanks a ton for the info uperkees!
Title: Re: A map and a question
Post by: UpperKEES on February 03, 2013, 03:43:06 PM
Quote from: Kingo on February 02, 2013, 02:22:32 PM
I assumed that the emitters didn't go into sync because more code was being processed.
Funny, I made some changes and now the emitters are working...
Thanks a ton for the info uperkees!

Good to hear! You're welcome. :)