#Mico GBS Plugins

2503 messages · Page 3 of 3 (latest)

unreal haven
#

@rocky prairie Are your hud tiles part of the common tileset?
Also when you submap to the overlay, it will also copy the palette slot of the tiles,
So if all your tiles in the hud are using palette 0 (from what Im seeing in your screenshot) then they'll use whatever color is in palette 0 in your main scene.

rocky prairie
#

No, they arent. I'll add them to the common tileset

#

Thanks!

#

The difference might be negligible, but.

#

would drawing the overlay using text only, ando modifying the font files be more efficient (CPU wise) or is it just about the same

unreal haven
#

No that would be more intensive

#

drawing the tiles in the tileset VRAM is more costly than just updating the overlay's tilemap via submapping

rocky prairie
#

understood, thanks!

rocky prairie
#

Was just about to compile and got this error

#

I did rearrange the common tileset and the metatile scene

#

But it would usually give me the mismatch coordinate, I don't remember ever getting this error.

unreal haven
#

wow, did your build usualy take that long to make?

rocky prairie
#

Not really, a minute at most on linux

#

2 on win

#

I reverted back to a previous build.

unreal haven
#

The issue here is that its taking more than 1 minute to run the event

#

I guess they added a timeout for plugins

rocky prairie
#

I'm not really sure what I did to cause that, I just rearranged the tile set.

rocky prairie
#

All good now.

forest skiff
#

Hey, I'm pretty new to the plugin, but how do I get a Metatile ID on the Metatile Plugin? And do I have to use the “Get Metatile at position” input for each tile I want to place that needs a Metatile? Sorry, I can’t seem to figure this out

#

(To be honest, a full-fledged tutorial would be very much appreciated, but I feel like that's too much to ask)

forest skiff
#

Also, I can't see the "Assign Metatile command"

somber spruce
# forest skiff Hey, I'm pretty new to the plugin, but how do I get a Metatile ID on the Metatil...

'Get Metatile at position' isn't an input, it's how you find out the ID of a metatile at a specific position.

If you want a metatile to do something, the most basic way is to first 'Get Metatile at position' (the specific position you want to check), and then use a Switch to run events conditionally based on the returned metatile ID.

I recommend checking out the demo files that come with the plugin.

forest skiff
#

Oh, thx!

unreal haven
#

Updated all my plugins for 4.2.0 Beta3 for those that keep up with the current beta.
Still not updated on the plugin manager but if you get it from my github its updated for Beta3.

#

Also added a new onCollision event for metatiles, making the process more generic

rocky prairie
# unreal haven

Is there a way for a projectile to trigger this collission event?

unreal haven
#

No thats for the player only, if you need the projectile to trigger on collision that would be via the custom projectile plugin where you can run scripts when the projectile dies

#

Like you were probably already doing

rocky prairie
#

haha yeah.

#

I was just thinking, that would make the whole process much easier.

somber patio
#

So I'm taking another shot at this (Have plenty off backups now) and I'm still getting the error. I added some generic symbols to my tileset and changed a background to include them. Any thoughts on what's happening?

unreal haven
#

Make sure you have the common tilesets are set for both grasstileMeta scene and ScrollFieldOdd scene.

somber patio
#

Double checked and they are. The common Tileset button is on and it's set to the Tileset I have in the Tileset folder

#

Only change I made was adding that 5x5 square if symbols to the Tileset, the meta BG, and the Scroll scene BG

unreal haven
#

Which version of the plugin are you using

#

the 8x8 tile or the 16x16 tiles version?

unreal haven
#

If you are using the 16x16 tile version then your scene is wrong, because the scene is split in 16x16 tiles so each 16x16 tiles need to match a 16x16 metatile in the metatile scene

#

@somber patio

#

When you are making your scene using this plugin, I highly recommend using something like Tiled and use the metatile scene as a 16x16px tile tileset to build your main scenes. That way you wont end up with unmatched tiles.

somber patio
#

Ooh gotchya. I'll take a look at this and move things around. Thanks!

somber patio
#

Fixed it. Thanks Mico!

somber patio
#

What I'm trying to do now is add a minimap underneath the HUD. It's all working well except for the Up and Down screen transitions, since it's a 20x22 bg instead of a 20x16. Is there something I can adjust in the scene_transtion.c file that would allow the scroll to act similarly to how it does standard (essentially ignoring anything below Y=16 for the up and down transitions)?

unreal haven
#

Your scene cant be taller than 18 tiles, Your hud is going to be in a separate scene and will need to be submapped to your overlay from that scene.

somber patio
#

I've got a seperate scene hud submapped to the overlay. Maybe you'll have an idea here, I'm trying to best implement a minimap that you can all up. My thinking was to essentially hide it behind the hud and more the camera. But, trying to fit 3x3 in there has set the bg to 20x22. I certainly wouldn't mind a map on the hud itself, but I'm looking to call the tiles from a seperate map to tileswap.

unreal haven
#

the minimap could be hidden within below the hud itself, then you can just pull the hud up further to expose the minimap

#

Just like how Link's awakening does for dungeon minimap

somber patio
#

Would it be possible to put filler tiles in there to swap them with the larger map? Or would all the map tiles need to be in the common tileset?

unreal haven
#

Yes you can put filler tiles in there if you want, its no different than if it were done on the background.

somber patio
#

Oh really? Apologies if this is well know knowledge, but how would I swap tiles from another scene to the overlay?

unreal haven
#

You use the the "Copy scene submap to overlay" event from the submapping plugin to initialze your hud (which Im guessing you are already doing) And you can use the gbvm operation VM_REPLACE_TILE or this plugin https://github.com/Mico27/gbs-replaceTilesetTilesPlugin to replace the filler tiles to whatever tiles you want.

somber patio
#

Cool, I'm getting this set up, very hopeful. Though I'm getting this error when trying to use the plugin.

unreal haven
#

Oh you arent using 4.2.0 Beta3?

somber patio
#

Oh I'm on 4.2 Alpha0. I'll update

unreal haven
somber patio
#

Amazing. Thanks!

#

More of a general question I think, but maybe you have insight, do you know what this error is about when I try to compile on Beta3?

unreal haven
#

Did you have an ejected engine? Did you update your plugins?

somber patio
#

Engine wasn't ejected but I didn't do any plugin updates.

unreal haven
#

Released the extended scene stack plugin. (Requires GBStudio 4.2.0 Beta3)
This version wont work with the metatile plugins, I am currently working on implementing it within the metatile plugins as a togglable feature. (so that it doesnt take up space if its not used)
https://github.com/Mico27/gbs-SceneStackExPlugin

GitHub

Extended Scene stack plugin for GBStudio. Contribute to Mico27/gbs-SceneStackExPlugin development by creating an account on GitHub.

unreal haven
#

The metatile plugins got updated with the extended scene stack support (The example projects makes use of them for reference)
The SceneStackExPlugin also got updated with a fix with a saving/loading bug.
https://github.com/Mico27/gbs-MetatilePlugin
Also added a new plugin that add an extended version of the overlay move to event which allows pixel position and custom movement speed in subpixels.
https://github.com/Mico27/gbs-OverlayMoveExPlugin

GitHub

Metatile plugin for gbstudio (version 16px and 8px) - Mico27/gbs-MetatilePlugin

GitHub

GBStudio plugin that add a move extensive overlay move event - Mico27/gbs-OverlayMoveExPlugin

lusty kraken
#

I was browsing the new Plugin Manager and I see this message a lot:

Any other plugin that modifies any of these files will not be compatible with this plugin unless the files are manually merged.

What does this mean exactly? I feel like I've used plugins together in the past that modify the same section without doing anything special.

unreal haven
#

engine plugins replaces engine files. If more than 1 plugin replaces the same engine file, only one of the two will override it. So it will break the functionality of whichever plugin's engine file got overriden by the other plugin.

spare hornet
young prism
#

Even if you make your tiles to work as 16x16, the game still processes everything in 8x8. Even Mico's metatiles

#

I just use a 256x256 canvas with a 16x16 grid

spare hornet
#

Right, but how do you populate that grid? Surely you don't manually copy and paste all your unique 16 x 16 tiles, right? (I swear I'm not trying to be stupid, genuinely looking for an efficient solution)

unreal haven
spare hornet
#

Perfect! That's exactly the thing I was looking for

young prism
#

I just make it myself

hazy notch
#

hey, trying to figure out the easiest solution to a problem I've run into with the Edit Active Actor Index plugin - I'd like to remove it, I don't need it, but if I delete the plugin folder no actors load into a scene. I refreshed assets and emptied the build cache, deleted folders for a fresh recompile etc, but no dice. I am not really surprised that it would affect something important with the sprites tbh, but I can't find any remaining uses of it in my scripts or prefabs. Any easy way to look for remnants or scrub it from the project? if no that's no biggie

#

using 4.2.0-alpha btw

unreal haven
#

Removing the folder should revert to the default behavior, the issue is probably elsewhere, do you have any other plugin or an ejected engine?

hazy notch
#

went and looked and Kirby's Render Projectile Above Actor plugin was in there; deleted it and it solved the issue. Which sucks because it was all working together before deleting the Edit Active Actor.... and I do want that one if possible angryboy .... welp I'll play around with it

Thank you very much for the help; I really appreciate how much you do for the GBS community!

glacial locust
#

my project was working perfectly fine moments ago, but now it's refusing to boot and i always get this error. these are the plugins i had installed. i tried removing some temporarily, but the problem still persisted even when i stripped it down to solely metatiles. is there anything i can do? i'm on the latest supported version.

unreal haven
#

weird, it looks like you have the file that overrides the interrupt.c file which is only in the scree scroll version of the metatile plugin

#

Can you open the metatile16Plugin folder to see whats in it

glacial locust
#

which folders should i check?

unreal haven
#

engine/src/core

glacial locust
unreal haven
#

yeah it looks like you have a weird mix of the screenscroll version and the normal version of the metatile plugin

glacial locust
#

should i try deleting it and reinstalling the plugin?

unreal haven
#

Yeah delete the whole MetaTile16Plugin folder and redownload it

#

Just to confirm, its the screenscroll version or the normal version of the metatile16 plugin you wanted?

glacial locust
#

it works fine now

#

and yeah i wanted to use metatile16

#

i don't know how i managed to mix up the plugins tbh

#

thanks anyways

spare hornet
#

Hey Mico, there's a conflict between Fade Street and the Screen Scroll plugins. It's funny because wayyyy back in September 2024 you graciously modified the plugin so they'd work together. The funny thing is, I see now you manage the Fade Street plugin 😂 (I think?)

I tried to find the old messages because you explained what specifically was in conflict and how I could fix it, but couldn't find it in the search...

I really appreciate your patience, I'm sure with the update out you must be very busy

#

I only have the two plugins, no others. This is what the debugger says before cancelling:

#

Each plugin works individually, but when combined they don't. Let me know if you need more info :) (thanks again)

young prism
#

Something appears to be using an outdated variable name

unreal haven
#

No, scene_stack_count was added by the metatile plugin, the issue is that its added in data_manager.c which is also overriden by the Fade street plugin

young prism
#

Ahhh

unreal haven
# spare hornet Hey Mico, there's a conflict between Fade Street and the Screen Scroll plugins. ...

Here I uploaded the merged version of the two conflicting files, just replace those in the fadeStreet plugin folder
https://github.com/Mico27/gbs-fadestreet/tree/main/FadeStreetScreenScrollMetatilePluginCompability/engine/src/core

GitHub

Fork of fadestreet, a plugin for gbstudio for color palette animations - Mico27/gbs-fadestreet

spare hornet
#

Thanks!!

#

Your speed is very appreciated :) I can't thank you enough!

#

While I'm here, I should tell you that I ran into issues with the pointnclick and shmup state files. I don't need them for my project so the solution for me was just to delete them, but in the interest of sharing, here is what the debugger said for both:

unreal haven
#

Yeah thats already fixed, I fixed it a day after 4.2 came out.

spare hornet
#

Oh, whoops

#

Well, thanks again!

hoary zodiac
#

Hello, I'm trying to compile a project using the ScreenScroll plugin (not the MetaTile16 one) in GB Studio 4.2.1, but it seems that it's not compatible with the new engine version, as it throws a bunch of errors. Is there any solution for this, or are there any plans to update it for the new version of GB Studio? Thanks in advance.

sour shoal
unreal haven
sour shoal
unreal haven
#

that would be 1

sour shoal
#

Tried compiling your example project. It gave me errors.

sour shoal
#

@unreal haven There seems to be a confliction between the configloadsave & scene stack ex plugins in my project.

Linking...
?ASlink-Warning-Undefined Global '_scene_stack_count' referenced by module 'load_save'
?ASlink-Warning-Undefined Global '_scene_stack_count' referenced by module 'vm_scene'
1
Cancelled Build

Warnings:
?ASlink-Warning-Undefined Global '_scene_stack_count' referenced by module 'load_save'
?ASlink-Warning-Undefined Global '_scene_stack_count' referenced by module 'vm_scene'
1

unreal haven
#

Yeah they arent compatible because they change the same engine file load_save.c
You can just delete the load_save.c file from the scene stack plugin.

sour shoal
unreal haven
#

Can you list all the plugins that you are using?

sour shoal
unreal haven
#

You dont need the SceneStackExPlugin since its already integrated in the MetaTile16Plugin

#

And the ConfigLoadSavePlugin wont work with the metatile plugin unless you do some manual file merging.

sour shoal
unreal haven
#

You dont need to store the engine field in variables to use them, you can compare the engine field directly

sour shoal
#

@unreal haven Is ConfigLoadSave still needed for Metatiles in 4.2. Also my platformer has large scenes for levels.

unreal haven
#

No its not needed, you can just use the normal GBStudio load/save

sour shoal
#

@unreal haven I removed the ConfigLoadSave plugin from my project. Gives me the same errors

"?ASlink-Warning-Undefined Global '_scene_stack_count' referenced by module 'load_save'
?ASlink-Warning-Undefined Global '_scene_stack_count' referenced by module 'vm_scene'
1
Cancelled Build"

What am I doing wrong? I need help badly

unreal haven
#

what are all the plugins you are using now?

unreal haven
#

the spritesheetchangebufferplugin is the problem, it changes the data_manager file which is in conflict with the metatile plugin

sour shoal
unreal haven
sour shoal
glacial locust
#

Is there a way to disable background priority with uiAltDisplayTextPlugin? because this is an issue for the kind of minigame i'm making, where the stats display in the background and sprites can overlap with it.

unreal haven
#

its the same as without using the plugin. Create a gbvm event with
VM_SET_CONST_UINT8 _overlay_priority, 0
text written after that wont have tile priority on it so sprites will display over it.

glacial locust
#

thank you, i'll try this later!

#

do i place the script with the setup scripts or before writing the text?

unreal haven
#

Sure it can be in a setup script as long as its set before writting any text

glacial locust
#

got it!

torn lichen
#

hi first time using the MetaTile8Plugin, i downloaded it from github and GB studio is up to date, everything is set like the readme file and i got a kernel panic :(

am i doing something wrong?

unreal haven
#

@torn lichen check your metatile settings
The main scenes must respect the dimensions described as such: (the width in tiles rounded to the upper power of two) x (the height in tile) must not exceed the maximum map size configured in the settings (width x height) cannot exceed (8px version) 7936 bytes/tiles (256 bytes are used for dynamic collision data, ex: 255 x 31 in 8px tiles) / (16px version) 7168 bytes/tiles (1024 bytes are used for dynamic collision data, ex: 127 x 56 in 16px tiles).

For example, in your screenshot, the scene is 85 x 39. So the upper power of two of the width for that is 128. 128 x 39 is 4992 bytes/tiles so you are within the limits. You then go in the metatile settings and put scene max width to 128 and max height to 39.

Now that I think about it, I might just remove that setting in the next update and always reserve the maximum size since I changed where save data is put now instead of sharing the same SRAM bank as the metatiles.

unreal haven
#

I updated the metatile plugins so now its not needed to specify the max scene width/height in settings, also added scene size validations in the load metatile event with a more verbose error message.

sour shoal
unreal haven
#

Are you updated to 4.2.2?

torn lichen
# unreal haven I updated the metatile plugins so now its not needed to specify the max scene wi...

oh wow i didn't thought my issue was going to spawn an update 😅 , huge thanks for the explanation and the update! it works as intented but now i have another issue

when i try to use the fadestreet plugin with the meta tiles it gives me a multiple definition warning and when i tried to use the fadestreet screenscroll meta tiles it seems that it doesnt find the screen_transition.h

are these errors because of compatibility issues or because i'm doing something wrong? please let me know ^^

unreal haven
torn lichen
#

ooh i see, but the thing is that even using the normal metatile plugin it gives me errors

unreal haven
#

You sure you didnt accidentally install more than one of the version of the metatile plugin? check your plugin folder @torn lichen

rocky prairie
#

I was wondering if you had any pointers or examples on how to do an enemy movement event. MIne keep having issues.

torn lichen
unreal haven
#

oh yeah, the fadestreet screenscroll metatile plugin compability is just for that version.
Gimme a moment I'll make a version for the metatile8 plugin

torn lichen
#

nice! so that's why i got those errors i thought that fadestreet had already compatibility with metatile8

#

also another thing that i almost forgot, when i used the metatiles, for some reason these tiles dont flip, i have the automatic flip enabled

rocky prairie
#

is that a little 8x8 X?

unreal haven
torn lichen
rocky prairie
#

Love it.

torn lichen
#

thank you, i want to have a little more stuff so i can show progress
rn i only have the simple movement, shooting and charging

loud owl
#

Is it OK to use the Super Mario Bros mini custom actor plugin in my game?

unreal haven
#

Sure, feel free to use whatever from it

loud owl
glacial locust
#

hey, i'm wondering if you ever have plans to make an updated version of this for the newest version. i really would like to use a trailing script like this for my project, but my version doesn't support it.

rocky prairie
#

Hi, This might be on my end, but I came across a weird issue.

#

I have it so that opening the door changes the three tiles behind it

#

but, it always defaults to changing the tiles at some other random point

#

I've moved it to show where the metatiles change, instead of where they're supposed to

#

They show up in the same X coordinates regardless of where I put the door.

unreal haven
#

whose tile x coordinate its taking from? looks like it might be an offscreen door gate position used making the door appear at its screen warped position

rocky prairie
#

Let me check exactly.

#

I see my mistake now. I deactivated the actor first.

#

So, it takes the position of the actor after it's been deactivated I'm assuming.

#

Thanks!

#

Hmm weird

#

I removed the deactivate actor event entirely and it still does the same

#

I might have messed something up with my plugins, I'll check.

rocky prairie
#

It's odd, I'ts only the X coordnates that are wrong,

#

The Y coordinates area actually correct.

unreal haven
#

Put a breakpoint on your script where it assign the metatiles for the door, look at the gbvm in the debugger and look from which actor Idx it is taking the X position

rocky prairie
#

WIll do

#

It's taking it it from this one

#

The morph ball

#

But I have it set to self.

#

It's definetly that actor, But it's odd. When I shoot the door and go frame by frame, I can't see the script on the door's on hit 3

#

It starts an empty thread it seems

#

Yeah, tried it again, when I shoot the door, an empty thread shows up in the debugger.

rocky prairie
#

Ended up saving the values on variables

mossy star
#

Has anyone experimented with saving scenes that have altered metatiles? From what I've read it seems possible, but a bit beyond my skill set.

rocky prairie
#

Why does this happen?

#

If I have this script on INIT

#

The graphics are messed up

#

For a second when a new scene loads.

#

But if I disable that script, no problems

young prism
#

If I had to guess it would be a ram overflow

torn lichen
# rocky prairie

seems really weird, you checked if the fade in/out events? if it's in instant and if you aren't using common tilesets it can look glichty

torn lichen
unreal haven
#

There some big things in the work for plugins combability in the next GBStudio update, I should have something soon after then.

torn lichen
#

i've seen what you shared about that, im exited! thanks for letting me know ^^

rocky prairie
# rocky prairie

Oh btw, sorry about the text on the second room, It's a joke meant for my brother.

loud owl
mossy star
#

is there a method for animating a metatile?

unreal haven
# mossy star is there a method for animating a metatile?

You can have animated tile (like animated water/waterfall/flower) the same way as before, but the technique is a bit different, since GBStudio default Replace tile at position, it will try to get the id of the tile at the position to know which tile in the tileset to change. But since the metatile changes the id for the metatile idx instead of the tileset tile idx, then it will not change the correct tile in the tileset.
The other technique to achieve that is by using GBVM with VM_REPLACE_TILE Or you can use this plugin https://github.com/Mico27/gbs-replaceTilesetTilesPlugin which implement VM_REPLACE_TILE in a usable event.
Unless you mean animating tiles separately, then you'll need to create a metatile for each animation frame and use the replace meta tile event (but that will be more ineficient if there are many tiles at once)

Alternatively it could be a mix of both! Like having a tile that represent a character that can walk, you can have a metatile of the character idle state, and one metatile of the character walking state.
Then you use the replace meta tile event when one character change between states and have a timer that replaces the walking state metatile's tiles to animate the walking for all characters that are in a walking state.

GitHub

Load to the VRAM tileset using a tileset (instead of a background) - Mico27/gbs-replaceTilesetTilesPlugin

green stream
#

I'm officially a convert to this metatile idea. I had been struggling and frustrated when trying to adapt my old scenes to work with metatiles.

This week I started working on a new section of the game. I built these new maps and background tiles with the metatiles in mind, and everything is so much smoother. It feels awesome to make a map in Tiled, drop it into a new scene, and then be done. No more repainting the scene every time I update the background image. No more weird bugs because I accidentally added collision to a scene while dragging things around.

I just wanted to say thanks. It's a cool tool now that I'm getting the hang of using it.

somber spruce
#

It's crazy how streamlined level design becomes once it's all set up.

somber spruce
#

On the offchance someone might find these useful, here's a cheat sheet I made for the 16px metatile values.

It's sized at 256x256 pixels, so you can lay it directly over the metatile scene (e.g. in a graphics editor) and quickly find the value you need. I made it in two different colours, the purple is a bit more legible.

mossy star
mossy star
#

Can I have metatiles that the are same but use a different palette?

#

Or do they all have to be unique

#

And is the 256 metatile maximum for both the metstiles16 and metatiles8?

unreal haven
#

No each metatile has a palette idx assigned to it, so if you want a metatile with a different palette idx, you create a new metatile with it.
Also if you do that, you'll have to make sure you have the "must match color attribute" checkbox checked in the load metatile event and you have to color you main scene to match the metatile scene so that it can find which color metatile to use.
Also 256 metatile maximum for both yes.

mossy star
#

Awesome thank you!

mossy star
#

Is it possible to use metatiles8 and metatiles16 in the same project? In different scenes, obviously

mossy star
#

@unreal haven forgive me if this is inappropriate, but I was curious to know if there was a chance I could commission a version of the metatile8 plugin that is able to save the metatile data changes to the scene - if that's something you think is possible?

unreal haven
mossy star
unreal haven
#

I'll see what I can do

sweet zenith
#
1```

I get this error when trying to compile a build with Screen Scroll, any insight? I don't know what this means, and I searched 'current_text_layer' in the Discord with no results
unreal haven
#

Are you using some other plugins

sweet zenith
# unreal haven Are you using some other plugins

yes,

  • mikeliesz's Invert Background Fill plugin
  • your UIAltTextDisplay plugin, the replaceTilesetTiles plugin, and SubmappingEx
  • pautomas's AdvancedMenu plugin
  • two custom plugins for SpellData to RAM and WeaponData to RAM
    could that be the problem?
unreal haven
#

probably the Invert Background Fill plugin or AdvancedMenu plugin, whichever is editing the vm_ui.h file

sweet zenith
distant pond
#

AdvancedMenu doesn’t modify the engine so might be the other one

sweet zenith
#

should I try uninstalling + reinstalling GB studio?

sweet zenith
#

ah it worked once I switched scene type to Adventure mode and then back to Top Down 2D

green stream
#

Is it possible for me to combine elements of the 8x8 meta tile plugin and the 16x16 screenscroll plugin to create an 8x8 screenscroll plugin?

I think I could use it to solve some scripting challenges I've been having.

unreal haven
#

I already made it possible to combine the 8x8 metatile plugin with the screenscroll plugin but that needs the new plugin patching feature which will be available when chris decides to release 4.2.3.
(in fact when thats gonna be released, all my plugins will be compatible with each others, so merging plugins manualy wont be necessary anymore)

green stream
#

That's awesome!

#

I haven't tried the 8x8 plugin yet. Should I expect any hit to performance due to the increased number of meta tile events being triggered?

This was a dumb question, or at least something I can find my own answer for. I'll set up an 8x8 version tonight and see how it does.

somber spruce
#

Regarding 'commit render' needing to be checked or unchecked when setting a metatile, I'm finding that some tiles which are located just offscreen will not be rendered once they do appear onscreen. Is there some sort of 'buffer zone' outside the screen edge where 'commit render' should still be checked?

(I'm still on 4.1.3 btw, can't update or I'll lose some plugin support)

#

This is for 16px metatile, non-scrolling

unreal haven
somber spruce
#

Ah ok that's heaps! Thanks

bronze rover
#

does the metatile plugin support setting collision to an 8x8 tile?

#

nevermind, I just looked at the git for it. will try it out to answer my own question :)

rocky prairie
#

I have a monochrome project, and for whatever reason. It's taking AGES to compile, around 6 to 7 minutes. The only plugin I'm using is the metatile 8x8 plugin And I haven't even included any metatile events.

#

Could there be a reason for that?

#

This is the barest bones version of the project, only 1 BG and the metatile scene.

#

If anyone else that has used the 8x8 metatile plugin has any tips, i'd appreciate it.

rocky prairie
#

I think I can kind of confirm the metatile plugin on monochrome it's what's causing the project to take so long to compile

#

I disabled the load metatile event, it compiled way faster

unreal haven
#

Shouldnt have anything to do with the fact that you are on monochrome, if you have a slow pc and depending the size and amount of your scenes compiling the metatiles with the load metatile event may take a while.
And like everything else, the first time you compile it needs to compile the engine so that will always take long the first time or when to edit the settings.

rocky prairie
#

Problem is, this is the only metatile project that takes this long

#

Sent it to 2bitcrook and he seems to be having the same issue, with this project in particular.

#

My compile times on other metatile projects are fine. Which is why I'm baffled.

#

And yeah, you're right, monochrome has nothing to do with it, I tried enabling color..

#

Could I trouble someone here to try compiling that project

unreal haven
#

If you can send me the project I can try to figure out what might be different causing the problem

rocky prairie
#

Absolutely, one second

#

It hangs for a very longtime on ''COMPILING EVENTS

unreal haven
#

@rocky prairie Ok I figured out the issue, with the way your metatiles are layed out, it needs to traverse the whole metatile sheet to find matches for tiles that are used a lot in the scene.
I added a counter to see how many iteration it was doing to do the metatile match and it was reaching 946750 iterations.
I did a test by moving the most used tiles in the background (the plain white/grey/black tiles) that were at the end of the metatiles and put it at the start and that reduced it to 124609 (thats about 86% reduction of compile time)
It could probably be optimized to compile faster by checking which tiles are the most common in the main scenes and priorize placing them early in the metatile sheet

#

just doing that many iterations should'nt take that long, but the way custom plugins are implemented in GBStudio their speed performance is gimped by the QuickJS sandbox (see chris comment)
https://github.com/chrismaltby/gb-studio/issues/1966

GitHub

Its been reported to me a few time for one of my plugin that they hit the 1 minute timeout that was set on plugin compilations Mico27/gbs-MetatilePlugin#5 This one can be particularly long to compi...

rocky prairie
#

I see, so I should place the tiles that repeat the most first, and the ones that aren't that common after those?

unreal haven
#

yes, if you want to optimize compile time thats what you'll have to do.

rocky prairie
#

Btw thank you for taking the time to answer.

#

I'll give it a shot then. Thanks!

rocky prairie
#

From six mins to half a minute ain't half bad. @unreal haven Thanks!

rocky prairie
#

I'll try and make a tool that tells you which metatiles are used the most and sort them in descending order. That should help compile times for big projects.

unreal haven
#

that would make it constantly only do only 5590 iterations (in the case of your scene size)

#

I'll whip something up later and do some tests with the project you gave me

unreal haven
#

ok yeah, dunno why I didnt use lookups before, this will help for scaling projects without having huge compile times

#

gonna push the changes in a moment

unreal haven
rocky prairie
#

Holy smokes.

#

This is my biggest project.

rocky prairie
#

Does having multiple, ON METATILE COLLISION/ENTER instances slow down the game? Are these done on update?

unreal haven
#

Its just like register on input, you can have one per directions. Obviously if you add more directions, will check more directions at a time, thus using more computation time. these are checked in the scene type code every frame.

rocky prairie
#

Understood! Yeah, we switched to 16x16, because having each corner of the coin tile have a script on enter made the game chug,

unreal haven
rocky prairie
#

WIll try it!

rocky prairie
drifting harbor
unreal haven
#

No it would require some changes. There's a new patching system coming in the next update that will fix these compatibilities issues. So you'll either have to fix the compatibility yourself by removing any reference to the screen scroll plugin in it or wait for the next GBStudio update .

drifting harbor
#

If I need it before then, I will manually patch, thanks

rocky prairie
#

I was having an issue, where power ups would spawn off if I hit the right side of the 16x16 tile

#

It's sort of hacky and I think it might break but this is how I fixed it.

#

This way, even if I hit the right side of the block, it ''snaps'' back to the correct spot.

#

Is there another way to make the 16x16 tile collided represent the whole tile and not one of its quadrants?

rocky prairie
unreal haven
#

yeah this is fine, if you dont care about which 8x8 position of the collision you collided with and always want the 16x16 position then that works.

sour shoal
rocky prairie
mossy star
#

I'm remaking my project in the latest version of gbstudio.

I'm using metatiles16sidescroll and submappingEX.

Previously, I had no problems submapping from another scene (it works here too) but when trying to submap metatiles to restore the scene to its original metatiles (removing the submapping) i'm having some issues.

the submap metatiles doesn't seem to be selecting the correct metatiles i'm trying to restore, and it will only render 1 tile worth of height regardless to what I have the number set to.

any thoughts?

unreal haven
#

Can you show the script that restore your scene

mossy star
#

it's the same method I used in 4.1

unreal haven
#

yeah looks like Im able to reproduce the issue, I'll fix it real quick

mossy star
unreal haven
mossy star
toxic knoll
#

Just wanted to say that I appreciate scene scroll plugin so much, couldn't be easier to use and got it working without an issue in under two minutes.

mossy star
#

I'm noticing a bit of an elastic effect when traveling from neighboring scenes up/down, but side to side seems fine. Any ideas?

unreal haven
#

Also can you show your settings

mossy star
# unreal haven Also can you show your settings

Hah, it was the bottom margin setting. I didn't know that was a thing, I adjusted it to 2 and it's fine now.

Now I'm just trying to work out my sub mapping on neighboring scenes since the coordinates are a bit different depending on the direction

unreal haven
mossy star
unreal haven
mossy star
#

learned something new today! thank you!

mossy star
#

is there any way to submap something to the background of a scene that is using metatiles from a scene that is not from the metatile scene?

unreal haven
#

If you are talking about the non-metatile submapping, it should work normaly as long as both scenes have the same common tileset

mossy star
mossy star
mossy star
rocky prairie
young prism
#

Though, instead of metatiles, you'd want to alter the tileset itself

mossy star
mossy star
young prism
young prism
mossy star
mossy star
#

Can the replace tileset tiles plugin replace using 16x16 or is it strictly 8x8

young prism
#

Strictly 8x8

mossy star
#

How do you guys keep track of the IDs of your metatile tiles? That's the biggest thing holding me back lol

young prism
#

I just keep track of it from my metatile scene...

mossy star
# young prism I just keep track of it from my metatile scene...

I have a fair bit of blank tiles in my metatile scene because I've been leaving space for new assets which throws me off because those duplicate tiles throw off the tile id for everything afterwards 😅

Is there a way to make duplicates have seperate tile IDs?

young prism
#

Use unique placeholder tiles :/

bronze rover
#

does the metatile plugin have a version that works with GBS 4.1.3?

young prism
#

All of it

mossy star
#

i just attempted a quick proof of concept test using the replace tileset tiles to swap out some metatiles in my metatile tileset, but ended up with this error:

BankPack: ERROR! Area CODE, bank 255, size 16386 is too large for bank size 16384 (file /var/folders/cw/w9lvfkvn2wx00rzfw603zygr0000gn/T/_gbsbuild/obj/tileset_swaptest.o)
?ASlink-Error-<cannot open> : "/var/folders/cw/w9lvfkvn2wx00rzfw603zygr0000gn/T/lcc53360.lk"

I was only trying to swap one new unique tile onto the metatile tileset, i must be doing something wrong lol

unreal haven
#

The tileset you are using to swap tiles is too big

mossy star
#

does it swap the entire tileset?

unreal haven
#

No, it has to store the tileset in the ROM when compiling so that you can actualy use it

#

and it exceeds the max size of a ROM bank

#

I'd suggest splitting your tileset

mossy star
#

i used a 256x256 canvas size for the tileset i was swapping from, which seemed to be the problem lol. I reduced the size of the canvas and it worked fine!

unreal haven
#

Yeah its important to optimize your tileset, the compiler wont do it for you.

mossy star
#

Cool, got it working. Took a second though lol. I've successfully swapped tiles onto the tileset - but now I'm trying to figure out the best way to replace these placeholder tiles with blank ones. I don't think I can remove them during the actual process because then it skips over the non unique tiles and messes up the placements.

I'll probably just have to see how smooth I can get a manual tile swap for each monster to look

mossy star
#

I used a palette swap at the start of the tileset changes to hide everything, then set it back after the changes so the placeholder tiles never show. success!

First change is without the palette change, second is with it. There's a little flicker, but in practice it wont be swapping the palette of the entire scene, just the 56x56 area.

thanks for all the help (and patience)!

bronze rover
#

how exactly does the collision setting work? does it require metatiles to be placed first? can I add collision to tiles that were not placed by the metatile plugin?

young prism
#
  1. You can't mix metatiles and regular tiles in the same scene, and metatiles will override everything
  2. set collision in your metatile source scene
bronze rover
#

what does this mean?

Error: Compiling "EVENT_LOAD_META_TILES" failed with error "Error: Cannot find matching metatile for tile at coordinate 0, 0". {"scene":"small game/game","scriptType":"scene"}

young prism
#

There's a metatile which doesn't match any of the metatiles in your source scene

#

Specifically, the first one

bronze rover
#

so I have to make sure that they are in the scene...?

young prism
#

You can only use metatiles which are in your source scene, yeah

#

When you use the "load meta tiles" event, you choose a scene as the source. That scene is different from the one you use it in

bronze rover
#

so then what is the point of "loading" them from a different scene?

#

I'm very confused as to how this all works

young prism
#

Basically, it compresses individual scene sizes by using a reference to an existing meta tile set rather than saving each tile individually

#

When you use the load event, it tells the compiler to replace all "tiles" in that data bank with references to meta tiles, which are significantly less memory-consumptive

#

It does nothing in the editor, but it saves memory in the final compiled rom

#

The "source" scene will have its metatiles compiled to be used as the reference

bronze rover
#

can I be informed as to how this is incorrect?

young prism
#

Can you send a screenshot of the load meta tiles event?

bronze rover
young prism
#

It's because the other tiles in that 'game' scene aren't in the metatile source scene

#

You can't mix and match, you either do all metatiles or no metatiles

#

(per scene)

bronze rover
#

I copied it over from the external to the source though...

young prism
mossy star
#

i'm working on optimizing my metatiles sheet and tileset - to my understanding for metatiles16, the metatile scene itself needs to be comprised of 16x16 tiles, but my tileset can be a map of 8x8 tiles, correct?

young prism
mossy star
#

fantastic. that's what I thought! thank you (again!)

toxic knoll
#

I have the HUD submapped onto the background of Scene 1 - when I scroll to Scene 2 it never initialises the HUD again despite it having the same scripts in scene's INIT as it does in Scene 1.

Any thoughts on how to keep it persistent since its background? Should I copy it to Overlay before changing scene and then disable overlay?

unreal haven
#

If you are using scene scroll, your hud should be drawn on the overlay by submapping it from your hud scene

toxic knoll
#

Gotcha, I'll have to work on it since it's just practice on a LA clone so background HUD was my first thought

rapid ruin
#

Hey Mico how much did you modify topdown.c for metatile and screenscroll?

#

I want to incorporate your plugins but I have already heavily modified topdown.c

unreal haven
rapid ruin
#

Great, thank you! I'll see if I can merge them.

#

Also is there an 8x8 screen scroll? I read that you're waiting for the next GBS to release it widely

sour shoal
#

What does must match color attributes do?

young prism
#

It means the palette data for metatiles in regular scenes must match the palette data for the metatile source scene, allowing for different metatiles to use the same tile data and differing only in color data.

#

But if you don't color your regular scenes, it'll throw an error because it can't find a matching metatile

patent turtle
#

Would it be possible with the "Submapping Ex Plugin" to also copy from Overlay to background ? I want to use the Overlay for a Zeldalike menu but also use Chatboxes. Idea was to copy the overlay on the background and then start the chat. At the end of the dialog i recall the other overlay (hopeful smooth enough that you cant see it 😉

unreal haven
#

No you cant submap something that was written on the overlay on the background, you can only submap from ROM data (ie from the background data)
If you are using the overlay for the hud and need the overlay to display dialogue, you'll have to rerender your hud on the overlay once you're done displaying the dialogue.
Or you can do like what the zelda game does and draw dialogue on the background.

mossy star
#

Is there a setting to increase the speed of the screen scrolling?

unreal haven
mossy star
unreal haven
#

you might also want to increase scroll_player_speed to 32 if you increase the camera speed to 255

mossy star
#

opened a blank project to do some testing with the sidescroll plugin - but it's acting a bit weird? there seems to be no issued going right/down but going left/up disables player movement and doesn't seem to be placing the player in the proper position. I do have round to the nearest tile checked, and i don't see anything weird with the sprite itself.

Any ideas?

#

the settings also seem to be missing some options, like the top scroll ofset for hud

#

I was using the plugin directly from the plugin manager inside gbstudio. just swapped it out with the latest version and its fine lol

mossy star
#

but i am curious to see if there's a way to eliminate this little player flicker when going up. or if not - create it when going all directions. just for consistency lol

unreal haven
#

Not sure what you are doing different, works fine in the example project.

young prism
mossy star
#

no empty frames, i'll have to see if i can figure out why it's happening lol

rapid ruin
#

Hey I'm running into a problem with the overlay where submapping from the BG causes jumbled tiles on the overlay. (When the arrow touches that tile it sets the overlay and copies the BG to the overlay).

#

If I disable the Load Metatiles event on the scene it seems to work correctly.

#

Has anyone else run into this?

unreal haven
#

You cant submap from a background that was converted to use metatile into the overlay, because the ids are changed to metatiles instead of the actual tiles

rapid ruin
#

Ohhh gotcha, that makes sense.

#

Thank you!

rapid ruin
#

Does metatile also incorporate additional custom collision tiles defined in engine.json?

rapid ruin
#

And also collision tile overlap like a ladder over a solid?

unreal haven
#

collisions are the same as without the metatile plugin

rapid ruin
#

Excellent, thank you!

#

Really diggin' your plugin. It's amazing. Thank you.

gentle harness
#

Any idea why the overlay bottom part is like this?

#

This is the initialization

#

(my HUD does not have the scroll animation like in the example in the github, having a reduced size)

#

OH, maybe I know what's wrong

gentle harness
#

Is it using the metatile ids for the current scene (still the overworld) for the overlay tiles from the HUD until it loads the scene completely?

#

But, why isn't it rewritting the numbers and the right part of the scroll?

#

They're also part of the HUD tileset

unreal haven
#

There's a reason why it does a scrolling animation in the example project when it opens the hud, so that it hides the tile glitching when changing tileset for the inventory menu. of course if you remove that it will show the glitching. if you design your own hud and tileset you have to into account these things

unreal haven
#

btw thats not just a metatile plugin thing, thats just tile management on the gameboy in general. if you want to switch view between a set of tiles A into a set of tiles B, you either

  • hide the whole screen (fade out) before changing the tileset (basicaly the most basic method)
  • have a common set of tiles at the same indexes between tilesetA and tilesetB that you display during the transition
#

in my example project its a variation on the second method, of which the tiles for the unscrolled scroll and top of the hud are shared between the main scene and the menu scene,
once the main scene is completely hidden from the overlay which displays the common tiles I load the menu's tileset (changing scene to the menu) then "unroll" the scroll overlay to reveal the menu

#

So by removing the scrolling of the menu, you are exposing non-shared tiles that were supposed to be hidden by it, revealing the glitching from switchinh tileset while old tiles nonmatching to the new tileset are still on screen

drifting harbor
#

Is it possible to have a metatile that is visually identical but has a different ID?

unreal haven
#

Yes, but during the matching it'll will assign the first one it find that matches the visual (and color, and collision depending if you have those option checked)
If you want that other metatile that has the same visual but a different ID you'll have to assign it manualy after the load metatile event with the Assign meta tiles event

drifting harbor
#

Okay, so if my top row of metatiles is all identical, but I manually assign them on init, I will be able to keep track of which one is technically "unique"?

unreal haven
#

yeah

drifting harbor
#

Also the metatile submapping is not behaving as I'd expect. I'm putting in coordinates to submap from the metatiles scene but not getting the tiles I would expect. Is there a trick I'm not figuring out? I've been using your submapping plugin for a while.

unreal haven
drifting harbor
#

The metatile version

unreal haven
drifting harbor
#

I'm wondering if there's a straightforward way to do something like "find the nearest metatile with ID of x"

mossy star
drifting harbor
mossy star
patent turtle
#

The tilemap 256x256(GBC) on the Scene, its never loaded itself on the screen so i could have more unique tiles on it then the warning suggest or i still need to stay in that range ? Also the Overlay Tiles dont need to be on it ? The ones that are Saved as real Tilesets can be smaller what is the Minimum and Maximum size? And did i need to have also all what i want to load on the UI in that tilset or is it enouth to have one only for UI ?

unreal haven
#

Any tile that is displayed on screen needs to be loaded in the tileset VRAM, for tilemap tiles (that means background tile and overlay tiles) they can have up to 256 unique tile (or 512 in color only) of which half of the tile estate space is shared with object/sprite tiles. In GBStudio, the default dialogue system reserves itself a part of it to write text/dialogue box into which is why there is a warning when the amount of unique tiles exceeds 192 (384 in color only). But that can be ignored and bumped to the actual limit if you dont need the default dialogue system.

#

So you have to take into account that the tileset you display for your UI needs to be loaded in VRAM as well as your background tileset. You can either make the UI tileset merged with the background tileset and use it as a common tileset for your scene (simplest way) or you load tilesets of your UI manualy separately at an offset in the tileset VRAM and submap the tiles by taking account of the tile id offset (require that you know what you're doing)

rapid ruin
#

Is it possible to adjust the screen scroll camera's starting and ending point? Like if I wanted it to end 8px further into a scene instead of at the edge?

unreal haven
#

no

rapid ruin
#

Thanks!

patent turtle
#

I am a littlebit confused since i update to 4.2.2 the "Copy scene submap to overlay" is not working as before anymore (i think i do something wrong but i cant figure it out). In you Example you use another Tilemap for the "HudMenu" when i do not use the same as in the scene that i am it breaks the UI and i cant figure out why 🤔 I think it was working before the Update

unreal haven
#

Your common tileset are different
If they are different the Hud tiles position in the tileset of UI_Tiles have to match the position of the hud tiles in the tileset of Indoor

patent turtle
#

So best is to have all the Tilesets at the same size so they get loaded in the same order ?

somber patio
#

I've been trying to update my game after the 4.2 update. The scroll plugin worked perfect before but now, while up and down works fine, I'm getting some strange overlap when going left and right. Any idea of the cause?

unreal haven
somber patio
unreal haven
#

So you are dynamicaly replacing tiles when loading a scene right?

#

Ah I see the issue, I forgot to add the check to commit the tile change to also check if the scene is scrolling when I refactored the function for 4.2
So since you have 'commit" checked in your replace metatile event, it updates the tilemap VRAM so you see it warped on the horizontal scroll because the tilemap VRAM is 32 x 32 while the screen is 20x16 (the bottom 2 hidden by the hud)

somber patio
unreal haven
#

No I'll fix it in a second

somber patio
#

Thanks! I'll give it a test

somber patio
mossy star
#

Unsure if this has been asked before. I'm using the scene scroll plugin and I am drawing text to the overlay (bottom) to easily update some information, it seems to stop the plugin from changing scenes?

young prism
#

How so?

mossy star
#

The player just freezes on the border of the scene and nothing happens. When I disable the text drawn to the overlay, it works.

young prism
#

Is the text being drawn at the same time the player transition is happening?

mossy star
#

Tried delaying it, as well as putting it on a trigger so it doesn't occur on scene init or when the scene change occurs, but it's still the same result of the player freezing in place. it doesn't seem to like something being drawn on the overlay

rapid ruin
#

Are you using the top down scene type?

young prism
mossy star
mossy star
#

removed all the plugins but scenescroll, still occurs.

mossy star
#

So i've got the attach script to metatile event working, but it only seems to activate when entering the tile when going up/left, not down/right. Am i missing something?

mossy star
#

Outside of that, i'm wondering if i can speed up how fast the check is for the event. at 1/2 speed it catches every metatile change, at 1 speed it seems to only catch every other tile.

unreal haven
#

I wouldnt recommend using 16px grid mode in topdown view with the plugin as it is quite buggy

mossy star
mossy star
#

it works perfectly in 8x8px mode. checks the tile every step!

Now i just need to figure out why the screen wont scroll when there is text drawn on the overlay

rapid ruin
#

I just tested this and it happens to me too if the draw event is in the scene init

mossy star
rapid ruin
#

I just tested an enemy init script, looks like it will freeze with that too.

#

So far when you scroll to a scene that is drawing text to the overlay on Scene Init or Actor Init it will freeze the game

unreal haven
#

Text writing and dialogue will hold the thread wherever it is placed,
on init is a locked thread by default and in the code for scene transition, I am making sure the init script is completed before starting the transition process
So it then becomes frozen because of that. To fix the issue, in the init script just before displaying your text, add a script unlock and an idle event, this will fix the issue

rapid ruin
#

Works like a charm. Thanks Mico!

rapid ruin
#

Is it possible to merge 8x8 metatile with screen scroll? Where would I start?

rapid ruin
#

Gotcha, thank you!

mossy star
#

I'm thinking about using the AltDisplayText Plugin as some of my scenes use a lot of text, and I find myself having to "refresh" certain elements every time a choice is made via menu.

Will that plugin work in DMG or is it color only?

unreal haven
#

works on DMG yes

gentle harness
#

Is a metatile leave event something achievable?

#

Or am I being able to simulate something like that?

#

I want to change the player animation if they get close to an edge (simulated by a metatile enter event in a void tile), and then change back once I get back

gentle harness
#

Also, is checking metatiles in a radius around an actor something doable?

unreal haven
gentle harness
#

But ye, I never dabled with C and engine stuff 🥲

gentle harness
#

I'm guessing that's not possible

unreal haven
gentle harness
#

I must have not seen that

#

I admite I didnt see the whole video, I thought it was just always falling down

#

Ill download it and re check it a

drifting harbor
#

I'm still getting unexpected results when using the submap metatiles event. I updated from the repo with no change. Any thoughts? Thanks.

unreal haven
#

Make sure that both scene load the same metatile scene and have the same common tileset

mossy star
#

Even without drawing text and having show overlay active, it stops the transition

unreal haven
#

what are you doing in your scene init

mossy star
#

I have everything disabled currently except for the display overlay which is in the scene init. When I disable that as well it works fine

unreal haven
#

yes if you use the overlay move to event, it generates a VM_OVERLAY_WAIT gbvm operation which waits the thread (which is the gbvm operation that is also generated when displaying text) , so if the scene init script isnt unlocked and idled like I said previously, it will freeze

#

So if you use the overlay move to event, you still have to do the unlock + idle before it

mossy star
#

That all makes sense, but it doesn't seem to be working for me for some reason lol

#

Hah, there was a close-non modal diaglogue that wasn't disabled, and that must act the same. Got it working

mossy star
#

This is probably super out there, but i'm looking for information to solve this incompatibility between the top down followers and scene scroll.

one scene scroll, the followers try to go to the players location, but they think the coordinates are the exit coordinates from the previous scene. Anyone got any ideas?

I was able to keep them under control in a previous gbstudio version using triggers at each of the entrances/exits for each scene, but i havent had much luck so far

unreal haven
#

You might want to activate the followers in the new scene only after the scrolling is done