A couple tips.

New releases and general discussions.

Post » Sun Nov 16, 2008 10:59 pm

Well probably common knowledge, but tips for newbs, like me.
On loading a sprite, most of the behaviors assume the image is facing east.
Yeah I know I shoulda figured that one out when it started moving sideways. :P

Another nice little time saver: You can set up a little HP/ counter bar, by using a gradient object, and using an objects private variable to make it grow. Just change the gradients width, or height to the variable.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Dec 06, 2008 3:02 am

lol yeah east and then rotates in a clockwise direction is how our angle system works. Its so that cos and sin work in this manner:

X += cos(angle)
Y += sin(angle)

Really easy to remember because cos and sin are in alphabetical order, and both positive :)

Also another tip is to use the tiled background object and set the width. That works well with a health bar that gets smaller (doesn't scale, just becomes less and less) or hearts where you have a tiled image of a 16x16 heart and each time u get hit you subtract 16 :)
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sat Dec 06, 2008 3:38 am

[quote="David":21nek7f4]lol yeah east and then rotates in a clockwise direction is how our angle system works. Its so that cos and sin work in this manner:

X += cos(angle)
Y += sin(angle)

Really easy to remember because cos and sin are in alphabetical order, and both positive :)

Also another tip is to use the tiled background object and set the width. That works well with a health bar that gets smaller (doesn't scale, just becomes less and less) or hearts where you have a tiled image of a 16x16 heart and each time u get hit you subtract 16 :)[/quote:21nek7f4]

I always wondered why the angles were different from every other game creation platform. :P And now that I know what sin/cos are, it all makes sense.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Sat Dec 06, 2008 6:46 am

[quote:3tsf7bty]Also another tip is to use the tiled background object and set the width. That works well with a health bar that gets smaller (doesn't scale, just becomes less and less) or hearts where you have a tiled image of a 16x16 heart and each time u get hit you subtract 16 :)[/quote:3tsf7bty]

Oh yeah? Hey that would work for a lot of other things as well.
Thanks for the tip.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Dec 06, 2008 7:03 am

[quote="David":1qysgcxd]Also another tip is to use the tiled background object and set the width. That works well with a health bar that gets smaller (doesn't scale, just becomes less and less) or hearts where you have a tiled image of a 16x16 heart and each time u get hit you subtract 16 :)[/quote:1qysgcxd]

That's a clever trick :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests