Platform Builder Forums

Main => Suggestions => Topic started by: Antikore on September 16, 2020, 05:28:43 PM

Title: CP Compiling and parsing for exe exports
Post by: Antikore on September 16, 2020, 05:28:43 PM
I still have the theory that PB requires more cpu when the command prompt has more lines etc.
If that's the case, my idea is that when you export to exe, PB will convert all the command prompts into the minimum expression of them, so the game will run as fast as possible. If you don't understand let me explain

I have this cp, well ordered, understandable, and human-readable
Code: [Select]
color = white

//If the player has defended recently, remove cooldown
if defendingS > 0
     defendingS - 1

//If the player is still defending, give effects. If not, enable hurt again
if defendingS > 16
{
     effect = circle in
     remove hurt = true
}
else
remove hurt = false

//REGEN SYSTEM
bulletRegen + 1 //Regen time progresses

//Regen if the delay succeed
if bulletRegen >= 30
{
     bulletRegen = 0
     ammo + 1
}

//Reset character sprite if the wall slide
if wall slide = true
     reset char sprite

But the program may need require to consume some resources to check where something is important or not. To fix that, when you export to exe, PB will convert this command prompt into something like this
Code: [Select]
color = white
if defendingS > 0
defendingS - 1
if defendingS > 16
{
effect = circle in
remove hurt = 1
}
else
remove hurt = 0
bulletRegen + 1
if bulletRegen >= 30
{
bulletRegen = 0
ammo + 1
}
if wall slide = 1
reset char sprite
Less human-readable but faster for the game to run.
In general, its removing comments, empty lines and in general anything that would require PB to unnecessarily consume more than truly needed. This is actually what true scripting languages do. In general, they remove any comments and convert into the most simple machine-language possible,
Title: Re: CP Compiling and parsing for exe exports
Post by: War on September 17, 2020, 04:43:19 PM
In general, its removing comments, empty lines and in general anything that would require PB to unnecessarily consume more than truly needed. This is actually what true scripting languages do. In general, they remove any comments and convert into the most simple machine-language possible,
You can just make a copy of your game and manually remove comments
Title: Re: CP Compiling and parsing for exe exports
Post by: Antikore on September 17, 2020, 05:14:26 PM
You can just make a copy of your game and manually remove comments
Program should do it automatically
Title: Re: CP Compiling and parsing for exe exports
Post by: Antikore on September 29, 2020, 02:51:30 PM
Just in case TingThing didn't read
Title: Re: CP Compiling and parsing for exe exports
Post by: War on September 29, 2020, 04:57:46 PM
Just in case TingThing didn't read
@Antikore you can try to ping him
Title: Re: CP Compiling and parsing for exe exports
Post by: CGM on September 29, 2020, 05:07:47 PM
I'll ping him. @TingThing Antikore just wants to make sure you noticed this topic.
Title: Re: CP Compiling and parsing for exe exports
Post by: TingThing on September 29, 2020, 06:04:49 PM
Thanks. I do see all suggestions, so no worries there. Although often times its a span of a couple week's time before it's time for me to sort through them. It all depends what phase I am in while developing PB.
Title: Re: CP Compiling and parsing for exe exports
Post by: War on September 29, 2020, 06:42:22 PM
Thanks. I do see all suggestions, so no worries there. Although often times its a span of a couple week's time before it's time for me to sort through them. It all depends what phase I am in while developing PB.
You could just get the best suggestions and discuss on a topic with everyone
Title: Re: CP Compiling and parsing for exe exports
Post by: Antikore on September 29, 2020, 07:09:38 PM
@Antikore you can try to ping him
I forgot as mentions are very new for me here.
Title: Re: CP Compiling and parsing for exe exports
Post by: CGM on September 29, 2020, 07:50:30 PM
@Antikore You're ahead of me now by 1 like. You can thank me since I just liked you. I'll miss us both having the same amount of likes (9) oh well...XD (Okay, I need to stop posting about the liking system...it's getting old.)

I'm sure you'll get used to pinging. It's pretty neat.
Title: Re: CP Compiling and parsing for exe exports
Post by: Antikore on September 30, 2020, 05:45:50 AM
@Antikore You're ahead of me now by 1 like. You can thank me since I just liked you. I'll miss us both having the same amount of likes (9) oh well...XD (Okay, I need to stop posting about the liking system...it's getting old.)

I'm sure you'll get used to pinging. It's pretty neat.
I know :P
Title: Re: CP Compiling and parsing for exe exports
Post by: War on September 30, 2020, 07:44:34 PM
You're ahead of me now by 1 like
I came from the future to say that hes ahead of you by 8 likes
Title: Re: CP Compiling and parsing for exe exports
Post by: Antikore on September 30, 2020, 09:12:49 PM
I came from the future to say that hes ahead of you by 8 likes
wut? How we did get here?
Title: Re: CP Compiling and parsing for exe exports
Post by: Mechasaur on September 30, 2020, 10:14:32 PM
wut? How we did get here?