HiI set mine back to 4GP as that is what my video card supports, and it does in fact run faster then before, but not as fast as I need it to be. Do you have any other tips/tricks to make segmentation in 3D views faster? (Through scripts)
Hello everyone!
I have a game I'm making. I just came from Scratch and am not all that accustomed to yet, but I know there are some ways to make it faster/more stable with the FPS. I also assume that when I port it using Snapp!, it will most likely be faster.
It's the use of the warp blocks for the Touch Ground and Walk blocks. Removing the warp fixes the lag, but the character takes quite a while to rise out of the ground. At that point it's more of an issue with the ground detection. Alternatively, you use warp only when the character is clipped into the ground but the way the Touch Ground script is set up makes the placement of a warp less obvious.
It's in the else statement where we actually pull the player out of the ground. The lag seems to be in the Walk block. But not warping it leads to jittering if you move in the air or wall-jump. Warping it brings back the lag, so I'm just going to optimize it. I'm sure there's a declarative way or something to do it but I'm really bad at that. I can't read code that doesn't say what it does top-down. But I'll try. Thanks.
Nope, that's doesn't work (ha ha) at all (ha ha ha). Oh man this is confusing. Repeats seem to be really slow in Snap! as they seem to override inner warps so they update every tick (makes more sense than Scratch) the transition is hard. Can you please help me wrap (no pun intended) my head around what's wrong in the Touch Ground block that makes it like this?
It's strange, the Touch Ground code is similar to the code in this Griffpatch tutorial, I'm guessing you were loosely following that, but something different is happening here. I modified the code slightly: making it an exact replica of the Touch Ground block in the tutorial, wrapping that block in a warp, and then placing inside of the "if wall jump = 0" C-block, and the project runs somewhat faster, but the hitbox is in a constant state of falling if I do that.
Maybe refactoring the code could help, such as moving the controls section of the forever loop into its own custom block.
Yes I was following that tutorial exactly. But there was a reason I was using Snap! instead of Scratch -- there were simpler ways to do things! I should probably scrap the existing code and rebuild it.
I measured frame count and time of jump sequence. It took 25 iterations of the "hitbox" main loop to go up and down.
You can test this script to check the time. My system need 2 s to complete 30 such iterations. So the target framerate is 15 FPS and speed of objects and decelerations must be adjusted to get desired visual results.
In "Turbo" mode there are only a few emergency refreshes per second but loop speed is limited only by workload.
All right I spent hours break apart the loops and restructuring them and nothing seems to prevent the jittering without sacrificing speed. It might be the problem of loops overriding warp, which although makes sense, completes breaks efficiency. Any naturally declarative programmers who can see about converting this? Trying to decipher this just makes it less efficient.
.
There is something strange about your project.
This script took 1 s to complete with the newly created Snap editor (running at 60 FPS). But with your project loaded (not running) works at half speed (30 FPS).
There is something strange about your project.
This script took 1 s to complete with the newly created Snap editor (running at 60 FPS). But with your project loaded (not running) works at half speed (30 FPS).
Although I have a cheaty solution, the use of JavaScript typically improves performance when compared to a large number of blocks. Although I can't talk about it too much without this turning into an Advanced Topic, if you know JavaScript, it can boost performance quite a bit, at least in the current version of Snap!
Hmm. Javascript-intensive project in a platformer? I'm not so sure... I was trying to avoid this, I guess I just didn't want to get into all that. I'm trying different things and at this point it seems like the only solution, 'cause only more mechanics are going to be added.
LinkedIn and 3rd parties use essential and non-essential cookies to provide, secure, analyze and improve our Services, and to show you relevant ads (including professional and job ads) on and off LinkedIn. Learn more in our Cookie Policy.
A coach came to me one time and said that a player (WR) looked slow and that I needed to improve his speed. So I looked at his game data. His normal route speed was 17-18 mph a top speed of 21.3 mph which he hit only once in 2 seasons. That's definitely slow but I also knew the guy was a track sprinter so I questioned whether he was actually speed deficient. So I measured his speed in a sprint. He hit 23.1 mph in a 100 yard sprint, 8.2 m/s in top acceleration, and a 4.38 in the 40). Obviously he wasn't speed deficient. To improve performance, we have to address/improve limiting factors. I could train that guy and maybe improve his speed/acceleration 3-5% and it would have no impact on his game speed because he already has more speed than he is showing on the field. Speed potential was not his limiting factor.
Having seen endless amounts of game speed data at all levels, I have never seen a single case where true top speed, or even true top acceleration, is the limiting factor in game speed. Diving into the previous case I mentioned I found two things were limiting his game speed: 1- Confusion or over-thinking & 2- Speed decreases during non-linear running. Both of these are the most common causes with a third being difficulty sustaining speed during pursuit/evasion or when faced with disruptive contact from an opponent.
To address the first limitation, the player needed better preparation for the game in the form of film study and practice reps. Limiting his practice reps to save his legs would have made the problem worse. Players who are more prepared for game situations are more comfortable, less confused, and able to turn up the speed. To address the second limitation, he got a heavy dose of high speed curvilinear running during training which helped him feel more comfortable at high speeds in actual football movement patterns. Players who struggle with pursuit/evasion speeds or when facing contact from an opponent will be placed in pursuit/evasion drills where they can practice that skill and we use dynamic coordination exercises in the weight room, followed by sprint reps where the player must deal with contact and learn to maintain stability without slowing down.
So why does track not make football players faster? Because it doesn't address any of those limiting factors. Running in a lane, straight ahead, without any pursuit/evasion or contact does not transfer to field speed. Instead, speed should be built and refined in ways that coincide with the demands of the game.
1- Building top speed makes game speeds increase because if you raise the speed ceiling, the floor also goes up. Response: I have seen no evidence of this happening and, in fact, have seen a lot of data where top speed goes up but game speeds do not.
2- Track is a great place to learn proper running mechanics. Response: No, track is a great place to learn track running mechanics. Field running mechanics are very different and if a football player wants to improve his on-field running mechanics, track isn't the place to do that.
3- Football players will benefit from the competition they'll experience in track. Response: True. But there are plenty of other ways to get competition including field sports where they will apply speed in better ways and good competitive situations in an off-season training program.
Now, before anyone brands me as anti-track, I think track is a great sport and I love watching the sprints. If a kid wants to run track, he should run track. There are plenty of benefits from doing so. My issue is misleading kids by promoting track as a great way to improve football performance.
We know that nowadays PC CPU has more power,higher frequency,multi cores...and Labview programs running on industry environment mostly,and the typical application is ACQUISITON->PROCESSING->DISPLAY of a loop.
You are, I believe, Asking the Wrong Question, or Worrying about the Wrong Thing. A well-designed LabVIEW routine "doing what LabVIEW is designed to do", i.e. server as a Laboratory Virtual Instrument Engineering Workbench, and handle such Engineering Tasks as acquiring "real-world" data from multiple sensors, analyzing it, and using it to make decisions, control other processes, and save data for later analyses, is, in most cases, running at exactly the right speed, and using exactly the right amount of Computer Resources.
Consider, for example, acquiring data and using those data to control a process. If the time-scale of the data and the process under control is on the order of milliseconds to seconds, it makes no sense to run the CPU at 100% utilization, collecting data at a mHz rate, "just because the CPU can handle it". What makes more sense is to design the routine so that it is easy to create, easy to understand, easy to debug, easy to modify and maintain, and easy to document and "hand off" to another person. LabVIEW (and a good LabVIEW developer) can do that.
Aside from what Bob already mentioned and with which I wholeheartedly agree, there is one other gotcha that you may have. The reason that you see "only" 25 % CPU usage might be because you have a dual core CPU with hyperthreading (and a badly behaving LabVIEW loop spinning at maximum speed doing usually nothing).
3a8082e126