mikehive's Recent Forum Activity

  • I haven't used this plugin, but this looks like the setup for GA Event data (I use it a lot for work). Basically you can enter whatever you want in these fields, and that will dictate what you will receive in GA (under Behaviour - Events in the GA left menu).

    "Category" is the top level name of the event as you want it to appear in Google Analytics. You can set it up so that when you click on this name in GA, you can see a breakdown of all events in that category by Action.

    I would probably do it like this, but it's up to you:

    • Category: Track Play
    • Action: [Tribecore, Hardtek, etc)
    • Label & Value: [leave blank]

    As long as you make sure you send this data to the correct Analytics ID this should work just fine :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Love your graphics style! Looks pretty cool 😁

  • What you're looking for here is event sheet includes.

    https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/events/includes

    You can put each of your systems in a dedicated event sheet, and include them into whichever other event sheets you want them to affect :)

  • If you had an origin point at the inner end of the gun barrel (eg. where the barrel meets the tower) then I guess you could measure the angle from the turret to the enemy like so:

    And basically work out the angles like:

    If angle between turret and enemy is between 45-55 degrees: set animation to rightmost

    If angle between turret and enemy is between 55-65 degrees: set animation to middle-right

    ...etc

    Alternatively, for a more simplified version, you could compare the X values of the turret and the enemy. If all you needed was the 3 states of left/middle/right, you could work that out by testing to see if the enemy was more than a certain distance to the left or to the right of the turret origin.

    Eg. you could have these 3 events:

    If enemy.x < turret.x - set turret animation to LEFT

    If enemy.x > turret.x - set turret animation to RIGHT

    If enemy.x is between values turret.x-20 & turret.x+20 - set turret animation to MIDDLE

    This will cause the turret to point left or right if the enemy is to the left or right of its origin point, unless they are standing somewhere in the middle zone, in which case it plays the middle facing animation.

    I've allowed 20 pixels either way to be the turret's middle zone, but you can adjust this number based on the size of your sprites and what looks good in practice.

  • Maybe rather than updating the angle every tick, you can update it just a few times a second?

  • I must admit I constantly wonder why Scirra don't set up proper 301 redirects for all this old material. It's a bit of a facepalm that they've just let a decade's worth of links to legacy knowledge and insights get broken.

  • Can you not spawn the turrets etc in the first frame when the ship is created and is in a 'neutral' pose, set the left/rights, and then attach them to the ship thereafter so that they continue to be left/right turrets even though the ship later goes on to rotate?

    In other words, always spawn ships at 0 degrees, attach the turrets to the right places, THEN set the angle to whatever you want.

  • Ohhh, I see what you're trying to do. Okay.

    From squinting at your ship sprite in the screenshot, the thought occurs that if all of your spaceships are drawn facing in the same direction - and the origin point is set to the centre of the ship - you could determine whether an image point is to the left or right hand side of the ship pretty easily by comparing the Y coordinates.

    You know... maybe something like this?

  • Dictionary needs to load from LocalStorage.ItemValue

  • Dictionary shouldn't be loading "Achievements.json". It doesn't know what that is. You need to tell it to get the data that you just pulled via AJAX.

    It should be Dictionary > Load JSON: AJAX.LastData

  • This is legitimately amazing. What is this witchcraft??

  • Honestly, my main goal when optimising a game with 40000 sprites would be trying to think of clever ways to not have 40000 sprites.

    I'm not saying you should delete stuff from your game, but there might be a smarter way to do this. For example, if you've got a giant map with 5000 tree objects on it - do you really need to have all those trees in memory given that you can only see a few of them at once? Maybe you could just have an array that remembers where the trees are, keep a stock of say 100 trees, and then just teleport them into position when necessary. Looks the same to the player, but waaay less stuff sitting around in memory.

    Or: are there any sprites that you don't really need to have in memory? Eg. maybe you have a bunch of invisible spawner objects that populate the map with enemies or whatever. Well, once the spawners have done their job they can be deleted, right? No need for them to be taking up memory any more.

    You can also put objects that don't move a lot (eg scenery items) onto a layer together and enable render cells for that layer. This might improve your performance, but it doesn't always - you should test.

    If you let us know more details about your game, how it looks and how it works, we can make more detailed suggestions for ways you can optimise it :)

mikehive's avatar

mikehive

Member since 13 Jul, 2015

Twitter
mikehive has 2 followers

Connect with mikehive

Trophy Case

  • 9-Year Club
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

11/44
How to earn trophies