tanoshimi's Forum Posts

  • Scirra recently tweeted a link to a particle effects demo at scirra.com/labs/particlesdemo2

    The smoke trails, explosions, and water splashes (while nicely executed) are all fairly standard particle effects.

    However, what I'm curious to know is the method used to create "tidal waves" - the rippling across the surface of the water from a point of impact.

    Does anyone either know, or have some suggestions about how they would go about doing this? It seems to be a fairly simple sine curve distortion, but I wasn't sure how to apply this to an object...?

    Thanks for any advice!

  • The "Initial Visibilty" property of your tiled background is set to "Invisible"... change that and you can get rid of all the "Move to front/back of layer" events.

  • newlee - the purpose of the normal map is to encode the normals - the facing vector - for each part of the image. By rotating the normal map, you're making the section of the rock that the dynamic lighting effect considers to be facing "up" (for example) move around the image, which is obviously not correct.

    If your rock were perfectly spherical, you'd simply remove the NormalMap -> Set Angle to Stone.Angle degrees and be done - that way, the part of the rock that you want to be lit as the top will always be at the top. The problem is that your rock obviously isn't perfectly spherical and you're also trying to give it a texture, so I'm not sure if there is an easy solution....

  • When you edit the animations of your Sprite2 object (please name your objects more descriptively!), click on the icon at the very bottom of the left hand toolbar that say "Set Collision Polygon".

    Now scroll through the animation frames - notice how the collision polygon varies in each one? It's this polygon that is used to determine whether the cherry has collided with another object or not, and whether it should be stopped. Change the position of the vertices of the polygon to create a tight fit around the cherry that's consistent in every frame and try again.

  • When you say that it "doesn't work in preview mode", you mean when you click "Run" from C2 and deploy it to localhost

    If you're being prompted to download the file that sounds like the browser doesn't recognise the MIME type of whatever file is being requested - is it a simple text file or XML, or something else? What file extension does it have?

  • I just hacked together a C2 plugin that exposes access to the microphone based on the approach used at webaudiodemos.appspot.com/input/index.html

    It works, but it's currently completely unusable in a production environment:

    For starters, it only works in the dev build of Google Canary and, even then, you first have to manually configure the Web Audio Input setting via chrome://flags/ (you also have to manually accept access to the microphone when prompted when the page loads). And, because it's running in Canary, it crashes every 30 secs or so.

    So, technically possible? Yes. Usable? No.

    I'd wait a year or so and see what the adoption of getUserMedia is like then.

  • Pathfinding is a strategic operation - it certainly shouldn't be recalculated on every step of an update loop, and preferably much, much less than that. Nor should it necessarily be calculated for every instance in the game. Some alternatives:

    • Are your zombies moving as a group? If so, just calculate a single path for the "leader" zombie, and make the other zombies follow the leader.
    • Make each zombie lay a (invisible) breadcrumb trail. When any zombie finds whatever target it is they were looking for, tell the other zombies to follow the breadcrumbs it left to get to the same location.
    • Scrap pathfinding altogether and implement a steering behaviour to navigate to a target destination while steering (i.e. swerving) round obstacles. e.g. http://www.red3d.com/cwr/steer/Obstacle.html
  • To get slightly more interesting/realistic behaviour, you might want to read up on Craig Reynolds' "Autonomous Steering Behaviours" - red3d.com/cwr/steer

    For this example, what you're describing is the "Flee" behaviour, which applies a steering force (an acceleration, if you prefer) in the opposite direction from the direction to the player. However, I strongly encourage you to read the other behaviours too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Time to post your .capx, I think...

  • Are you including the event sheet in which the array is populated on the layout in which you're trying to print it?

  • The function plugin let's you write a block of events that can be called and reused from other places in the event sheet. It can optionally set a return value. It's an "official" part of c2 and documented in the manual.

    If you mean that you want to write a JavaScript function, then you can do that too - read the SDK documentation about creating a custom plugin.

  • What's your target platform? The HTML5 navigator.getUserMedia() API exposes access to the microphone, but support is currently very patchy (I think limited to Chrome only under Win, not sure about mobile platforms)

  • Oh, that's a great presentation squiddster - very impress.js :)

  • I'm doing a presentation on A.I. in two days' time, and have used C2 for all the slidedeck and demos: meetup.com/NorfolkIndieGameDevelopers/events/104596392

    sqiddster - the link to your capx is broken - I'd be interested to compare how you set up the project for your presentation (I use one layout per slide, with a global event sheet that controls transitions between slides and some slide-specific event sheets for interactive demonstrations of the topics on each slide).

  • You only have coordinates to the odd-numbered positions? How do you know where to place 8 then? And for the previous arcs, how do you decide whether to go clockwise or counterclockwise from the previous chord? Are these Cartesian coordinates or polar coordinates?

    I think a bit more explanation or a caps would help!