Platforms of Goo: Problems I need to solve???

9 replies [Last post]
Joined: 12/22/2009

Something's wrong when I make the 100 level challenge level set on Platforms of Goo with the problem read here:

___________________________________________
FATAL ERROR in
action number 1
of Key Press Event for <Space> Key
for object starter:
 
Wrong line: Name:The 100 Level Challenge

EVERYTHING AMAZING BY INWOG

inwog, publisher of 407 World of Goo levels since 2009-2015

Joined: 12/11/2009

You can easily fix it by adding something before "name" like:
Island name:The 100 Level Challenge

I hope it happend in the newest "unreleased" version? I saw, the old set "Features" doesn't work in this version (same bug).

It's because the name of level set is get from the first line, where ":" is after 6th position (it's strange escpecially when you look into chapter's code where it works different). The game code develops in chaotic way and sometimes I cannot find all incompatibilities...

Joined: 12/22/2009

I'm using the unreleased version of PoG

I have a question, how do I place particles in the level?

EVERYTHING AMAZING BY INWOG

inwog, publisher of 407 World of Goo levels since 2009-2015

Joined: 12/11/2009

Particles are not easy-to-use functionality. I can show you part of my level-coding guide (newest version of ALC overview) about particles (I was working on it some time ago, and I'm not sure if it's ready enough)
Here it is:
___________________________________________________________________________
Particles are small objects not acting with anything in the level. The only use of particles is to create various graphics effects. It's fire, Goo splats and digits from Information-Superhighway-themed levels. There are some easy-to-use functions dealing with particles in PoG:

anim_splash(count,xo,yo,water) This function should be used in WITH construction. It creates count goo drips moveing in different directions. xo and yo describes position relative to object's position. If water is not equat to 0 then water drips are created.

anim_fire(count) Creates count fire particles. e.g. when monster is destroyed anim_fire(100) is called.

anim_fade(time,color) This function doesn't create particles. It makes whole screen fade into color. time describes how long the disappearing happen. During this time nothing moves in the game. After this time everything appears again immediately. Short time (about 10) and bright color (like c_white or c_yellow) looks like some kind of explosion.

effect_create_above(kind,x,y,size,color) This is original GML function allowing you to create some effects.
x,y are coordinates of the point where the effect should happen, size is number between 0 and 2 describing size of effect, and color is simply color of the effect.
There are following kinds of effects:
•ef_explosion
•ef_ring
•ef_ellipse
•ef_firework
•ef_smoke
•ef_smokeup
•ef_star
•ef_spark
•ef_flare
•ef_cloud
•ef_rain
•ef_snow
Using this function you may create snow or rain effect easier than using PoG particles.

Functions described above allows you to do a lot of effects. To make really custom effects you can create particle objects yourself. The following objects exist in PoG:

[fire] Parts of every flame. They are created by function anim_fire
Those particles have upward gravity and random vertical speed. Uses sprite s_fire. May not be useful for custom effects.

[splat] Those particles represents goo drips (and water drips). They have downward gravity and disappear by getting smaller and smaller. Uses sprite s_splat or s_water but it can be changed to anything by changing value sprite_index

[bit_trail] Digits from Infomation Superhighway. Those particles were used in chapter 3 to create snow effect.

Every particle object has some parameters descibing it's lifetime, appearance and movement. If you want to create particle with non-default paramaters, you can use construction like that:
with (instance_create(x,y,object)) { val1=4; val2=0.006; val3=30; }
It makes you able to create object at position (x,y) and set some parameters (val1, val2, and val3 are not true parameters of any object in PoG).
Below a short list of all parameters available for particle objects:

[image_index] Index indicating subimage from main sprite.
[image_angle] rotation of the image in degrees
[image_alpha] between 0 and 1. 1 is fully visible, 0 is invisible. fire particle is destroyed when invisible.
[image_blend] color added to the image. You can use it to chnage color of particle
[image_xscale]
[image_yscale] horizontal and vertical scale of the image. spalt and bit_trail are destroyed after it becomes <=0.
[dest] speed of disappearing. Different particles react in different ways (fire changes image_alpha, bit_trail and splat changes scale). If smaller - particle exists longer.
[speed]
[direction] parameters allowing ou to control the motion of particles. direction is angle in degrees - 0 is right, 90 is up, 180 is left and 270 is down.
[hspeed]
[vspeed] horizontal and vertical component of speed - alternative to using speed and direction
[gravity]
[gravity_direction] you can use it to change gravity acceleration for a particle. Direction 270 is down, 90 is up.
[friction] Positive friction stops motion of particle. Negative value gives some acceleration.
________________________________________________________________________________

I'm sorry for the format.
It all depends on what you're going to do. (Particles can be added in custom_event code). Watch snow.alc.txt for some example.

Joined: 12/22/2009

Give me some examples so I can easily work with it. Because when I used the snow.alc.txt file for my level, all the snow particles turn into the style from the Information Superhighway.

EVERYTHING AMAZING BY INWOG

inwog, publisher of 407 World of Goo levels since 2009-2015

Joined: 12/11/2009

There's one more important thing: you should change image for particles using Advencel Resources menu in last PoGLE (in winter levels s_bitchars image is changed into snow_strip3.png). Always when you want to put some new graphics to your level you have to replace an original resource.
There are no more examples than snow in winter levels and some effects in virtual ones (Darkness,Error).

Joined: 12/22/2009

How does the teleportation custom event works? I just did my code like this:

custom_event="if(instance_exists(glut)) if(glut.x=560; glut.y=240) {glut.x=144; glut.y=1296; sound_play(sd_bit_death); anim_fade(30); glut.speed=0;}";

EVERYTHING AMAZING BY INWOG

inwog, publisher of 407 World of Goo levels since 2009-2015

Joined: 12/11/2009

You cannot put ; into if( ). Replace if(glut.x=560; glut.y=240) with if(glut.x==560 && glut.y==240) to have correct code. But I'm not sure if it will work - you described only one position for the Goo Ball that may be easy to go throught without teleporation.

You can write something like that:
custom_event="with(glut) if(x div 4==140 && y div 4==60) {x=144; y=1296; sound_play(sd_bit_death); anim_fade(30); speed=0;}";
It gives also some tolerance (4 pixels) to Goo Ball's position (div means an integer division).

Joined: 12/22/2009

Does a level can have 2 or more custom events?

EVERYTHING AMAZING BY INWOG

inwog, publisher of 407 World of Goo levels since 2009-2015

Joined: 12/11/2009

What's better in 2 custom events? If you want to do more things you can enlarge one custom_event. There is also custom_paint, but it is useful only for graphics.