codah's Recent Forum Activity

  • codah I see, cool. R0J0hound thanks!

    Don't be afraid to use arrays (I'm not saying you are). Remember the added benefit, that you would then have the fruit names available to you anywhere else in your code, e.g. Fruit.At(APPLE) where APPLE is a defined constant.

  • so i set everything up as far as i knew how to, then i got a syntax error right here

    Edit: don't use that operator for multiple cases.... you can see why.

    How is that easier than "Set self.my_state to (self.my_state + 1) % 3"?

  • Looks good but lagged then froze on Chrome.

  • I had a go. Your main problem was not doing a 'pick all' in event 5. There are other improvements that could be done, but I only did a few essentials. One thing I did to make life easier was to create a container with sprite and planet_pulsar.

    [attachment=0:1mes32ct][/attachment:1mes32ct]

    [attachment=1:1mes32ct][/attachment:1mes32ct]

  • You can randomize targets easily with System: Pick Path_Car where Path_Car.path = random(1, max_path)

    For choosing a path at a crossroad, if you have 3 directions, just choose(1,2,3) or similar (say, 1 left, 2 straight, 3 right). You could store in each Path_Car, its available destination Path_Car(s).

    Also rather than check for overlapping with Path_Car once the car arrives, I'd set it when you first choose the target (suggestion).

    For performance, C2 won't render what's not onscreen, and you can't pathfind to something offscreen anyway.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's a lot in that video For 'stretching' and other tween effects, there are various ways of doing it.. Have you looked at all the tweening add-ons, the effects, and behaviours (like Sine)?

  • Ok so I'm in this category... wrote my first games 32 years ago in 16kb.. still have the passion

    Currently working on random stuff, hoping to build enough skills to put out a quality game.

    Better on the coding side than the ideas/art/marketing side.

    Talk to me people

    PS: JJEvil your game looks great.

  • R0J0hound Not sure I understand how this works, or how to recreate it in Construct 2, but looks simple and resource cheap.

    what is the global number CUR aspect? current ? or a global variable?

    I have only one function right?

    Pretty much as he spelled out.. global var is for the same reason as my currFruit var ('current'). One function as shown. Should translate straight into C2.

  • You could have a scaled down version of the level that fits into the screen behind the actual level (or is set invisible) but always stays in frame. The pathfinding behavior could work on a single pixel representing a character. Then, calculate the position of the characters according to the position of the pixel. It would be something like a mini map where you calculate the position of a symbol off of the position of the character but in reverse.

    Great minds think alike While waiting for a response, I created a minimap with pathfinding! However I created it as an actual visible minimap. Problem is the pathfinding behaviour seems to break down on such a small scale.

    My mini dudes are 3x3 (down from 17x17) and I've toyed with cell size of 1, 2, 3.. (down from 16) and with cell border also, but that's back to -1. The space to move is about 7-8 pixels. They just don't seem to go to the centre of my room sprites properly, and sometimes get stuck or whatever. I might make them 1 pixel as you suggest and see if that works.

    However.. I could still make an invisible map, as big as my window, and use that. Great idea thanks.

    And I will either scale the movement up to my full size map as you suggest, or use some scheme that when the mini guys hit a room sprite, I can use that to trigger something. We'll see.

    I'd still be interested in a simple means to "auto navigate a map of numbered rooms using the room number".

  • Perfect

  • No use array.at() and index it with a variable incremented by % so it wraps around. But for 3 choices it does seem overkill (but I'd probably still do it by personal preference).

    e.g.

    [attachment=0:3ktrwyji][/attachment:3ktrwyji]

    Edit: made slightly more concise

  • Would you use an array?

codah's avatar

codah

Member since 30 May, 2014

Twitter
codah has 1 followers

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies