AllanR's Recent Forum Activity

  • mec

    well, there were quite a few problems in there. It was actually saving the data, but it was never reading it and even if it did, the defaults were getting reset after every level. There was a lot happening every tick that didn't need to be running. I found the code very difficult to follow, so I structured it in a way that makes sense to me!

    It works well now... I put in comments to try to explain what I was doing. I didn't add any error checking (because there isn't much you can do) but it does adapt itself if the number or levels increases - you will need that because it did save on your system thinking there were 4 levels and now it thinks there are 12.

    http://www.rieperts.com/games/forum/localsavefix.capx

  • Sargas

    Well, my answer is still the same as the last time, although this time I made an example rather that just saying "use a camera sprite with Scroll-To behavior and scale the movement the way you want".

    http://www.rieperts.com/games/forum/Starcraft_map.capx

    I found a bug in C2 (and will file a bug report) - if you press and hold the middle mouse button, but release it out side your game window, C2 still thinks the mouse button is down. (EDIT: it only happens in FireFox, so it is not a C2 bug - it probably is a FireFox bug.)

    C2 can not prevent the mouse from leaving the game window (unless you go full screen). So, the drag camera function can not completely duplicate the way Starcraft does it... I remember reading a thread a few months ago about some proposal for future browser/HTML5 updates to allow that functionality but couldn't find it just now...

    as a bonus, I included a 9-patch selection box that I did recently to help someone distinguish between clicks and dragging to select units. I also made a clickable mini map, and added zoom on the main map.

  • Smileh

    Rayman uses a completely custom, in house engine - there are some awesome videos on youtube about how they make levels. They don't use tiles in the way C2 does. But they do build levels out of lots of small pieces, because every developer has to worry about memory use and GPU performance.

    I don't think you have to worry about using sprites for ground - as long as you use as few as possible, and make sure you don't have poor corners that will trip up your player. The only other option is to use custom movement, but that just creates a different set of problems.

  • Well, your player has to stand on something - unless you use custom movement and develop your own rules. You also have to build your scenery somehow. (And your game will be more memory efficient if you use small, reusable objects or tiles - that's what Rayman does.) But if you want to keep solid ground separate from the artwork, then use invisible solid sprites. one sprite can be stretched to provide "ground" across the entire layout. You can angle them to create slopes, add a couple more to make platforms... a few sprites can go a long way.

  • haven't tried it, but in HTML you would add the prefix ../

    so, from your Test folder you would ask for "../a.php"

    Edit: just looked at an old project where I used ajax to call php files, and I was just specifying the whole url. So I would expect that "http://www.bbb.com/a.php" would work. (The file I was calling was up twp levels, then down another directory.)

  • Rushty

    I looked at your example, added a jump-thru ramp and it does exactly what you want.

    The ramp shouldn't have the solid behavior and probably needs to be on an angle (possible reasons why it didn't initially work for you).

    http://www.rieperts.com/games/forum/jumpthru.capx

  • agaman - Does sound like you have an infinite loop there...

    You don't really need the while loop. An Event sheet automatically loops already. At the start of layout, just show the first dialog. Then have an event for when the player clicks the next button to increment the global variable and display the next dialog.

    Kyatric just did a tutorial on making a dialog system last month: https://www.scirra.com/forum/viewtopic.php?f=147&t=150482&p=954835&hilit=dialog+tutorial#p954835

    so you might want to check that out.

  • SwatHound

    there is a Pick Highest/lowest option under Instance Variables for an object...

    so, Sprite > Pick highest/lowest > choose highest and HP

    Another way would be

    System > For Each (ordered) > Sprite > Sprite.HP Descending then stop the loop after the first one...

    but you would only do it that way if you were looking for a value that wasn't an instance variable, like the Sprite with the highest Opacity, or Angle or some other attribute.

  • Rushty

    Well, I started to suggest a couple complicated ways to do it, and decided I better test it out first. I started a new platform template project, and very quickly discovered that the Jump-Thru behavior does exactly what you want (and that my suggestions were terrible).

  • Waltuo

    I would create a family for stuff that can go on the scale (boxes and player) and add an instance variable called something like ExcludeFromScale (and possibly one called Weight if you wanted different size boxes or other items and need a specific weight to lower the platform). Anything overlapping the Prevent box would get flagged as ExcludeFromScale, and anything resting on top of an excluded object would then also get marked as excluded.

    So, to test objects overlapping the allow area (and not already excluded by overlapping the prevent area), I would do a For Each (oredered) scalefamily order by scalefamily.Y descending (that would start at the bottom and work to the top) and test to see if the object they are on is excluded.

  • It certainly can be done without physics. I would probably use a "detector" sprite - an invisible sprite above (and pinned) to the scale platform. When enough boxes and/or the player are colliding with it, then lower it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To make things look like they are fading away, you usually make the mask with a gradient instead of a solid rectangle.

    I don't understand what you mean by only showing a small part of the layer... (There is almost always a way to do anything - usually comes down to how difficult it is and how it performs).

    These types of effects are generally well supported on mobile these days. The only requirement is that they need WebGL

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies