Nepeo's Recent Forum Activity

  • Well you don't need marker objects, but they don't really add any notable overhead.

    If you want to just use the use the positions you can just compare the delta between the bounding box of the platform and the enemy like so.

    Enemy and Platform are both sprites in this example. Enemy has a single instance variable called direction and the platform behaviour. The platform behaviour has the default controls disabled so we can simulate the control input using events. The Platform object has the solid behaviour.

    The events visit each enemy character, and find the closest platform instance to them. Then checks the distance between the left bounding box edges, then the right bounding box edges. If it's close to the left edge we change direction to "right" if it's close to the right edge we change the direction to "left". Then finally we check the direction variable, and simulate the control for the desired direction.

  • I'm guessing you want something like this old platforming tutorial for C2? The game has enemies that move back and forth along their platform. The trick being to place invisible markers at either end of the platform, when the enemy collides with it the direction of movement it flipped. Useful technique, can be used for other AI systems as well in top down games.

  • I didn't really get what the issue was before, but I think I got it from tarek2s example. Picking is preserved across an event block, so that you can filter down from a large set of objects using multiple conditions. I believe the LOS is filtered out on the first condition if it cannot see the target instance. Hence on the following conditions you are checking 0 LOS instances against 1 target instance.

    So the solution is either check against all targets in one condition ( so families ) or use separate blocks for each target ( else if ).

  • Lumicreative.com ah yeah I was suggesting a slightly more intensive solution, which is to basically replace the bullet behaviour with raycasting. I think in your example is a little broken, with some tweaks it would probably work after a fashion. But under some circumstances it would fail, when passing near to an object the center of the ball may not pass through a box, but the ball would overlap with the box. In that situation the raycast would never report a collision, but the bullet behaviour would.

    This is your project adapted to what I meant. It works well, but it will occasionally not collide when it appears to due to being considered a particle. Using a smaller ball makes it look more convincing. There's some tricks you can do to simulate the ball as a polygon, but you end up back with the problem of flat edges vs curved.

    You can kind of do collision with other ball instances, but it causes some strange collisions because we have a single position buffer which we are read/writing to at the same time.

    I was thinking you could also solve this using signed distance fields and raymarching ( subtly different to what the LOS plugin uses ) but you would basically have to write all this logic from scratch.

  • The bullet behaviour provides a reasonable approximation for bouncing, but it's not perfect.

    If you can get away with simulating the ball as a particle ( no size ) you can do a good job by using Line of Sight to raycast the bullet path. Although I don't think this will work if your using gravity on the ball, as the path changes from a ray to curve in most situations. You can make some tweaks to this to make it behave a little more like a circle, but it's not ideal for most situations.

  • SSL is a fun hurdle, but at least you know a bit about it now!

    If you have issues with networking in future I recommend looking up how to use the Chrome Developer tools, it has an excellent networking tool for checking what requests a page is making. With contents, response, headers, errors. All that jazz.

  • Well generally I would just advise using a host that supports HTTPS, browsers quite aggressively prefer them nowadays.

    Exporting as a HTML game and putting it on a local HTTP server would work. Using something like XAMPP, MAMP or simple-http-server.

  • I had a look and there's some stuff about adding languages to a xcode project online. I think it's supposed to be used with the storyboard system, but I think it's where the app store is also pulling the data from.

  • Under most situations the slowest part will be the terrain generation logic itself. So this is the place you should optimise. Most of the tweaks you can do here will increase your complexity significantly, so you should avoid making these changes unless you have a need to optimise!

    One of the easiest tricks is to decrease the density of the terrain. If you double the size of your tiles you decrease the number of tiles you need to process by 4. A more advanced version of this is to generate your world at a reduced density, but use the same number of tiles. Using interpolation to stretch the world over the tiles.

    A more complicated trick is to break up your world generation into zones, then only generate a small number of zones at a time. With this technique your world generation takes the same amount of time, but your player can play the game while the world is generating.

    Getting good quality out of procedural generation can be tricky, but it's quite good at creating lots of content rapidly. You can make it look like your logic is better than it is by running lots of permutations yourself, and picking only the good ones to go into your game. Depending on how you go about that you could have a world creator tool which does the random world generation and allows you to edit the world to add extra details, then just load the world into your game. That way world generation doesn't need to be done during gameplay. If you want the world to appear random to the user then you can pick 16 or so worlds and put them in the game, then pick one of those at random.

    It's worth remembering that most forms of optimisation are compromises.

    • Adding more logic to make a specific case faster makes your logic more complicated, and harder to work on.
    • Reducing density might improve performance at the cost of visual quality.
    • Picking good worlds for your user reduces the level of uniqueness each player experiences, but enhances the quality.
    • Generating the world while the user is playing means they can play immediately, and can open the game up to "infinite" worlds. However, the game might cause lag if you do too much work on each frame.
  • Looking at your image it would appear your trying to post via HTTP. This won't work if the game is hosted on a HTTPS domain ( such as preview ) because browsers disallow it for security reasons. You may also have issues with CORS if your server isn't configured for it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Leaderboards only store a single numerical value per user as far as I'm aware, and it has to increment... With some bitwise abuse you could store a single 21 bit value, and save up to 4 billion times. While it's a fun abuse of the leaderboard system I really don't recommend this... For many reasons.

    You probably want something like firebase: cloud firestore. Allows you to store and query application data from iOS, Android or the web. I've heard a few people talking about it on the forums before, not sure if there's a third party plugin going around for it or not.

  • It's important to differentiate between what you mean by "crash". People tend to use it to cover a lot of things, including myself sometimes. The specific reaction you get from the SDK when the App ID is wrong is that the application will close immediately. Anything else and it's not caused by that change. So seeing a black screen, or being stuck at 85% isn't caused by that specific change.

    As dop2000 says the best course is to find a minimal example that causes the issue and post it to the bug tracker. There's no known issue with the Mobile Advert plugin on Android at the moment, so I will be keen to follow this up if you can create a nice solid reproduction for us.

Nepeo's avatar

Nepeo

Member since 8 Mar, 2016

Twitter
Nepeo has 583,792 followers

Trophy Case

  • 8-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x3
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies

Blogs