ForgedByHand's Forum Posts

  • Posting a capx 'may' get you a swift response. There's lots of reasons as to why the game isn't performing well on a mobile chipset. Updating text objects every tick for example will kill you're frame rate, as will using too many physics objects, or particle effects.

  • Yeah works perfectly, I just created a couple of local variables as idx and idy to store the array key values and then:

    -- For each XY element

    ----Set idx to array.CurX

    ----Set idy to array.CurY

    -- array,Set value at (idx,idy) to replace(array.At(idx,idy), "SHORTCODE", newline&newline))

    Not done the family thing yet but will do when the need arises. Again, many thanks for your help.

  • Hmm thats a good idea. I'll test it now and let you know if it works. Many thanks for the tip.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm using aspx to populate array's with JSON text strings.

    However some of the strings require formatting once they've been entered. Just simple stuff like carriage returns etc, I'm aware that when I'm manually setting text I can use the &newline function but this obviously only works within Construct2 itself.

    Are there any compatible shortcodes I can enter into my DB text fields that will produce a newline in Construct2 itself?

    Failing that, does anyone know of a plugin that would add the functionality? If not I'll have a bash at writing my own when I get time.

  • Showing my age a bit here, but when I was a nipper I was obsessed by the old adventure games by gargoyle software and was wondering if it would be relatively simple to reproduce a similar game in C2.

    Heres the type of thing I'm thinking about:

    As you can see the maps scroll left and right around the central character and the player can also rotate the view around the compass points. Theres no scaling or psuedo 3d involved.

    I expect the maps would need to be defined in at least one external file, I've done some scouting on the net and even disassembled the old Spectrum game but couldn't make head nor tail of 8 bit machine code.

    Someone else had a similar idea a few years back, heres his (brief) synopsis on how it's done:

    [quote:2su3army] Each map is self contained and holds all of the roads, walls and furniture. The roads are basically vectors that either run north to south or east to west, so if the camera is looking north only east-west roads are displayed. I'm going to create a unit of measurement for the map called a 'step', a step being taken by the people on screen. A road is made up of a length of steps which when translated to the screen are steps times a number of pixels.

    Now imagine a point on the map (pos_step_x & pos_step_y) with the camera pointing north; all east-west roads are scanned to see which one the point stands on. When found that road is then drawn onto the screen. If the camera is rotated then all north-south roads are scanned. If no road is found for a given view, a special sideways view of a street is drawn.

    When we are drawing a road on the screen, as well as drawing the wall it will create the road edges showing where other roads intersect. So if when viewing the east-west road, the code will check all north-south roads to see which ones intersect, if any do the road edge is drawn in such a way to show a junction.

    I had a look through Kyatric's epic list of FAQ's but couldn't find anything pertinent, has anyone got any solid ideas on how I could progress?

  • Nah, its dead easy.

    create a variable called t and one called duration, set duration to the number of seconds you want the transition to take

    • on every tick

    -- set t to min(t+dt/duration, 1)

    Then

    in your on collision event.

    -- lerp(canvas_size_start, canvas_size_zoomed, t^2)

    That should get you started, you may need to reset t to zero after the transition has taken place.

  • However you may have the same issue as me, which is that on entering the vehicle the exit conditions are immediately filled and the player 'exits' again.

    Sorry to bomb your thread btw, but as we're trying to do the same thing it seemed extraneous to create another.

    Anyway this is one example of how I was trying to do it, If I disable the exit portion of the script then the guy 'enters' the vehicle and I can control it. I've got no idea how to handle exiting the vehicle though!

  • I think you should be checking for overlaps not collisions

  • Brilliant! The file attached works perfectly, thanks very much for your help.

  • Here ya go. As you can see, on first load the panel animates smoothly, but when you click the red bar, it pops in and out.

  • Be happy to, just getting a bite to eat, will sort it out later tonight. TVM.

  • Hmm, I'm misunderstanding a fundamental construct 2 concept here. I'd like to accomplish this without the use of Timers or 3rd party plugins, moving an object across a single axis is pretty basic stuff and I should be able to do it fairly easily within Construct itself.

    I've edited my code so that the code has been taken out of the function and replaced 'every tick' with 'every 0.02' seconds. Same behaviour, the initial load works perfectly, and the object slides onto the screen, but the touch based movements don't work, all I'm doing is setting a trigger variable by touch. So why is it only triggering the move Y event once and not every 0.2 secs until the Y pos condition is met?

  • Didnt help, just jumps between the start and endY values.

  • Hah! Just found this, will see if it helps me.

  • I may be insane, but I'm using Construct to build a productivity app, part of the app contains a calendar which queries a database, I have that working correctly - and pretty jazzy it is too! What I also want is a key that slides in from the bottom of the screen, clicking on a hide button - hides the key.

    I have the movement working partially, the show_key works perfectly, but when I want to hide the object it only moves a small way and then stops. It's like its fallen out of a loop somehow.

    Weirdness ensues because I use exactly the same code structure for each function.

    I don't have a capx, but have attached a shot of the associated events. What have I done wrong guys?