jobel's Recent Forum Activity

  • yeah using a timer is your best option... you can start and restart them whenever you want... makes things a lot easier...

    just make an empty game object, make it invisible and give it the Timer Behavior.

  • here is a capx I am working on... the object on the "far away" layer(30,30) is not working right on the minimap...

    https://dl.dropboxusercontent.com/u/362 ... nimap.capx

  • That didn't work...However I failed to mention I'm trying this on an unbound layout.

    So my MiniMap for enemies that are on the same layer as the player is:

    Every Tick Set Position (of Enemy_Indicator) to:

    Player_indicator.X + (alien.X - Player.X) / MiniMapZoom

    Player_indicator.Y + (alien.Y - Player.Y) / MiniMapZoom

    The player indicator I am treating as the "center".. since it's like Zans Minimap (from minecraft). This works perfectly for all object on the same layer. MiniMapZoom is the scale of the map (increments of 10).

    So when you begin the level, the player is not moving and all object's positions are the same distance for all layers. It's not until the player moves does the the Xs grow apart. The drawn parallaxed position would seem to have to include the player's speed or the scroll amount of the screen...

    Something like:

    Every Tick Set Position (of Planet_Indicator) to:

    Player_indicator.X + (Planet.X * (LayerParallax(3) / 100) - Player.X) / MiniMapZoom

    Player_indicator.Y + (Planet.Y * (LayerParallax(3) / 100) - Player.Y) / MiniMapZoom

    but this doesn't work... whatever the calculation is, the modifier would have to equal 0 at the beginning before the player starts moving.. then it would have to accumulate as the player started to move. I've been working on this too long and can't see it... I can feel the answer.. but it eludes me!

  • I'd like to get the Parallaxed coordinates of an object... so in essence, where it's actually drawn on the screen..

    I'm making a minimap and I have some background objects that use parallax 25,25.. I'd like them represented on the minimap.. but they don't line up because of the parallax delay (scrollrate).

    The 'camera' is lerping to position: lerp(scrollx, player.X, 0.9*dt (and same for the Y)

    Can anyone offer a suggestion? I know it's probably not possible with a simple equation since the scrollrate depends on when the player is moving (and how fast). And on a map it wouldn't really accurately say where an object is... but the parallax effect can help make something seem giant or really far away (depth wise) and I still would like to represent it in the minimap.

    Thanks!

  • Before crossfades... it would be cool to have some audio fade in/out behaviors. And add linear as well as other fade line shapes..

    how do we put this on the wish list?

  • ....grokked...

    I had to look up what this word meant... never have I heard it used... it's from Stranger In a Strange Land... cool reference..

  • great presentation... good job..

  • C-7 I did some testing and it turns out the browsers are to blame for this..

    IE11 keeps the audio completely in sync. I let my 4 track, 30 second song loop for 30 minutes and it was perfectly in sync. The downside is that IE11 doesn't do a great job with loops and you can hear a small "pop" at the loop points.. it's not horrible, but it's definitely not seamless to my ears.

    Chrome33 (which is what I normally use) loops great but somehow allows the tracks to become out of sync.

    Firefox27 has both terrible looping and at the same time allows the tracks to go out of sync.

    So, pick your poison I guess!! I put a ticket into Google about this, so maybe a future Chrome release will fix it. But in the mean time I will look into your work around. Thanks!

  • what event triggers this code?

    you most likely need to go through all the enemies on the screen. Use a For Each loop (which will run completely in 1 tick). You should put all your enemies in a Family as well.

  • great write up... thanks for the link!

  • nice! good job..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • done.

    I just filed a Issue Report with Google although that seems like for the normal end user. Not sure where to send the report for something more technical than web browsing.

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-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
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies