Farmrush's Forum Posts

  • Sometimes it is extremely difficult to reorder things in the event editor by dragging them. I usually end up copying and pasting or just inserting entirely new subevents, because dragging them can really be a hassle with you have subevents or subsubevents and Construct can't decide where it wants to put what you're currently dragging (or sometimes decides that it should only go in one place and not any others). Are there any plans to improve this? It seems like the acceptable zone for placement is only a pixel thick sometimes.

  • Also "for Each Column" and "for Each Row"

    Hmm, I guess, although this is pretty easy to implement?

  • in the event editor should say:

    For Each element in [MyArray]

    Just a minor suggestion.

  • this is odd, it does seem to always make the Y1 a wall row even when you haven't told it to. When I changed it from Y1 to Y9 for example, it would make Y1 and Y9 and Y10 a row of walls. So it seems to always make 2 rows of walls when you set the Y value to something plus the first row will always be a wall.

    I think the trouble was using an OR event, I made a work around.

    http://files.getdropbox.com/u/1024727/ProcGen3.cap

    I think I used the latest version of construct

    Sorry, I don't have that installed although I agree with your conclusion because we seemed to have developed similar solutions (presumably). Although it is sloppier (I am OCD about these things grrr construct get fixed), I am back to using separate events and a variable at the end to determine if it is an edge or not. This appears to be working so far. I will continue to rebuild it and post back if more STRANGE HAPPENINGS occur. Thanks for the help.

  • maybe post your .cap file if your desperate, would make it easier to help?

    I thought I had, sorry.

    Okay, so I opened Construct (it's addicting) and started an entirely new DirectX9 game. I rewrote most of the events, although the same basic structure remains. Despite it being essentially the same so far, results are confusing.

    Here is the .cap: http://pub.gamingw.net/39880/ProcGen2.zip

    You'll notice that the Y2 row is walls as well. This isn't intended. However, strangely, disabling the event that checks if the CurrentY is equal to 1 (edge testing) causes it to render out fine. It also renders out fine if you change the CurrentY to check to see if the CurrentY is equal to 0 (??).

    I stopped here, because there's no reason to advance if I can't get this part to work.

    EDIT: Disabling the CurrentX is equal to 1 (again, edge testing) event causes the second row to render normally. Upon further experimentation I found that checking for anything else in addition to Y1 causes the double row of walls. I have no idea why, perhaps this is beyond my control.

  • 'Always' generally has no effect when added to existing events. So:

    Always

    Trigger once

    is identical to simply having

    Trigger once

    on its own.

    What does trigger once even do then?

    Also, is it normal to still have 5-7% cpu usage even when your program is idling? I looked more carefully and memory usage still increases by about 4kb every couple seconds (relatively inconsequential for now, but if someone was playing a game for hours...). Nothing is even occurring in the program!

    EDIT: I've done further testing and found that most other .caps that aren't extensive (I ran the zelda scrolling and some particle ones) only use up 0-1% CPU with, for example, particles bouncing all over the place and all sorts of calculations being done PER TICK. My program doesn't seem to be doing anything after it generates a layout (which it is still doing incorrectly), but uses 5% CPU? What??

  • [quote:rigovot5]Unless this is some hidden aspect of arrays and there needs to be at least one value or something

    Why wouldn't the beginning of the array be 0?

    You need to either fill the array, or use a different value for on/off.

    I assumed it would be null until filled. The rest of the array is null despite changes in size. Also this doesn't address the issue of that always remaining 0.

    Well.. I just changed the values to 1 and 2 and that seems to be working, however (1, 1) is still always a wall. It's like I've solved a few little problems, but really the big issue is still there and I'm unable to continue until it is resolved.

  • Ah, ha! Another peculiar find! (I am not having much luck with Construct at all)

    Here is an updated version of what I have: http://pub.gamingw.net/39880/construct.jpg

    Now, I still can't see what I've done wrong with my logic, but I've noticed something off. We can ignore the GenerateMap function, because I've disabled it at the startup for testing purposes.

    So the layout is clean and the entire array should be null save for the one tile at (3, 1) that I instruct to be turned on and set as a wall. But the output is this:

    <img src="http://pub.gamingw.net/39880/construct2.jpg">

    Where the hell is (1, 1) coming from? That should be null. Nothing is setting that value to 0. Unless this is some hidden aspect of arrays and there needs to be at least one value or something, but I doubt this because even when I turn GenerateMap back on (1, 1) is still always a wall tile no matter how many maps I generate.

    I don't understand what is going on with this program. CPU usage is seemingly high still, and I cannot see where I have erred in my logic (see previous posts for an overview of what it should be doing). Sorry if I come off as a bit angry, but I'm just getting really frustrated. I hear Construct is supposed to do all these wonderful things even in beta (maybe it can and I am just wrong somewhere), but I can't even get what I consider BASIC things to work.

  • Should be:

    Always

    Trigger once

    Could you explain that to me? Why is it setup like so?

    I've changed to functions, though. Now if I could just get help figuring out where I went wrong with my events I'd be on my way, haha.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Those events will run every tick, if you don't want them to, set a variable or use functions, so they only run once.

    Then what is the purpose of "trigger once"?

    EDIT: This seems to have helped. It reduced it to 5% and 18mb. This still seems somewhat high for a program that isn't really doing anything, but maybe that's just the nature of the beast.

  • Here is the code for my entire .cap. There are three objects: two 32x32 sprites and one array object.

    http://pub.gamingw.net/39880/procgen1.jpg

    As you can see there isn't much to it, but despite this I am getting fairly high CPU and memory usage from this.

    With all events enabled.

    29mb 13% - Linear

    31mb 19% - Point

    With the third event disabled (others enabled).

    8mb 1% - Linear

    11mb 1% - Point

    With the second event disabled (others enabled).

    13mb 3% - Linear

    13mb 4% - Point

    These numbers may not seem startling to you, but they do for me. My specs are an E8200 2.66GHz Core2Duo and an 8800GT 512mb. This problem becomes exponentially worse the more I add to it. I don't understand why it requires 30mb and 20% of the CPU when it isn't running any events. Unlimited framerate is disabled so it's not like it's rendering the screen a bajillion times a second or anything.

    As it stands this would be unusable for me. Trying to create anything beyond simple applications would quickly tax my cpu and probably blow a ram chip out of the DIMM.

    The version I am running is 98.9, so not an unstable release.

  • Ok, I'm sure there is an easy answer but it eludes me...

    I'm dynamically placing objects (like an enemy ship). However, to actually create the object I have to place it somewhere during creation time. The common thing to do (shown in tutorials) is to place it off the layout, but this doesn't help in my case because the ship travels off the layout as well. How to create a sprite and NOT put in statically on the layout during creation time??

    I have wondered this myself. It seems very peculiar that we have to actually place the object (for example a sprite) somewhere on the layout (even if off to the side) to use it.

  • what are you doing with that global variable "edge"?

    I was using it as an ELSE switch, because ELSE didn't seem to work and I was advised it wasn't functioning properly and might not work with all those ORs.

  • I don't mean to bump unnecessarily, but I still haven't figured this out and I can't move forward without it. I could rewrite it to fit into the previous example, but I'm looking to learn and I've either misunderstood a function or cannot see the error in my logic.

    Halp plox

  • Here's what I currently have:

    Code

    http://pub.gamingw.net/39880/procgen1.jpg

    Output

    http://pub.gamingw.net/39880/procgen2.jpg

    I don't get it!

    I've tried using DungeonArray.SizeX and SizeY to determine the outer edge, but that has no effect.