Jump to content

[1.7.10]Is draw screen called every tick?


starwarsmace

Recommended Posts

Hello guys. So Im making an animation for a gui and Im going to be changing the background every tick or so. Does drawscreen get called every tick?

 

Also, kindve related question. How do you have text formating, like underlining. In the font renderer class it says, " Set if the "n" style (underlined)is active in currently rendering string." Where would I put the "n"?

I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!

Link to comment
Share on other sites

drawScreen is called every frame (which is different from ticks). For ticks use updateScreen.

 

For formatting check out EnumChatFormatting.

Thank you and frames is what I want I think for animations.

 

And Ill check out EnumChatFormatting.

I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!

Link to comment
Share on other sites

Not really, you want ticks. Otherwise your animations will run faster at 120 fps than at 60.

Oh. That isnt what I want.I actually want it at like 10 fps. I could just check whether 12 frames have passed then run my frame, until the end. Would that be right?

I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!

Link to comment
Share on other sites

Not really, you want ticks. Otherwise your animations will run faster at 120 fps than at 60.

Oh. That isnt what I want.I actually want it at like 10 fps. I could just check whether 12 frames have passed then run my frame, until the end. Would that be right?

 

A tick is already at 20 fps, so like diesieben07 says you should use the tick method for consistency.  You can check if 2 ticks have passed if you need 10fps.  The frame rate is configurable and will depend on device and user settings, so you don't want to depend on that for timing.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Not really, you want ticks. Otherwise your animations will run faster at 120 fps than at 60.

Oh. That isnt what I want.I actually want it at like 10 fps. I could just check whether 12 frames have passed then run my frame, until the end. Would that be right?

 

A tick is already at 20 fps, so like diesieben07 says you should use the tick method for consistency.  You can check if 2 ticks have passed if you need 10fps.  The frame rate is configurable and will depend on device and user settings, so you don't want to depend on that for timing.

Oh, alright Ill try that.

I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!

Link to comment
Share on other sites

No you draw in

drawScreen

. You need to count ticks in

updateScreen

and every # ticks, increment the animation and render your animation in

drawScreen

.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

No you draw in

drawScreen

. You need to count ticks in

updateScreen

and every # ticks, increment the animation and render your animation in

drawScreen

.

*facepalm*

That was an idiotic mistake.  Ill try that.

I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.