deadeye's Forum Posts

  • Okay, I PM'd him.

    Edit:

    Ah, you sneaky son of a...

  • Well.. I don't really mind that he calls Construct buggy, he did encounter an annoying bug.

    Saying it's buggy is one thing, but the whole tone of his thread is "Sorry my game is so bad, it's Construct's fault for being a 'total piece.'" It's hardly fair to blame Construct, especially when most of his issues are either just design flaws or known bugs that have easy workarounds.

    Ah, well. I did have a rather wordy reply to his latest post on there but I decided to just drop it. I'll let Construct speak for itself when it comes out.

    Aeal5566: Sure, man... go for it. I'd like to see what you can cook up. If I post some code it's free for use. Just not my graphics

  • I just played the third Construct entry in competition. Afterlife Consequences.

    It's pretty bad. Even the creators admit that it's pretty bad. The person in charge of making the game apparently decided to start using Construct at the beginning of the competition, so he had no idea what he was doing. The results definitely reflect this fact.

    What makes me a little sad is how he's constantly bagging on Construct the whole time, like it's Construct's fault he's made a bad game. He also states that Construct is just an "insane wall of bugs." He only mentions a couple of bugs in the thread, only one of which he posted about here in the Help forum, which was already a known issue and he actually found a fix for it anyway (the other is the IDE crashing when editing sprites... sounds like a hardware issue to me). The rest is just design issues... he's complaining about animation and hitbox problems that aren't actually bugs and are easily remedied, and all he had to do was ask. Hell, he didn't even have to ask... there are plenty of threads that talk about hitboxes and animation already.

    Sigh. When scytos mentioned there was a third Construct entry, I had some higher hopes for it than this. Oh well.

  • I would say to remake it in Construct, but in actuality that rotating tower is probably one of the few things that would be easier to do in GM .

    Anyway, good luck with it, I hope it does get finished some day.

  • I do have a question though, may I see how you did the AI? I can't wrap my head around how to do them half as well as you have them.

    Sure, no problem.

    Each of the enemies has six parts:

    <img src="http://xs434.xs.to/xs434/08492/enemy426.png">

    1. The enemy sprite

    2. The hitbox (has platform behavior on it)

    3. A detector for walls (the black and yellow striped sprite)

    4. A detector for the floor

    5. An enemy locator (the M is for 'monster')

    6. A separate death sprite

    The first five items are all in a container together. The only thing not contained is the death sprite. This is so I can show a dead body on the screen, but still have all the unecessary parts destroyed when the enemy is killed.

    When I build my level in the Construct layout editor, I don't place enemies. Instead, there's a seventh sprite that spawns everything. It looks like this:

    <img src="http://xs434.xs.to/xs434/08492/espawn997.png">

    This is the object I copy/paste around the level where I want my enemies to be. Everything else gets a checkmark next to "Destroy on startup."

    At the beginning of the layout I spawn all the enemies:

    +System: For each enemySpawner
    [ul]
    	[li]> enemySpawner: Spawn object enemyBox on layer "actionLayer" (image point 0)[/li]
    	[li]> enemyBox: Start ignoring user input[/li]
    	[li]> mLocator: Set position to object enemyBox (image point 0)[/li]
    	[li]> enemySpawner: Destroy[/li]
    [/ul][/code:2mh8izmo]
    
    This creates all the parts needed to run the enemies, and puts the hitbox and locator where the spawning object was.  Then it destroys the spawner.
    
    The sprite and detectors get placed on top of the hitbox every cycle, so there's no need to place them here.
    
    Now for the AI:
    Each enemy has a variable called "active" that is defaulted to 0.  When the enemy is on the screen, this is set to 1.  It stays at 1 until either the enemy or the player dies, so the monster can chase you from screen to screen when it sees you.
    
    For the movement, each enemy has the following variables:  mySpeed, lastX, lastY.  This sets up the speed (capBox is the player hitbox):
    
    [code:2mh8izmo]
    +Every 125 MS
    -> enemyBox: Add 1 to 'speedTime'
      +enemyBox: Value 'active' Equal to 1
        +enemyBox: X Greater than capBox .X
        +enemyBox: Value 'mySpeed' Greater than -4
         -> enemyBox: Subtract 1 from 'mySpeed'
        +enemyBox: X Less than capBox .X
        +enemyBox: Value 'mySpeed' Less than 4
         -> enemyBox: Add 1 to 'mySpeed'[/code:2mh8izmo]
    
    The speed can go from -4 (full speed left) to 4 (full speed right).  Notice that we're not setting the speed of the platform behavior directly based on where capBox is, but rather just adding or subtracting a variable.  This is so the monster doesn't turn around immediately when you jump over the top.  If the monster changes it's X in relation to the player, it takes one full second for the monster to turn around and gain full speed (every 125 ms add 1 from -4 to +4).
    
    But we still haven't actually set the speed yet.  There's another variable called "speedMod" that randomizes to give each enemy a slightly different speed, so they don't all bunch together:
    
    [code:2mh8izmo]-> enemyBox Platform: Set speed to (enemyBox.Value('speedMod')+25)*enemyBox.Value('mySpeed')[/code:2mh8izmo]
    
    And this is how we get the speedMod:  See the 'speedTime' variable up there?  When it reaches 5 this happens:
    
    [code:2mh8izmo]+enemyBox: Value 'speedTime' Equal to 5
    -> enemyBox: Set 'speedMod' to random(27)
    -> enemyBox: Set 'speedTime' to 0[/code:2mh8izmo]
    
    Dang, that's a lot of info just for one post.  We're about halfway done.  Here's how to set the direction of the sprite:
    
    [code:2mh8izmo]+enemyBox: X Greater than enemyBox.Value('lastX')
    -> monsterSprite: Set angle to 0
    
    +enemyBox: X Less than enemyBox.Value('lastX')
    -> monsterSprite: Set angle to 180
    
    +System: Always (every tick)
    -> enemyBox: Set 'lastX' to .X
    -> enemyBox: Set 'lastY' to .Y[/code:2mh8izmo]
    
    As you might guess, 'lastY' is for setting the jumping and falling animations.  I'm sure that's pretty self explanatory.  Speaking of jumping, here's how they do it:
    
    [code:2mh8izmo]
    +enemyBox: Value 'active' Equal to 1
    +enemyBox Platform: is on ground
       +enemyWallDetector: overlaps Family Terrain
       +System: random(20) Equal to 4
          -> enemyBox Platform: Jump
    [/code:2mh8izmo]
    
    I added in the randomizer so that they don't just immediately jump when they hit the wall.  Like the change in speed and direction I wanted it to look a little more natural, like they were thinking about it or something.
    
    Resetting and killing enemies:
    When the player dies, his position is set to the last eye stone that he touched.  At the same time, there's a loop that sets each enemy to the mLocator sprite in it's container (that was set back when they spawned at Start of Layout).  Then the 'active' value for enemyBox is set to 0 again so they don't just run around the level willy-nilly.
    
    When they're killed, the blinking "hit" animation is played.  When the animation is finished (and only if the enemy is on the ground) then a dead monster sprite is spawned and the enemyBox is destroyed.  Destroying the enemyBox destroys all the other objects in the container.  And that's about it.
    
    I didn't cover animations really, so if you want to know how that's done let me know.  Though I will be putting this kind of information in my Platform School tutorial, so if you can wait until then that's cool too.
  • It runs slow for me too, but it's because of all the fancy effects . I turned them all off and it runs pretty smooth.

  • Do you mean you want to load a sprite from a file? And you want to be able to update the file without editing the sprite in Construct?

  • Ashley,

    I got some feedback from one of the the players. The sound version was crashing for him, but the no-sound version works fine. Here's his specs:

    [quote:2bdkc2ck]Ok! I'm using an HP laptop with:

    Vista Home Premium, Build 6001, 32-bit (SP1)

    Intel Core Duo T7250, ~2.0GHz

    2046MB RAM

    NVIDIA GeForce 8400M GS

    DirectX 10

    Sound card/setup seems to be Realtek Digital Output (Realtek High Definition Audio)

    It seems the crash was happening for him when the sound was being stopped (upon walking back into the house from the outside, when the front door closes). I too have had a couple crashes with the sound stopping, usually on the menu screen. When selecting the "play" option it crashes sometimes. Only rarely though, and usually if I hit the Z key right away when the menu first becomes available. At that point the volume for the ocean sound is still being adjusted.

    I think setting the volume and turning off the sound in the same tick might be what's causing this particular problem. On the screen in question I have a sprite in the center of the room. When another sprite (which follows the screen as it scrolls) overlaps the room sprite, it adjusts the background sound volume.

    <img src="http://xs434.xs.to/xs434/08492/frontroom872.png">

    The event looks like this:

    volumeController: Overlaps frontRoomVol
    

    HouseSound: Set channel 1 volume to -8 dB

    HouseSound: Set channel 2 volume to 1 dB

    HouseSound: Set channel 3 volume to 0 dB

    HouseSound: Set channel 4 volume to 0 dB

    HouseSound: Set channel 5 volume to 0 dB

    [/code:2bdkc2ck]

    When the player crosses the door boundary it turns the environmental sounds off (the wind/crickets):

    Player: Overlaps doorTriggerA
    Player: Does Not Overlaps doorTriggerB
    System: Trigger once
    

    door: Set animation to "Closed"

    doorClosed: Set collision mode to Bounding box

    HouseSound: Stop channel 1

    HouseSound: Stop channel 2

    HouseSound: Autoplay resource "doorclose.wav" (No loop)

    doorTriggerA: Destroy

    [/code:2bdkc2ck]

    So in essence it's setting the volume and turning off the sound in the same tick. I don't know if that's exactly what's causing the crash, but I can run some tests to make sure.

  • Your translated paragraph is confusing. That happens a lot with translators.

    Make smaller sentences. The translator will have an easier time translating then. Describe what you are doing in detail. One small sentence at a time.

  • That looks pretty neat

  • Nice setup, man

    Wow... other people have displays like that in your village too? I bet you can see it from space.

    There's a street in my town where everyone is required by the neighborhood organization to do this kind of thing every year. Then they charge ten bucks a head for carriage rides and give the money to some charity.

    Kind of a nice idea, but still... I wouldn't want to be told how I had to have my yard decorated

  • Also, you have no Mouse & Keyboard object in your second layout. If you check the M&K object in the first layout as "Global" then you'll be able to move your box in layout 2

    Not a bad concept for a game, by the way.

  • If you change the transition to this:

    playerbox: Is outside layout

    System: Go to layout "level1" with transition "None" lasting 0 MS

    or this:

    playerbox: Is outside layout

    System: Go to next layout with transition "None" lasting 0 MS

    then it will go to the next layout without any problems, so it seems to be an issue with the Fade transition. I've never used the Fade transition myself, I do all of my fades manually (with single-color BG Tile objects), so you might be able to do that as a work-around for now.

    Anyway, it looks like a bug, could probably use a bug report.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh hey nayon

    It's a shame you didn't finish Tower of Shoth, that game was looking really sweet. It was one of my early favorites. Anyway, welcome to the forum <img src="http://xs234.xs.to/xs234/08491/t740.gif">

  • I've been kinda wondering that too. I don't think invisible stuff does, at least you would think that it wouldn't... but then again, one of the best ways to optimize your games in MMF was to make off-screen stuff invisible. Yeah, stuff that's not even on the screen . Makes no sense at all but it actually works.

    And yeah, I know Rich just answered before I could post but dammit, I spent the time to type it out so I'm posting it