Author Topic: CP Compiling and parsing for exe exports  (Read 64 times)

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1573
  • Total likes: 15
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
CP Compiling and parsing for exe exports
« 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,
Sorry because my English is not very good because I'm Spanish ;) :P

warrior

Re: CP Compiling and parsing for exe exports
« Reply #1 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

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1573
  • Total likes: 15
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: CP Compiling and parsing for exe exports
« Reply #2 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
Sorry because my English is not very good because I'm Spanish ;) :P

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1573
  • Total likes: 15
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: CP Compiling and parsing for exe exports
« Reply #3 on: September 29, 2020, 02:51:30 PM »
Just in case TingThing didn't read
Sorry because my English is not very good because I'm Spanish ;) :P

warrior

Re: CP Compiling and parsing for exe exports
« Reply #4 on: September 29, 2020, 04:57:46 PM »
Just in case TingThing didn't read
@Antikore you can try to ping him

Christian Game Maker

  • Currently developing Project ASM (The Adventures Of Super Mike) And manager of platformbuilderfansite.weebly.com!
  • Master Builder
  • *
  • Posts: 3622
  • Total likes: 10
  • The way of the Cross leads home.
    • View Profile
    • The Adventures of Super Mike Website (ASM)
Re: CP Compiling and parsing for exe exports
« Reply #5 on: September 29, 2020, 05:07:47 PM »
I'll ping him. @TingThing Antikore just wants to make sure you noticed this topic.

TingThing

  • Admin and Developer
  • Level 20: Nobom
  • *
  • Posts: 1061
  • Total likes: 17
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Re: CP Compiling and parsing for exe exports
« Reply #6 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.

warrior

Re: CP Compiling and parsing for exe exports
« Reply #7 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

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1573
  • Total likes: 15
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: CP Compiling and parsing for exe exports
« Reply #8 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.
Sorry because my English is not very good because I'm Spanish ;) :P

Christian Game Maker

  • Currently developing Project ASM (The Adventures Of Super Mike) And manager of platformbuilderfansite.weebly.com!
  • Master Builder
  • *
  • Posts: 3622
  • Total likes: 10
  • The way of the Cross leads home.
    • View Profile
    • The Adventures of Super Mike Website (ASM)
Re: CP Compiling and parsing for exe exports
« Reply #9 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.

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1573
  • Total likes: 15
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: CP Compiling and parsing for exe exports
« Reply #10 on: Today at 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
Sorry because my English is not very good because I'm Spanish ;) :P