Author Topic: Concept Tutorial: Empty Objects (EOs)  (Read 301 times)

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 21: Magmus
  • *
  • Posts: 1983
  • Total likes: 163
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Concept Tutorial: Empty Objects (EOs)
« on: December 10, 2020, 02:23:02 PM »
Hi! I'm Antikore and today I will explain you a concept that you can apply to your games.
Empty Objects, or also known as EOs is basically any object in a PB game (enemy, item, projectiles etc.) that have been modified to be completly reduced into their minimum expression. This is a very useful technique even used back in old PB days.

First of all, the requirements that an object should have to be considered an EO:
  • Should no have texture, or not explicitly a texture (Something like a quick custom particle effect could still be considered an EO)
  • Their PB basic functions for the type should be extremely limited: An invisible, ignoring environment, motionless and invincible enemy its considered an EO

Now, lets see old-school and modern uses:

The first uses for EOs were back when commads didn't even exist. Basically, items were being used as an EO and they could be used similarly to what nowadays cmd blocks are used for.
These generally were invisible, with no collecting animation, nor scoring. Could be used for triggering stuff. I think IGP used this a lot ago.

After a couple versions, in CC I've used a EO projectile for making the campfire. Its a non-damaging, invisible projectile, which just goes upwards and fades away, spawning smoke particles over it, to create the effect.

Nowadays, the most useful EOs are definitely EO Enemies, for example, the tutorial I've made recently about three-bullet gun uses an EO Enemy.

Here are a couple of simple uses for EOs:

1.- Enemy Shooting Randomizer
Using this time an EO projectile, we can make an enemy shoot randomly. How?
Create an enemy, and then make an invisible, harmless, non-sound projectile. And add it as primary projectile for the enemy, then the secondary put the projectile you want to shoot originally, and set the chance for it. (This was used in the making of the space invaders recreation)

2.- Gun Shrpanels
This can be used in multiple ways, but this is an example. So, this time making a projectile that after a time will explode into multiple pellets. Using an EO Enemy, you can just spawn the enemy over the projectile in the life out cp, configure the enemy to shoot projectiles as normal, then do this.
Code: [Select]
//Create CP- EO Enemy for Sharpnels
//This is for the eoing
enemy = ignore environment
enemy visible = false

//Loop CP- EO Enemy for Shrapnels
enemy = fire

//Fire CP - EO Enemy for Shrapnels
remove enemy
The enemy won't be percepted by the player, and it just fires the primary projectiles as the explosion. (I didn't tested this code directly, I've used this in the past but I wrote it here by memory, if doesn't work, probably delaying the fire will fix it, by having a variable that sums when loop, and if it reaches 1 execute it. Like 1 frame separation)

I have more examples, one of them is the three-shooting pistol, but most of them are too complex. (cof cof mouse latern for terror games)
Hope this concept helps you to make even better games. You can give your own examples if you have used this in the past, too.
« Last Edit: December 10, 2020, 09:59:11 PM by Antikore »
Sorry because my English is not very good because I'm Spanish ;) :P

warrior

Re: Concept Tutorial: Empty Objects (EOs)
« Reply #1 on: December 10, 2020, 08:03:37 PM »
Very cool tut, but what about CC? Will you ever update it?

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 21: Magmus
  • *
  • Posts: 1983
  • Total likes: 163
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Concept Tutorial: Empty Objects (EOs)
« Reply #2 on: December 10, 2020, 09:56:15 PM »
Very cool tut, but what about CC? Will you ever update it?
I was moving the development in the wrong direction, and probably PB versions damaged completely the project, and I should change a lot of stuff, the code being completly cluttered too. So may not be the case...

For now...
« Last Edit: December 10, 2020, 09:56:36 PM by Antikore »
Sorry because my English is not very good because I'm Spanish ;) :P