Platform Builder Forums
Projects => Collaboration => Topic started by: TingThing on October 18, 2020, 07:06:05 PM
-
Hi everyone,
I'm working on optimizing the command prompt so that it runs faster in Platform Builder. I think Antikore mentioned some things like removing commands and extra space on compile. That stuff is happening. But there's something else I'm doing too.
The command prompt works by searching through a long list of commands until it finds the one that its looking for. Once it finds the command in the list, it will stop searching and execute the command.
What this means is that I want to have the most commonly used commands to appear early in the list so that they are found quickly.
Could you help me out by commenting below which commands you tend to use most often in Platform Builder? (This also goes for conditionals)
Thanks!
-TingThing
-
here's a list of what I (generally) use the most:
- ground style = athletic/custom
- swim style = standard/topdown
- wall jump = 0/1
- area & world = x, y
- sfx & fx = x
- pause/resume music
- fade out/fade in music
- timeline = x
- lens = (...)
- distance = 1-9
- follow player1/enemy1/spawn, 1/(...) & view jump
- screen shake & shake power
- rain/snow/lighning = 0/1
- disable/enable player
- delay (seconds) = x
- (if) (game) var whatever = x
- _(Message)/<ID>(Message)
- enemy1 = item1, etc.
-
It's hard for me to give such a list since I use such a wide variety of commands.
-
It's hard for me to give such a list since I use such a wide variety of commands.
Can you think of the commands or conditionals that you often use in looping command prompts?
-
@TingThing I haven't used PB in awhile, and I haven't written commands in awhile either. But I do know that when I was using it a lot, I was using random commands, and as for common ones, I used variables a lot, (a whole lot) and other things, but I used so many, it's hard to put it into a list.
-
Command Prompt could run lot faster if using switch statements, however, I think that's not possible maybe...
Here is my list:
- timeline
- any variable commands
- disable/enable player
- hide/unhide players
- hud sprite
- upload sfx
- area command
- delay command
- shake command
- random bracketing
- ^ Overhead Text Command
-
which commands you tend to use most often in Platform Builder?
Didn't used PB seriously since Spring 2020, so I can't say. However if you are able to delay this optimization (since it's just build speed after all), you should add a thing to the next version that, if enabled, would check for each export the amount of times each commands is used, and generate a log file that would be sent to you, so you can get information on the most used commands.
-
Command Prompt could run lot faster if using switch statements, however, I think that's not possible maybe...
Good thinking, yes, and that's what I already do, and then break the switch once the command has been found. It's also divided up into one switch statement for each letter of the alphabet, dividing up the workload further.
you should add a thing to the next version that, if enabled, would check for each export the amount of times each commands is used, and generate a log file that would be sent to you, so you can get information on the most used commands.
Also good thinking Warrior. I might do that in the future to polish up the command prompt further.