GameMaker: Studio

GameMaker: Studio

查看统计:
Blind 2018 年 8 月 8 日 上午 12:12
Is there a built in frame counter?
I know it's easy to make one, I just don't know if there's a built in one.
< >
正在显示第 1 - 10 条,共 10 条留言
maras 2018 年 8 月 8 日 上午 1:04 
There is no build in counter because every step is one frame so all you need to do is frame += 1; and you have a frame counter
Blind 2018 年 8 月 8 日 上午 1:11 
引用自 marasovec
There is no build in counter because every step is one frame so all you need to do is frame += 1; and you have a frame counter

True; but I'm trying to use as many built-ins as possible for a mini-challenge
maras 2018 年 8 月 8 日 上午 9:41 
Sounds fun
RandomDude 2018 年 8 月 8 日 下午 2:28 
Is the function "fps" no good or did I misunderstand what you're after?
The Winter Bud 2018 年 8 月 18 日 下午 3:53 
The manual states:
In GameMaker: Studio there are two main ways that can be used to tell the speed at which your game runs. The room_speed (as specified in the room editor) and the fps (frames per second). These values are often confused, but basically one is the number of game steps that GameMaker: Studio is supposed to be completing in a second (room speed), while the other is the number of CPU steps that GameMaker: Studio is actually completing in a second (the real fps), and this value is generally much higher than the room speed, but will drop as your game gets more complex and uses more processing power to maintain the set room speed.
Blind 2018 年 8 月 18 日 下午 6:26 
I meant an actual frame counter, like "your game has been running for 29783872894678978 frames" (although I would probably convert that to a looping short anyways)
The Winter Bud 2018 年 8 月 19 日 下午 12:38 
get_timer()[docs.yoyogames.com]
This function returns the time that your game has been running on the chosen platform in microseconds (there are 1 million microseconds per second).

It's not a frame counter, but with a little math it could be
最后由 The Winter Bud 编辑于; 2018 年 8 月 19 日 下午 12:40
Blind 2018 年 8 月 19 日 下午 12:40 
actually, that works even better than a frame counter for my purposes
The Winter Bud 2018 年 8 月 19 日 下午 12:43 
I use it occasionally. Sometimes I like to keep track of how long players are playing the game before they quit or give up. I sometime use it to track when a player dies too. Helps with game flow, timers, clocks, etc.. Bit clunckier than using current_time and other date/time functions due to it's limited start space (at the launch of app)
Blind 2018 年 8 月 19 日 下午 1:33 
引用自 The Winter Bud
I use it occasionally. Sometimes I like to keep track of how long players are playing the game before they quit or give up. I sometime use it to track when a player dies too. Helps with game flow, timers, clocks, etc.. Bit clunckier than using current_time and other date/time functions due to it's limited start space (at the launch of app)

I mostly would use it as a modulo counter to see if certain events should happen. For example, FrameCounter mod 256
< >
正在显示第 1 - 10 条,共 10 条留言
每页显示数: 1530 50

发帖日期: 2018 年 8 月 8 日 上午 12:12
回复数: 10