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

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • 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

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
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
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • 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

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • 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

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
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
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
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: 1395
  • 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.

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
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
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • 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

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
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

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: CP Compiling and parsing for exe exports
« Reply #10 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
Sorry because my English is not very good because I'm Spanish ;) :P

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: CP Compiling and parsing for exe exports
« Reply #11 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
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: CP Compiling and parsing for exe exports
« Reply #12 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?
Sorry because my English is not very good because I'm Spanish ;) :P

Mechasaur

  • No Normies Allowed
  • Level 13: Porcuprick
  • *
  • Posts: 346
  • Proud Admin of Plugger's Zone
    • View Profile