Implementing your own 'anchor to screen' or 'everything is broken' [SOLVED]

Fool

  • Posts: 88
So 'anchor to screen' completely overlaps and breaks draw to screen. Every time.
Decided I'd just implement my own 'anchor screen'.
Just one problem. It works perfectly. Until I move south on the map--followed by moving north. The HUD stops following
and gets stuck at the most southern point you last moved to. This of course will work no problem if I do center to camera
directly in the HUD element.

So lets recap.
Anchoring a HUD breaks text drawing. Implementing your own anchoring should work via the simple and obvious methods. And it doesn't. Implementing this, in multiple different ways, also doesn't work

This is getting ridiculous. You can't tell me ten different solutions, six for something that SHOULD work, and four being used on an alternative solution implemented to replace a broken system to begin with, don't work either.
If I wanted my tools to work against me, where I have to question every single assumption, build a debugger for every little system to inspect values/output, I would have just gone with phaser or sfml. I mean, I can set camera center to an actor, or an arbitrary position, but theres really no command to set its x and y coordinates (top left corner), or camera width/height? And I can't render to arbitrary layers or z indexes, or override that, really?

 I guess this is less of a 'question' and more like me venting. It just seems like everything I try is broken, and every solution that seems to me to be simple or obvious, doesn't work or works 'just so', and violates the principle of least surprise.
I'm working on a deadline. This is incredibly frustrating, disappointing, and discouraging.
And i'm starting to get to the point where I'm questioning buying stencyl to start with.

« Last Edit: April 29, 2016, 07:48:45 pm by Fool »

merrak

  • *
  • Posts: 2738
Does east/west movement work fine? Can you show us the code you wrote?

rob1221

  • *
  • Posts: 9473
Quote
Just one problem. It works perfectly. Until I move south on the map--followed by moving north. The HUD stops following
and gets stuck at the most southern point you last moved to. This of course will work no problem if I do center to camera
directly in the HUD element.
I'm guessing you need to use the [make actor always active] block.

Fool

  • Posts: 88
Yes, east/west code works fine, and if you were getting at what rob was getting at, then you're right.
I  just shouted out loud, "g-dd-mmit! It worked. Rob you magnificent bastard." Hopefully no one heard that, but seriously, thank you guys. The infuriating part is that I considered this halfway through, and thought "nah. Nothing else has worked. Has to be something different"

Like seriously, why would this crop up? I didn't figure this was the problem because east/west movement still worked. Even despite shotgun debugging, I still was blindsided.

merrak

  • *
  • Posts: 2738
Like seriously, why would this crop up?

I suppose that if all actors were set to "always active" by default, then it would be easy to write a game that performs poorly.