Page 1 of 2

Circling Boo Buddies API

Posted: Sat May 14, 2016 11:33 am
by S1eth
This is an API for creating the boo buddy circles from Super Mario World and Super Mario Maker.

Version history:
Spoiler: show
1.0.0
  • Initial release
1.0.1
  • fixed incorrect boo hitboxes
1.0.2
  • Boo Buddy Circles will now be drawn even when the game is paused.

Download



Features
  • Super Mario World and Super Mario Maker-style boo circles.
  • Boo graphics from SMW, SMB3 or SMB1
  • Spinjump/Link downstab/Yoshi bouncing (optional)
  • Can be killed with the kuriboh shoe or starman(single player only) (optional)
How to use:

1. Download and unzip into your level's graphics folder.
2. Load the API into your lunadll.lua file with local booBuddies = API.load("booBuddies");
3. Configure spinjumping and what your boo circles will die to.
4. Create boo circles.

Example:

Code: Select all

local booBuddies = API.load("booBuddies");

local myBooCircles = {};

function onStart()
	booBuddies.diesTo = {shoe = true, starman = true};
	booBuddies.canSpinjump = true;
	
	myBooCircles[1] = booBuddies.create({x = -159760, y = -160432, preset = "SMM"});
	myBooCircles[2] = booBuddies.create({x = -159472, y = -160304});
		
	myBooCircles[3] = booBuddies.create({x = -158992, y = -160432, preset = "SMM", style = "SMB1", layer = "Boo Layer"});
	myBooCircles[4] = booBuddies.create({x = -158704, y = -160304, style = "SMB1", layer = "Boo Layer"});
	
	myBooCircles[5] = booBuddies.create({x = -157904, y = -160176, preset = "SMM", style = "SMB3"});
	
	myBooCircles[6] = booBuddies.create({x = -157136, y = -160304});
	
end
Functions:

booBuddies.create (returns a BooCircle object)

mandatory arguments:
x and y coordinates

optional arguments:
preset: "SMM" or "SMW"(Default) provides default arguments for boo circle creation.
style: "SMW", "SMB3", "SMB1" or "SMM-SMW". Determines the graphic style used for the boos.
section: Circle will only be drawn when the player is in the section. If no section is provided, it tries to find the section based on the coordinates.
layer: Name of the layer. If the layer is hidden, the circle is hidden as well.
circleRadius: radius of the boo buddy circle
angularSpeed: speed at which it rotates
angularDirection: "clockwise"/"CW" or "counterclockwise"/"CCW". Determines the direction in which the circle spins.
numberOfBoos: by default 10 boos in the SMW preset, 8 boos in the SMM preset
booRadius: size of an individual boo
booFrameTime: ticks spent per animation frame
booSpacing: distance between individual boos in degrees.
angle: starting angle of the circle

BooCircle functions:

BooCircle:kill()
BooCircle:delete()

Notes;

If you want to use killable SMB1-style boos, copy the effect-94.png file into your graphics folder. This replaces the SMB3 boo death animation.

Re: Circling Boo Buddies API

Posted: Sat May 14, 2016 12:32 pm
by snoruntpyro
Woah, this is super neat! This'll be amazing for ghost house levels.

Re: Circling Boo Buddies API

Posted: Sat May 14, 2016 1:29 pm
by Kevsoft
You might want to add this to the PGE Wiki.

Re: Circling Boo Buddies API

Posted: Sun May 15, 2016 2:41 pm
by Willhart
This looks great. I like how customizable it is.

Re: Circling Boo Buddies API

Posted: Mon May 16, 2016 4:32 pm
by S1eth
Added this to the PGE wiki: http://wohlsoft.ru/pgewiki/BooBuddies.lua

Also applied some bugfixes. (mainly hitboxes)
If anyone downloaded this, please update to the latest version.

Re: Circling Boo Buddies API

Posted: Mon May 16, 2016 11:31 pm
by PROX
well this is very useful to me :P Expect to see this in my episode

Re: Circling Boo Buddies API

Posted: Tue May 17, 2016 7:33 pm
by Alagirez
Oh yes finally i can make a circling boo gimmick with this. I will use this later.

Re: Circling Boo Buddies API

Posted: Wed Jun 08, 2016 2:01 pm
by S1eth
Version 1.0.2 patch notes:

Boo Buddy Circles will now be drawn even when the game is paused.

Re: Circling Boo Buddies API

Posted: Sat Jun 18, 2016 12:49 pm
by PixelPest
I just came to the realization, could something similar to this be used for rotating coin circles?

Re: Circling Boo Buddies API

Posted: Sat Jun 18, 2016 12:54 pm
by Quantix
PixelPest wrote:I just came to the realization, could something similar to this be used for rotating coin circles?
Now that you mention it, that's a great idea!

Re: Circling Boo Buddies API

Posted: Sat Jun 18, 2016 1:07 pm
by PixelPest
Quantix wrote:
PixelPest wrote:I just came to the realization, could something similar to this be used for rotating coin circles?
Now that you mention it, that's a great idea!
Thanks! Rotating platforms would be super cool too

Re: Circling Boo Buddies API

Posted: Sun Jun 26, 2016 9:28 pm
by Sambo
S1eth wrote:Version 1.0.2 patch notes:

Boo Buddy Circles will now be drawn even when the game is paused.
How did you do that?

Re: Circling Boo Buddies API

Posted: Mon Jun 27, 2016 4:39 am
by Kevsoft
Sambo wrote:
S1eth wrote:Version 1.0.2 patch notes:

Boo Buddy Circles will now be drawn even when the game is paused.
How did you do that?
Putting rendering-code into the onDraw event, which is called even if you have your game paused.

Re: Circling Boo Buddies API

Posted: Sat Jul 16, 2016 11:12 am
by Westretroman
I can't get this working, I dunno how to even get the boo circles to spawn.

Re: Circling Boo Buddies API

Posted: Sat Jul 16, 2016 11:35 am
by PixelPest
Westretroman wrote:I can't get this working, I dunno how to even get the boo circles to spawn.
Read the example and documentation

Re: Circling Boo Buddies API

Posted: Tue Jul 19, 2016 10:19 pm
by Westretroman
PixelPest wrote:
Westretroman wrote:I can't get this working, I dunno how to even get the boo circles to spawn.
Read the example and documentation
Already did that, got confused and stuck.

Re: Circling Boo Buddies API

Posted: Tue Jul 19, 2016 10:25 pm
by PixelPest
Westretroman wrote:
PixelPest wrote:
Westretroman wrote:I can't get this working, I dunno how to even get the boo circles to spawn.
Read the example and documentation
Already did that, got confused and stuck.
It says in the documentation and shows exactly how to do so as well in the example. It's the booBuddies.create() function

Re: Circling Boo Buddies API

Posted: Tue Jul 19, 2016 10:30 pm
by Westretroman
PixelPest wrote:
Westretroman wrote:
PixelPest wrote: Read the example and documentation
Already did that, got confused and stuck.
It says in the documentation and shows exactly how to do so as well in the example. It's the booBuddies.create() function
How the heck do I use the create to spawn it in SMBX? do I need to use a separate lua file?

Re: Circling Boo Buddies API

Posted: Tue Jul 19, 2016 10:31 pm
by PixelPest
Westretroman wrote:
PixelPest wrote:
Westretroman wrote:
Already did that, got confused and stuck.
It says in the documentation and shows exactly how to do so as well in the example. It's the booBuddies.create() function
How the heck do I use the create to spawn it in SMBX? do I need to use a separate lua file?
Read. The. Documentation. I just told you to use the booBuddies.create() function. Look at the arguments in the documentation. Look at the example

Re: Circling Boo Buddies API

Posted: Tue Jul 19, 2016 10:38 pm
by Westretroman
PixelPest wrote:
Westretroman wrote:
PixelPest wrote: It says in the documentation and shows exactly how to do so as well in the example. It's the booBuddies.create() function
How the heck do I use the create to spawn it in SMBX? do I need to use a separate lua file?
Read. The. Documentation. I just told you to use the booBuddies.create() function. Look at the arguments in the documentation. Look at the example
Just read it, and I still don't understand. Is there any EASY way to explain this.