How do I figure out where I'm going wrong?

0 favourites
  • 8 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Hi,

    I'm new to construct and programming as a whole, having been an exclusively art person previously.

    To attempt to move away from game design informed primarily by basic behaviours, this week, I tried to make something small and slightly complex. I opted to make a small click and drag gene splicer.

    it's not as complex as it sounds, I actually managed to get one step away from the core being functionally complete in less than 24hrs (I love how enabling construct 2 is!!!) but then one last step, one final function to create, and it's breaking all the things.( I suspect its a selecting instance vs selecting all of type issue)

    I've now spent as long trying to figure out why as the rest of the development, and I just don't know what to look up in the manual, google and try.

    Could someone help me or link me to content to help me get my head around processes of debugging, especially debugging in construct 2?

    I don't want to necessarily post the project, other than maybe as a working example. I'd actually rather learn more about the process than just solve this individual case( teach a woman to fish and all that)

  • Hi,

    I'm new to construct and programming as a whole, having been an exclusively art person previously.

    To attempt to move away from game design informed primarily by basic behaviours, this week, I tried to make something small and slightly complex. I opted to make a small click and drag gene splicer.

    it's not as complex as it sounds, I actually managed to get one step away from the core being functionally complete in less than 24hrs (I love how enabling construct 2 is!!!) but then one last step, one final function to create, and it's breaking all the things.( I suspect its a selecting instance vs selecting all of type issue)

    I've now spent as long trying to figure out why as the rest of the development, and I just don't know what to look up in the manual, google and try.

    Could someone help me or link me to content to help me get my head around processes of debugging, especially debugging in construct 2?

    I don't want to necessarily post the project, other than maybe as a working example. I'd actually rather learn more about the process than just solve this individual case( teach a woman to fish and all that)

    It is really difficult to offer any constructive help, as you don't actually say what your problem actually is.

    C2 has a built in debugger and profiler, but whether that's what you actually need is just speculation.

    All browsers usually have good debugging tools also.

    It would probably be easier if you say what you are trying to accomplish, preferably with screenshots of the corresponding Events, and at least we can then get an idea what might be the issue.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the quick response. Sorry about being vague.

    A big part of of the problem is that I don't don't know how to isolate my problem, I also didn't want to be accused of asking the community to build my thing with the very first post, so I erred on the side of vague.

    My game has 2 buttons, one makes a new creature by randomly generating genes, the other makes a new creature by looking at 2 parent creatures, or at least that's the plan, right now button one works as intended and button two creates a child without it's instance variables and seems to alter the appearance of every creature already in existence.

    Creatures are containers with 2 sprites, and their genes are stored as a sheet in an array, so whenever a new creature is added to the scene, the creatures array becomes a layer deeper and the correct frame and animation(as well as instance variables) are set according to the genes.

    The two button's functions were identical until adding the solving the parental genetics, but it's the part that's the same, setting the frames and animations to correlate that seems to be breaking things.

    I have 2 suspicions about what it may be:

    in the splice function, the extra events to determine the genes are causing the system to forget which instance(new one, just been created) is picked, so it switches to all creatures when assigning animations and frames.

    or

    the data in the array is being changed instead of referenced.

    I've tried watching the array in the debugger, but the comma'd list format is impenetrable to my feeble art brain. I'd need to copy it out and compare cell by cell to know if that second one is true. Seriously considering building an array visualizer right now.

    I'm going to prettify it a bit to make it easier to read and undo junk I added to try and peer at it before posting images.

  • You can freely ask whatever you wish. If users think 'you are trying it on', they will usually let the person know

    What we all like to see is a new user make an effort before asking for help, which you obviously have.

    BTW - it sounds like you are creating a version of Spore, which is quite an undertaking for a new user.

    Maybe showing us the Events that do the picking and creating would be helpful. Obviously, a .capx would be the best option, but it's understandable if you don't wish to give your work away.

  • ok, then let me share the specifics.

    hehehe, it's not Spore, I've limited myself to 2 genetic traits, face shape and eye colour. Like I said, it's not as complex as it sounds.

    I don't mind sharing my capx. I'm very pro open development and if someone really wants the thing it took less than a day to make and two days to not fix, they can have it. <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    https://www.dropbox.com/s/vyo89fyz1ebgy ... .capx?dl=0 since I don't have attachment options yet.

    Variables are negative if they're not assigned or far too high in the case of instance variables.

    "Floofs" is basically "creatures" the array that stores the creatures is called Floofs and the container sprite Floof.

    The random generation Function works as intended, but the fusion on seems to not get to the assignation phase where it sets the instance variables, which in turn set the animation and frame.

  • the specifics of the the genetic table

    each trait is controlled by 2 pieces of Data,

    the first row (y=0) controls Face shape

    second row (y=1) controls eye colour

    third row(y=2) holds results for those two which can then be used to assign traits,

    The genes and traits need to be seperated this way so that a parent can retain a gene to pass on that isn't necessarily physically visible

    each sheet along Z holds this data for each subsequent creature, with new ones forming at the back, creature IDs( instance variables) are not zero based so you need to remember to subtract 1 to find the correct data for a creature.

  • I FIGURED IT OUT!!!

    lines 39-47 were outside of subevents, I was approaching them as subsequent events when they needed to be nestled in there. That turned out to be more straightforward than expected.

  • I FIGURED IT OUT!!!

    lines 39-47 were outside of subevents, I was approaching them as subsequent events when they needed to be nestled in there. That turned out to be more straightforward than expected.

    Only just got a chance to get back to check this and glad to hear you've already worked it out

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)