Jump to content
Sign in to follow this  
mobius

bug in editor?

Recommended Posts

when I wire a on/off switch to a force floor or a flame jet instead of turning off then on then off again like I'm pretty sure it's supposed to [there are wired force floors in at least one CC2 level I remember, and I don't remember this happening though I do remember something odd about that level...]

 

what happens is [for example on the flame jet] it turns on, then on the next press nothing happens, though the wire changes color, then on the third press it turns off, next press nothing again but wire still changes color, etc. Why is this happening?

Same thing happened with force floors, they turn direction only after TWO presses.

Share this post


Link to post
Share on other sites

The flame jets and force floors change state when a wire they're connected to is powered (and do nothing when it becomes unpowered), this way you can hook them up to a button and you don't have to hold it down.

Other things like the pink toggle walls will change state when powered and when unpowered (I think). Also orange buttons change the flame jets but they change back when you step off.

 

If you wire up a pink button instead of a switch, then they will toggle each time you press it

  • Upvote 1

Share this post


Link to post
Share on other sites

oh, that makes sense. thanks.

I kind of thought this remembering how that level in CC2 worked.

Share this post


Link to post
Share on other sites

Maybe I can ask a question here too? I don't get how you place wire on top of wall blocks. Seems like I'm missing something elementary here.

Share this post


Link to post
Share on other sites

Same as on floor blocks, but only works on metal walls. Just drag the spool of wire from one square to the next.

Share this post


Link to post
Share on other sites

I thought I'd ask another question here: Has anyone else had problems with recording replays where the recorded player acts as if the dimensions of the level is smaller than they really are? In my playthrough I walk 10 paces, but in the replay the character walks 7, and after that performing the rest of it's actions like it had reached it's destination. It happens every time I record the replay for the level.

 

What separates this level from the other ones I've done so far and been able to record replays for is that it's pretty wide; I think it stretches to 85 tiles horizontally and about 13 tiles vertically. But I'm not sure if that is the problem. The problem in my case occurs during a long walk on a force floor track, which again, may not be the source.

Share this post


Link to post
Share on other sites

I encountered similar problems. After I did some testing, I came to the conclusion, that after pressing a key for more than 4.2 seconds, the replay does not preserve the information of the key being active any more.

 

Here is a simple program, to reproduce the behavior, instead of going right 25 tiles as the character should, it just moves 21 tiles in the replay. To avoid this, you have to release the key, and press it again, as in the loop, where the replay shows the correct amount of movement to the left: :)

local ffi    = require "ffi"
local socket = require "socket"

ffi.cdef [[ 
  void keybd_event(unsigned char, unsigned char, unsigned long, unsigned long); ]]

local s = socket.sleep
local a = {r=39,l=37,u=38,d=40}
function p(x)
  ffi.C.keybd_event(x,1,0,0) end
function r(x)
  ffi.C.keybd_event(x,1,2,0) end

s(4) 

p(a["r"])
s(5)
r(a["r"])
s(0.1)

for i=1,25 do
  p(a["l"])
  s(0.1)
  r(a["l"])
  s(0.1) end

Share this post


Link to post
Share on other sites

That's odd. 4.2 seconds is the maximum time length for a single entry in the replay data, but the replay format comes with a continuation marker in order to support longer time periods. And many replays included in the CC1 levels use it (BEWARE OF BUG, for an obvious example). It ought to work.

Share this post


Link to post
Share on other sites

 

I encountered similar problems. After I did some testing, I came to the conclusion, that after pressing a key for more than 4.2 seconds, the replay does not preserve the information of the key being active any more.

 

Here is a simple program, to reproduce the behavior, instead of going right 25 tiles as the character should, it just moves 21 tiles in the replay. To avoid this, you have to release the key, and press it again, as in the loop, where the replay shows the correct amount of movement to the left: :)

local ffi    = require "ffi"
local socket = require "socket"

ffi.cdef [[ 
  void keybd_event(unsigned char, unsigned char, unsigned long, unsigned long); ]]

local s = socket.sleep
local a = {r=39,l=37,u=38,d=40}
function p(x)
  ffi.C.keybd_event(x,1,0,0) end
function r(x)
  ffi.C.keybd_event(x,1,2,0) end

s(4) 

p(a["r"])
s(5)
r(a["r"])
s(0.1)

for i=1,25 do
  p(a["l"])
  s(0.1)
  r(a["l"])
  s(0.1) end

 

Thanks for the heads-up and thorough explanation :)

 

It ought to work.

 

As another programmer, I can't count how many times I've told myself this :D. I'm running the debug build, maybe it's fixed in the public build (Y).

Share this post


Link to post
Share on other sites

As another programmer, I can't count how many times I've told myself this :D.

 

Indeed! In this case "it ought to work" really means "someone ought to have noticed this".

Share this post


Link to post
Share on other sites

I know how to draw wires, but how do you make them jump from one tile to another without interrupting the circuit?

 

You can either use steel walls or wire tunnels :)

  • Upvote 1

Share this post


Link to post
Share on other sites

Remember that wire tunnels can be nested, so if you put two east tunnels in a row, then a west tunnel, it will only connect to the second east tunnel.

 

So far I've found that while tunnels seem cleaner, they are more confusing to figure out.

 

If you have a lot of connections, make all your walls metal.

Share this post


Link to post
Share on other sites

To be honest I can't believe no one pointed out this bug in the editor. It seems super obvious.

 

NeJmJM7.png

 

I'll revoke my CCZone membership license now.

  • Upvote 5

Share this post


Link to post
Share on other sites

To be honest I can't believe no one pointed out this bug in the editor. It seems super obvious.

 

NeJmJM7.png

 

I'll revoke my CCZone membership license now.

(clap)

  • Upvote 1

Share this post


Link to post
Share on other sites

You can either use steel walls or wire tunnels :)

I was searching for those wire tunnels.  I didn't realize that they were their own tile in the editor :facepalm: Thanks.

 

Remember that wire tunnels can be nested, so if you put two east tunnels in a row, then a west tunnel, it will only connect to the second east tunnel.

 

So far I've found that while tunnels seem cleaner, they are more confusing to figure out.

 

If you have a lot of connections, make all your walls metal.

Unfortunately in the level I am currently designing that could not work because it has horizontal and vertical wire crossing each other.  I will try to limit the use of tunnels to when it is required, however.

 

To be honest I can't believe no one pointed out this bug in the editor. It seems super obvious.

 

NeJmJM7.png

 

I'll revoke my CCZone membership license now.

That's not a bug, that's an ant!

Share this post


Link to post
Share on other sites

Unfortunately in the level I am currently designing that could not work because it has horizontal and vertical wire crossing each other.  I will try to limit the use of tunnels to when it is required, however.

 

If I'm understanding you correctly, this is not a problem because horizontal and vertical wires crossing are not connected to each other. It impossible to have a "four-way" wire connection.

Share this post


Link to post
Share on other sites

If I'm understanding you correctly, this is not a problem because horizontal and vertical wires crossing are not connected to each other. It impossible to have a "four-way" wire connection.

This is the part of the level that was problematic:

jL2BzUh.png?1

I wanted the swich to work with the horizontal wire and not the vertical one, and to prevent the wires on the right from connecting with the vertical wire.

Share this post


Link to post
Share on other sites

This is the part of the level that was problematic:

jL2BzUh.png?1

I wanted the swich to work with the horizontal wire and not the vertical one, and to prevent the wires on the right from connecting with the vertical wire.

 

The switch needs the wire tunnels, but the horizontal wire tunnels shouldn't be necessary.

 

It's impossible to have a "four-way" wire connection.

It's possible; you just have to do this:

 

wtjapNK.png

 

(blocking off the teleport is optional but recommended)

  • Upvote 3

Share this post


Link to post
Share on other sites

 

The switch needs the wire tunnels, but the horizontal wire tunnels shouldn't be necessary.

 

 

It's possible; you just have to do this:

 

wtjapNK.png

 

(blocking off the teleport is optional but recommended)

 

wait, so for some reason wires going through a teleport like this connects them in a different way? I thought wires couldn't pass through thin walls.

 

----

 

on a different note: this is a possible bug in the game, not editor but; I'm sure most have noticed that if a block cloning machine is blocked in the direction it's facing, a block will still clone and come out in the opposite direction; even one way blocks facing the wrong way.

 

I know that they've been updating the game a little bit [i've noticed it change in a few minor ways over the past months], anyone know if they plan to address any bugs like this and other things in the future?

Share this post


Link to post
Share on other sites

wait, so for some reason wires going through a teleport like this connects them in a different way? I thought wires couldn't pass through thin walls.

 

----

 

on a different note: this is a possible bug in the game, not editor but; I'm sure most have noticed that if a block cloning machine is blocked in the direction it's facing, a block will still clone and come out in the opposite direction; even one way blocks facing the wrong way.

 

I know that they've been updating the game a little bit [i've noticed it change in a few minor ways over the past months], anyone know if they plan to address any bugs like this and other things in the future?

 

Wires can pass through thin walls.

 

And the block cloning behavior isn't a bug. If a clone machine is connected by wire (not by red button) and its initial cloning direction gets blocked, it will start cloning in another direction. This feature gets used in CC2 #192 (Boiler Room), as well as in some custom levels.

Share this post


Link to post
Share on other sites

green teleporters seem to be not always so random.

 

I've lined up green teleports so that monsters clone into one [always in one direction] and come out 5 or 6 others [forced in the same direction] but sometimes, it seems like they always come out of the same one over and over.

Often what's happened is; on the first test; the same teleport keeps activating. If I delete that teleporter then it appears to be "fixed" at least momentarily, because on the next test the other remaining teleports will be selected; seemingly randomly. But this problem kept happening a lot while testing a level I was working on. I can upload a picture if my description isn't very good.

Share this post


Link to post
Share on other sites

Green teleports, like walkers, are pseudo-random (so the same number is used every time). If you look at the lesson level where they're introduced, you'll notice that Chip gets sent to the left about 7 of the first 8 teleports. I think they actually use the same random numbers as the walkers, so when walkers bounce/green teleports are used should affect the random results.

Share this post


Link to post
Share on other sites

thanks for the info.

Here's something else I'm sure people noticed; if you have a lot of wires/logic gates present in a level; if they're on screen in the editor there is considerable lag when drawing or selecting, but only when the wires are visible.

Share this post


Link to post
Share on other sites

this is a bug in the game not the editor but;

 

I'm sure someone's noticed already; if a trap is triggered by wire, by a "pulse" [sometimes] if something is in the trap it will not be released or move forward.

 

In case anyone doesn't know; a pulse refers to a when a wire is triggered by something moving over a button continuously; that is the monster or chip doesn't stop on the button so the time the wire is triggered is very short, or when a east-west counter reaches 0.

Share this post


Link to post
Share on other sites

I've noticed that too, except the version of the bug i came across involved a trap button instead of wires. Never got around to adding it to the public bug list, though.

Edited by random 8

Share this post


Link to post
Share on other sites

thanks for posting that link again. I had lost it.

 

EDIT:  I may have discovered a related glitch: it seems that this may not only effect traps but also logic gates; as in a "pulse" had no effect on a counter gate when it should've. I have not verified this however.

I can say that the effect is either non-existent or not as bad on pink or green toggle doors. I haven't had it happen in that instance.

It also seems like this bug only happens under certain circumstances, because in some tests the trap worked every time.

 

EDIT: I just confirmed this does happen. A pulse is sent through a sytem of wires and gates, and ultimately reaches a counter gate [east-west] it should go up one increment but does not. While holding down the button for at least a second it works as intended.

Share this post


Link to post
Share on other sites
In the instance i came across with the trap button, it only happened if i pressed it coming from a certain direction.

 

I'm curious what your setup is. Can you share an image or c2m file of it?

Share this post


Link to post
Share on other sites

I can confirm it also happens with brown buttons. I forgot about it until you mentioned it but I did see this also. I don't know about a direction.

My setup [which I mention above.] if pretty big. Basically; either me or an enemy pressing a pink button by walking continuously over it is not correctly triggering wires correctly. Interestingly; the problem may be happening somewhere in the tangle of wires because I could visually see the wire turning quickly near the button but the counter gate is not responding; either the gate is effected directly or somewhere the wires are losing it [or another gate].

this picture probably isn't real good but I don't want to reveal this whole level because it would spoil it [i plan to upload my levelpack sometime soon].
Basically the wire in question will pass through 6-8 logic gates [including counters] before reaching the counter at the end. [btw, it has nothing to do with those incomplete wires, I just drew them up quick because the real pink button and other gates are off screen, the image would be too big.

http://cczone.invisionzone.com/uploads/gallery/category_3/gallery_127_3_2155.png

 

the funny thing is; I haven't yet experienced it with anything else; like doors. For example on another level when I first discovered this on the trap I had a fireball go through a straight line of traps but when it didn't work I switched to a series of force floors and pink toggle doors to achieve the same result; and then it worked just fine. There was no glitch with the toggle doors [still from pulses].

Share this post


Link to post
Share on other sites

There is a one-tick delay between the input and output of any logic gate. Any moving monster, player, or bowling ball crossing a pink button will trigger a pulse lasting exactly one tick; however, if you are the player and you stop for any amount of time on the button you'll end up with a longer pulse. That effect has broken a few of my contraptions, but there are workarounds.

 

JV9MwSP.png
This contraption in particular I recommend for any complex circuits. It turns any length button press into a one-tick pulse, and thus ensures no difference between a player and a monster. Hope it helps! Looking forward to seeing your set.

 

(incidentally, for all the bugs in CC2 I have yet to find any behaviors related to wires and logic gates that doesn't have a good explanation)

Share this post


Link to post
Share on other sites

Awesome; that's a very useful little set-up. Thanks for all the logic gate tips. (Y)

Reguarding this glitch; not sure if you understand, but what seems to be happening is either; no tick or nothing at all is being registered by a button press OR the objects [in this case traps and logic gates] are not receiving or properly registering the ticks. [...OR anything else really cause I'm no expert on this by any means :P ]

I didn't get to do any testing yet however. But I was able to fix my own level, but it was by setting up a system where balls press two on/off switches so that the wires get turned on for much longer than a pulse.
 

EDIT: I was testing out your contraption and thought I'd upload this here; this demonstrates what I'm talking about;

 

http://cczone.invisionzone.com/index.php?/files/file/522-trap-non-release-bug/

 

you can easily replace the trap with anything, like a toggle door. Toggle doors seem to work just fine even if, I might add; graphically; it sometimes looks as if the door does not change at all; the ship is let through.

Presently with the trap; the trap appears to open for a split second but the ship remains in place.

 

I just noticed that what happens graphically is rather odd too; if the button is pressed by walking into it from left or right the trap appears to open, but if I walk onto it from below it does not. This doesn't seem to effect the ship however, like random8 observed. This result isn't very regular however...

Share this post


Link to post
Share on other sites

I can't follow your link, it says I don't have permission for that. However, I think I know what the issue is.

Monsters/Players/Blocks/Bowling Balls only try to move every 3rd tick. So if the trap opens due to a one-tick pulse, the trapped monster will only move if the tick is on a multiple of 3.


daj2sJV.png

 

So in this setup, assume the button gets pressed on tick Z (Z will always be a multiple of 3 due to the player movement logic).
The AND gate fires on tick Z+1, opening trap 1, but ball 1 stays put because Z+1 is not a movement tick (not divisible by 3).

The first OR gate fires on tick Z+2, opening trap 2, but ball 2 stays put because Z+2 is not a movement tick.

The second OR gate fires on tick Z+3, opening trap 3, and ball 3 exits the trap because Z+3 is a movement tick.

Hope this helps.


 

Share this post


Link to post
Share on other sites

exactly what i was talking about, the trap opens on tick 3n+1 (where n is any integer depending on when you press the button), which is not divisible by 3, so the monster does not move. One fix is to add 2 OR gates in series so that the trap opens on tick 3n+3, which is a movement tick, as shown:

5oefQ1Z.png

I'll confess I'm surprised that your original setup works when wired to a toggle door. I'm wondering if monsters on force floors try to move every tick instead of every 3rd tick.

Share this post


Link to post
Share on other sites

I'm wondering if monsters on force floors try to move every tick instead of every 3rd tick.

That seems to be the case. Try the example you show in this post (3 posts up from here) but with force floors->toggle walls instead of traps.

 

Now that i think about it, that could potentially explain some of the force floor bugs.

Share this post


Link to post
Share on other sites

Confirmed. Objects stuck on force floors or ice try to move every tick. I think this is the only exception to the normal movement rule of every 3rd tick.

 

Here is an example for further study. The two toggle doors are only open on ticks (3n+1) where n is any integer, and are thus closed on every normal movement tick. The only way to collect the bonuses is to enter from the force floor (top bonus) or to create an ice tile and trap yourself between the pop up wall and the bonus (bottom).

s6qREHs.png

Share this post


Link to post
Share on other sites

This entry is in the public bug list:

 

"Force Floor “forced ride”: Jeffrey Bardon/June 16th

If Chip or Melinda starts the level on a force floor, no overrides are possible until they stop sliding.

random 8/June 17th

Same thing happens if you drop suction boots on a force floor."

 

But I recently noticed that this can happen for no apparent reason while sliding. I just made a 10x10 level filled with random force floors and for reasons I haven't figured out yet, at random times while playing [it usually doesn't take very long] I lose the ability to override and become stuck in the 2x2 circling pattern.

I don't start on a force floor and I don't have boots.

 

Originally I had teleporters and other things in the level but I eliminated all that and it seems to happen regardless.

  • Upvote 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...