#Mico GBS Plugins

1 messages · Page 1 of 1 (latest)

unreal haven
#

Might as well put these here so that I can notify people when there are new ones or update / fixes

scene to overlay/background submapping
https://github.com/Mico27/GBS-copyBkgSubWinPlugin

single screen scene scrolling (Link's awakening style)
https://github.com/Mico27/GBS-scrollScenePlugin

Copy banked data to variables
https://github.com/Mico27/gbs-copyRomDataToRamPlugin

Set the colors of a palette
https://github.com/Mico27/gbs-setPaletteColorPlugin

Alternative way of displaying text to use the VRAM tileset as the "font" instead of writing the text in it
https://github.com/Mico27/gbs-uiAltDisplayTextPlugin

Load a tileset to the VRAM tileset (Similar to VM_LOAD_TILESET but you can specify a tileset instead of a background and has a few more parameters)
https://github.com/Mico27/gbs-loadTilesetExPlugin

Reload the current scene tileset
https://github.com/Mico27/gbs-reloadSceneTilesetPlugin

Simulate inputs
https://github.com/Mico27/GBS-simulateInputPlugin

Metatile plugin (old, only VRAM sized and loaded on scroll)
https://github.com/Mico27/GBS-DynamicMapPlugin-alpha

Example use of the Simulate inputs and metatile plugin
https://github.com/Mico27/SuperMarioBrosMini

Attaching scripts to when tiles (columns, rows or whole screen) is rendered
https://github.com/Mico27/GBS-TileRenderEventPlugin

Metatile plugin (16px and 8px) large map version and single screen scrolling version
map is loaded in memory on scene load
https://github.com/Mico27/gbs-MetatilePlugin

Configurable Save Data Structure
https://github.com/Mico27/gbs-ConfigLoadSavePlugin

Allow to specify an on hold and an on release input script inside an attach script to input event
https://github.com/Mico27/gbs-AttachScriptToInputExPlugin

Allows to reorder an actor in the active list, which is used for rendering/OAM ordering (color only)
https://github.com/Mico27/gbs-EditActorActiveIndexPlugin

Flicker actors when sprite limit is reached, either from horizontal scanline limit or from OAM limit
https://github.com/Mico27/gbs-flickerActorPlugin

GitHub

Plugin for partialy copying a scene to the overlay or background - Mico27/GBS-SubmappingExPlugin

GitHub

Single Scene Screen Scroll plugin for GBS. Contribute to Mico27/GBS-scrollScenePlugin development by creating an account on GitHub.

GitHub

Custom event to read banked data into variables. Contribute to Mico27/gbs-copyRomDataToRamPlugin development by creating an account on GitHub.

GitHub

Event to set the color of a palette. Contribute to Mico27/gbs-setPaletteColorPlugin development by creating an account on GitHub.

GitHub

Display text using tiles from VRAM tileset instead of writing to it - Mico27/gbs-uiAltDisplayTextPlugin

#

Also just made an update to the scene submapping plugin to support GBS v3 and fixed a few bugs related to big submaps not working correctly. Also added scene to background submapping with tileoffset.

hot grail
unreal haven
#

Made an update to the plugin, added a new event called "Copy scene submap to background tileset"
This kinda works like the "replace tile at position" event but you can reference a submap of another scene!
And unlike the "replace tile at position" event it'll also transfer color information from the reference submap!
(I'll be working on an example project to show off how it works, I used someone's asset when working on this but I cant show it here)

#

(if someone has assets, like for a menu or using lots of different portraits, etc, to share that I can use for a demo, let me know)

pastel willow
#

That reminds me, @unreal haven did this event get renamed or removed? I downloaded the background plugin earlier today for my game and was told that there was an event in there that I didn't have.

unreal haven
#

I know the first version had a bug where I misnamed one of the event that was the same as another one, making that one not display

#

But the plugin should show 5 different events now

#

If you add an event and type "Copy background" in the search bar you should see 5 of them

unreal haven
#

oh sorry I mean type "Copy scene"

pastel willow
unreal haven
#

You sure you downloaded the most up to date version? the repository got split to support both version 3 and 4, so you might have to do some cleaning up if you download it before that, can you show me a screenshot of where you've put the plugin?

pastel willow
#

I did it through one of the third party "download github directory" sites because github still doesn't give you a way to do it officially. Could it be possible that it's not downloading something in the directory?

#

oh yeah, and it's v4.0.2 I'm using

unreal haven
#

if you open the directory and open events what files do you see?

pastel willow
#

oh wait that's not what you were looking for

#

whoops

unreal haven
#

Yeah, you're missing a file somehow

#

you should have 5

pastel willow
#

I downloaded the last js file from the github

unreal haven
#

just put it with the others and you should have all 5 of them in GBS

pastel willow
#

have github directory downloaders been known to miss files?

unreal haven
#

Dunno never used it

pastel willow
#

gotcha

unreal haven
#

Lemme know if you have any questions on any of those plugins

pulsar sage
#

Heya! I hope I'm not being a bother, I've hit a snag with your scroll background plugin and was hoping for some help. In my game I have an inventory UI scene that uses background text (plugin), tile swapping (native), and tile palate swapping (plugin). If accessed from an overworld scene that hasn't been scrolled yet with your plugin everything works fine. But if I initiate the menu scene (via button press) from a partner overworld scene that has been scrolled to. the X,Y coordinates are offset compared to the scroll. It's worth noting as well that the native tile swapping coordinates aren't effected and work as they should. But any background text drawn is misplaced in the direction of the scroll.

unreal haven
#

Yes that is correct, I had a fix for the ui to take account of it but didnt publish it as it was editing ui.c and I didnt want to bother maintaining that. I can send you the edited ui.c file if you want.

pulsar sage
#

that would be great thanks!

unreal haven
#

Here put this in the engine folder in the plugin

pulsar sage
unreal haven
#

oh what version of GBS are you using?

pulsar sage
#

4.0.2

unreal haven
#

Ok gimme a second then

#

here

#

The previous one was missing UBYTE text_wait; because I was using the dev build and there was an update that removed it

pulsar sage
#

That one runs! Looks like it fixed the background text! but now textboxes created on that scene are empty. the background tiles I swapped the palette of ("Bank 1 functions" plugin) are still offset as well.

unreal haven
#

What plugin are you using for the textboxes?

pulsar sage
#

advanced dialogue and menu, but even native textboxes seem to be affected

unreal haven
#

Anything that might write to the background or submap to the background might be a problem since they dont take account of the screen scroll offset. So I'd suggest to take account of the screen offset when you put in the position values for the meantime. Not really sure how I can make it compatible with other plugins that interact with the background.

#

I'll try to think of a solution

pulsar sage
#

no worries! & I really appreciate your help thanks

unreal haven
#

After thinking some more about it, I think the best and simplest solution would be to create a custom event that allows you to store the current scroll offset into variables so that you can use it when using plugins that write to the background. I'll get around to make it when I get some free time.

pulsar sage
#

What about an event that resets the scrolled values back to default? Like an instant scroll back. Would something like that be possible?

unreal haven
#

The point of the scolled value is that its needed for the seemless scrolling, the new scene is rendered at that position in the tilemap VRAM, resetting that value would make the whole screen glitch.

unreal haven
#

I updated the screen scroll plugin, there's now a new custom event to be able to store the screen scroll offsets in variable to use to correct positions for background writing/submapping

unreal haven
pastel willow
pulsar sage
pastel willow
unreal haven
pastel willow
#

@unreal haven How's the metatile plugin coming along?

unreal haven
#

Still working on it

pastel willow
pastel willow
#

@unreal haven what does this mean

unreal haven
#

oh thats a bug when your not using color mode, I already fixed it but didnt publish it yet, I'll do it later

pastel willow
#

I was gonna have it to where my game's hud text didn't have duplicates of the same number in the vram.

pastel willow
unreal haven
pastel willow
pastel willow
#

I'm really stupid (when it comes to stuff like this)

unreal haven
# pastel willow wait, so I change this part to something?

its a mapping table, each values in that table represent the position of a character in the tileset VRAM. Their position in that table represent the value of ASCII characters.
In this example the 49th value in the list (index 48) represent the 0 character in ascii and will display the 0xF6th tile (the 246th tile in the tileset VRAM)

pastel willow
unreal haven
#

The reason your example wasnt displaying is that you font file dont match the mapping values

unreal haven
#

is your tileset just the numbers?

pastel willow
#

10 tiles in total in the tileset

unreal haven
#

in your load tileset event, put the Target Tile Index to 246

pastel willow
#

Also, for context, I was trying to have the numbers system be more like the left than the right

pastel willow
unreal haven
#

This is the tileset that the example mapping uses btw for reference

#

and this tileset is loaded at Target Tile Index 128

pastel willow
#

so it looks like it works, but not in the way it does with GBVM

unreal haven
#

weird it should work the same

pastel willow
#

lemme get the footage

unreal haven
#

yeah that looks right

pastel willow
#

thanks for the help! 👌

unreal haven
#

Btw if you prefer to write your text in GBVM, it looks like this:

VM_SWITCH_TEXT_LAYER .TEXT_LAYER_BKG
VM_LOAD_TEXT 1
.dw VAR_VARIABLE_11
.asciz "\003\002\002%D2"
VM_CALL_NATIVE b_ui_alt_display_text, _ui_alt_display_text

#

Its basicaly exactly like you used to, but instead of VM_DISPLAY_TEXT, you use VM_CALL_NATIVE b_ui_alt_display_text, _ui_alt_display_text

unreal haven
#

yes

pastel willow
#

would I need to include references, or should it be fine?

unreal haven
#

you dont need anything else

pastel willow
unreal haven
#

Looks like you are loading a tileset somewhere, shouldnt be related to the plugin

pastel willow
pastel willow
unreal haven
#

change length to 10

#

your tileset is only 10 tiles

#

right now its overflowing and writing sprite tiles in the bg tiles

pastel willow
pastel willow
unreal haven
#

The hud bar at the bottom is an overlay right?

pastel willow
unreal haven
#

then change .TEXT_LAYER_BKG to .TEXT_LAYER_WIN

pastel willow
pastel willow
#

thanks 👌

pastel willow
unreal haven
#

It uses the default UI palette

pastel willow
#

which wasn't this color in the ui

unreal haven
#

show me the scene palettes

pastel willow
unreal haven
#

which of these palettes are you using to paint your pause scene

pastel willow
#

should I make the first one the same palette as the last one?

unreal haven
#

You shouldnt have too, unless you have scripts that change palettes I'm not sure why its not picking the right one

pastel willow
unreal haven
#

Try changing the first palette color to see if that fixes it

pastel willow
unreal haven
#

Ok I'll try to look at why it picked the first palette instead of the default one, It looked like it was using the default UI palette on my end

pastel willow
#

how strange

#

if it makes it easier, I can hand you the source code for my game to see it on your end.

pastel willow
#

@unreal haven I think you should have the mario demo be included with the metatile plugin as a sample project once it's ready

severe isle
#

I downloaded the copyBkgSubWinPlugin from the first commit when it was released. I am updating it now, but I am getting this error. I merged the engine and event folders from the new copyBkgSubWinPlugin_v4 folder to the old one

Edit: Fixed! Delete copy_bkg_sub_win.c in engine\src

Multiple definition of b_copy_background_submap_to_overlay_base
Multiple definition of _copy_background_submap_to_overlay_base
Multiple definition of _copy_background_submap_to_overlay
pastel willow
#

@unreal haven Will the simulated inputs plugin be its own thing, or is it part of the metatiles plugin?

unreal haven
#

its own thing

pastel willow
#

I was thinking of having there be an autodemo in my game for a while. Glad you've made that possible!

unreal haven
#

Also pushed an update to the Alternative way of displaying text Plugin that fixed a bug when displaying text instantly would loop for a frame and eating inputs.

pastel willow
pastel willow
#

@unreal haven One thing I've noticed with the simulated input plugin is that my camera script isn't working in the autodemo I'm putting together. Are "If Button Held" events understood by it?

#

okay, maybe it was due to the direction not being set in the scene.

#

False alarm (I think)

pastel willow
#

Actually, it looks like If Button Held events act a bit strange when using a simulated button input.

#

For example, when it's seemingly pressing the B button, it looks like it's increasing speed (?), but my player's running animation doesn't play.

unreal haven
pastel willow
#

thanks!

unreal haven
#

Updated the submapping pluggin, now the "copy scene submap to background tileset" event supports color-only mode and can specify the target on which to copy the tile attributes (colors)

drifting harbor
#

I'm submapping the box at the top right when the player switches the cursor at the bottom left. The boxes are located off screen at the bottom of the background. Any idea why the descriptions at the top of the box only works for the very first one?

drifting harbor
#

copy scene submap to background

#

i redid it using offsets, and it works fine

#

using the offset event, i mean

unreal haven
#

mmh, if you are submapping from the same scene it should be working even without an offset

#

If you can share the background you're using I can try and debug to see whats going on

drifting harbor
#

Note that the numbers work correctly with copy scene submap to background

unreal haven
#

This is my quick test setup for reference:

drifting harbor
#

Try setting the camera to a fixed position? That seems to be the only difference between my setup and yours

#

I downloaded the most recent version today

unreal haven
#

Not sure what you mean by setting the camera to a fixed position, its fixed where it is?

drifting harbor
#

I have the camera set to 0, 0, so you can’t see the numbers beneath

unreal haven
#

Are you sure you arent using the "Copy scene submap to background tileset" instead of the "Copy scene submap to background" ?

pastel willow
#

I'm not sure what's wrong with this

unreal haven
pastel willow
drifting harbor
unreal haven
#

Alright, if your using the event with an offset of 0 its basicaly the same anyway

#

"Copy scene submap to background tileset" is used for when you wanna do tile swapping but with submaps

#

which swaps the tileset instead of the tilemap

pastel willow
unreal haven
#

nope, if you wanna do what you're trying to do, you'll have to reduce the scene to be 16x16 or switch to color only mode

pastel willow
unreal haven
#

Make your frames 128px x 128px

#

or make it 128x120 so that you can have tiles to frame it

pastel willow
#

or is it okay?

unreal haven
#

no it'll just warn you

pastel willow
#

mkay

#

also, how did you get the tiles to load instantly with that menu thing?

unreal haven
#

Its just submapping from the same scene

pastel willow
#

so there would be a delay if it's in another scene

unreal haven
#

No the tearing comes from when the area you submap is too big
Or when the amount of tiles you have to update in the tileset from tileset swapping is too big

pastel willow
#

gotcha

pastel willow
unreal haven
#

again, max unique tile is 256 on dmg, 512 on color

#

logo not supported

pastel willow
unreal haven
#

plugin doesnt support logo, dmg is max 256

pastel willow
pastel willow
#

I tested it out after changing the logo scene types, and it works

#

@unreal haven which event in the plugin would work best for faking video playback?

unreal haven
#

"Copy scene submap to background tileset" but you'll have a lot of tearing on dmg unless you do the overlay trick, which you can only do the trick on dmg if you reduce each frame to be 12 tiles by 10 tiles

pastel willow
unreal haven
#

yes

pastel willow
unreal haven
#

@pastel willow Here use this

#

and you set it up like this
(obviously pick the scene for your frames)

pastel willow
unreal haven
#

Just do exactly what the screenshot says

#

(with the correct scenes)

pastel willow
unreal haven
#

Its your main scene

#

and in your main scene, you put the events like in the screenshot, and you alternate between submapping on the left and right side for each frame

pastel willow
unreal haven
#

No, I just said do exactly what the screenshot shows, nothing else

#

this is what show overlay does btw

#

So the whole script is:

  • Submap to overlay the right side of the scene
  • Submap to the left the first frame
  • Submap to the right the second frame
  • Fade in
  • Repeat:
  • Show overlay
  • Idle
  • Submap to the left the next frame
  • Idle
  • Hide overlay
  • Idle
  • Submap to the right the next frame
  • Idle
#

and if your doing the whole thing, you might want to make something that automates creating the script. But at this point I'd be doing the whole work for you

pastel willow
unreal haven
#

all the frames

#

of the whole movie, isnt that what you were trying to do?

pastel willow
pastel willow
unreal haven
#

Like I said before, you'll have to redimension your frames to fit

unreal haven
#

it has to be 12x10 so 96px x 80px

pastel willow
#

my original plan was to have something sort of like this

pastel willow
#

is the main scene set as a logo?

unreal haven
#

no, ignore the warning

pastel willow
#

is it the 192 tiles glitch when it was supposed to be 256?

unreal haven
#

There's a warning when you exceed 192 because if you're using GBS default ui system, it reserves the tiles after the 192th ones, but since we arent using that you can ignore the warning

pastel willow
#

okay

pastel willow
unreal haven
#

with full screen size frames, no

pastel willow
#

I see

pastel willow
unreal haven
pastel willow
#

okay

pastel willow
unreal haven
#

Yes, the first on will be seen on the fadein, then the second one will be seen on the first show overlay

#

You can imagine it like this: you have 2 sheets of paper one over the other and a camera pointing at it
you pull out the 2 sheets of paper out of the camera at the start
then you write the 2 first frames on the two sheets of paper
Then you put the first sheet under the camera, then the second over the first sheet
then you draw the next frame on the first paper while its under the second one
then you remove the second paper out of view, revealing the changed first sheet
when you draw the next frame on the second paper while its not in view
Then you put it back on the first sheet and you keep repeating that loop

pastel willow
unreal haven
#

The idles are the wait event

#

unless you want it to be even slower

pastel willow
#

@unreal haven is there a way to use dialog boxes and the alt text plugin in the same scene?

unreal haven
#

Yeah it should work, unless you're using the advanced dialogue plugin, then Im not sure

pastel willow
unreal haven
#

you gotta switch to drawing to overlay if you're using the dialogue

pastel willow
#

or would I just need a gbvm script with VM_SWITCH_TEXT_LAYER .TEXT_LAYER_WIN

unreal haven
#

VM_SWITCH_TEXT_LAYER .TEXT_LAYER_WIN yeah

pastel willow
#

mkay

pastel willow
#

@unreal haven For a data select scene, how would I set this up? I tried it myself, but it didn't work as intended.

#

I'm wanting to have it to where if there's save data, it loads the right scene's tiles over to one of the files.

unreal haven
forest hatch
#

its probably easier just to do it all in the same scene

pastel willow
unreal haven
#

Yeah if you can have the part you want to submap in the same scene offscreen, you wont need a common tileset

pastel willow
#

it would make it so much easier for when I go to update it some more.

worn pecan
#

been having a problem with the simulated inputs plugin

#

it doesnt work with color

#

like the set simulated inputs thing doesnt work

pastel willow
#

is your game color only?

#

mine's the color and monochrome mode (at the moment)

worn pecan
#

yea

pastel willow
unreal haven
#

mmh that odd it should work regardless if its color only or not, I'll look into it

pastel willow
#

@unreal haven will the metatiles plugin work in a project that has Platformer Plus?

unreal haven
#

Yeah the example project uses Platformer Plus (with some modifications)

worn pecan
#

whats the tile idx?

#

tryna use the copy bg submap to overlay with tile offset plugin

worn pecan
#

if Im submapping a 9 tile tileset into a 2 tile tileset, what should the tile idx be ( in color only mode )

severe isle
worn pecan
#

hmmm 256 didnt work for me but 128 does

unreal haven
#

The tile idx is the index of the tile in the tileset. Tilemaps (the backgrounds of scenes) are a list of index of the tile in the tileset.
The event "Copy background submap to overlay with tile offset" will take a section of the scene's background then increase that index by the offset amount for each tile. So if you were to submap for example a bunch of tiles with index 5 in the tileset and specify an offset of 128,
Then it will increase those point to the 133th tile in the tilemap. This is used if you are not using a common tileset or that you are submapping from a different scene of the current one because the tilemap wont match and this will prevent being assigned the "wrong" tiles.

#

If your main scene has 2 tile tileset and the scene you are submapping from has 9, you can load the tileset of the submap scene at index 2 and specify the tile idx offset to 2

worn pecan
#

nice nice

#

thx

pulsar sage
#

@unreal haven I get this error on updating to 4.1.1 with your scene scrolling plugin:
Any plans to update it to the new version?

    4 | #include "states/adventure.h" 
      |          ^~~~~~~~~~~~~~~~~~~~ 
compilation terminated.
 
src\states\adventure.c:4: warning 190: ISO C forbids an empty translation unit
 
subprocess error 1
 
src\states\platform.c:4:10: fatal error: states/platform.h: No such file or directory 
    4 | #include "states/platform.h" 
      |          ^~~~~~~~~~~~~~~~~~~ 
compilation terminated.
 
src\states\platform.c:4: warning 190: ISO C forbids an empty translation unit
 
subprocess error 1
 
src\states\shmup.c:4:10: fatal error: states/shmup.h: No such file or directory 
    4 | #include "states/shmup.h" 
      |          ^~~~~~~~~~~~~~~~ 
compilation terminated.
 
src\states\shmup.c:4: warning 190: ISO C forbids an empty translation unit
 
subprocess error 1```
unreal haven
#

uh that's weird, I'll investigate

unreal haven
#

mmh, looks like the new GBS version doesnt like when you modify scene states via plugin if you dont specify the header in the plugin too

pastel willow
#

don't remember which ones because I added them in on my and

unreal haven
#

Ah yeah the exact problem is that since GBS now removes scene states that you dont use, the plugin cant find its related header anymore

unreal haven
#

The actual fix would be to just delete the scene types from the plugin that you arent going to use

pulsar sage
unreal haven
#

in that case you can go in the plugin files and delete adventure.c, platform.c and shmup.c

pastel willow
#

@unreal haven will the metatiles plugin allow you to reset tiles with an event (for when you die) or reset only tiles that you touched after a specific scenario (like touching a checkpoint)? Currently, I’m using flags to keep track of the coin actors (which will be replaced with tiles when the plugin’s released) that get saved in a variable when touching a checkpoint, which the value gets loaded into the variable with the coin actor flags after losing a life. Would there be a way to keep track

unreal haven
#

yes there's a get tile and a set tile event

pastel willow
pastel willow
unreal haven
#

No tiles are not remembered when changing scene, unless you change to a scene that doesnt use metatiles, if you switch to a another scene that use metatiles, you lose the previous scene tile data

pastel willow
#

what about through flags?

unreal haven
#

If you mean variables, then yes, on scene init you'd have to do the tile change depending on your variables

wanton jackal
#

Question, the scroll scene plugin does not work on the latest version of studio right? (I'm asking because it could be me installing it wrong?)

forest hatch
#

what does your plugin folder look like

wanton jackal
#

when I try to load the project with the plugin it gives me an error I'll try to copy it

#

src\core\projectiles.c:68: error 78: incompatible types

from type 'struct point16_t generic* fixed'

to type 'struct upoint16_t generic* fixed'

#

since it says it's made for 4.0.0 I'm assuming something changed and broke it?

severe isle
#

Actually... side note, are you sure that this plugin is causing the bug? This error was caused by projectiles.c, which isnt in this plugin

wanton jackal
#

I really only have this plugin installed and this is like a fresh untitled project

#

so I think it is

wanton jackal
#

ok now it prints something different

    4 | #include "states/adventure.h" 
      |          ^~~~~~~~~~~~~~~~~~~~ 
compilation terminated.
 
src\states\adventure.c:4: warning 190: ISO C forbids an empty translation unit
 
subprocess error 1```
severe isle
#

Furthermore, delete any other states that arent in use

#

#1270176849393221783 message

wanton jackal
#

oh I see, I'll delete these and test

#

It loads! I'm testing to see if everything works fine

#

hm, I think there's something wrong with scrolling to the left?

#

Scrolling to the right is fine

#

but scrolling to a map that is connected to the left side makes the character go all the way to the left until you can't see it and after like a few seconds the screen scrolls but your character is not really there?

severe isle
#

Hmmm, not sure, I get the same issue. Tried tinkering with it but it led to nothing

wanton jackal
#

yea, that's unfortunate 😔 hope it gets an update, I really don't know anything about C to even try it

#

when I was getting that first error the upoint16_t, I went myself in the code to change it to point16_t and imported the state files from ejecting the engine and it also loaded but it also had the same issues of not scrolling properly unfortunately

severe isle
#

Maybe try asking @/Mico27?

spare hornet
#

Hey! I'm excited to use this plugin, but I'm getting a weird error. Something about projectiles?

wanton jackal
#

oh my bad I meant that the answer was here already, sorry

spare hornet
#

LOL

#

whoops

unreal haven
#

Yeah I'll get on fixing that, gimme a moment

unreal haven
#

@spare hornet @wanton jackal The single scene scroll plugin is updated for 4.1.2 now

wanton jackal
#

that's awesome, thx btw !

spare hornet
#

Sweet! Thank you so much!

#

Is the scene scroll plugin compatible with the fade street plugin?

#

I'm getting these errors, not sure if it's related to that or if it's just a scene scroll issue:

#

Oh, I'm reading the readme, this could be because my scenes aren't 20 x 18 tiles... my bad

spare hornet
#

Here's a link to the fade street dev's thread: #1246487529180364840 message

unreal haven
#

Yeah they're not compatible, because fade streets replace files that my plugin also replaces

forest hatch
#

oh wait i was scrolled up

spare hornet
#

Hey, just commenting for visibility. If anyone has a sprite like mine where the sprite is offset to the middle for animating, I found that making this change offsets the up and down transitions to account for that.

#

To clarify, this is in regards to the scene scroll plugin

unreal haven
#

You can change the value to HALF_TRANSITION_DISTANCE instead too

#

Just go where its defined and add that amount

spare hornet
#

Oh yeah lol

#

I assumed that was used in other places, thanks for the heads up :)

unreal haven
#

tbh I could've named them better and split them to be able to specify an offset for each direction

#

Guess I'll just do that real quick actualy

drifting harbor
#

Did something change with the way that GBS loads tiles into VRAM in a recent version? I'm using the submap plugin for a menu system. I need literally two sprite tiles and was loading another background into the rest of the sprite VRAM. It's no longer working since I updated to 4.1.3

#

Here's loading it into slot 50.

#

Here's the VRAM

#

Note that this was working, but it's unclear when it stopped.

#

If I load it in at 128, it works.

#

But then it gets overwritten by the text buffer.

unreal haven
#

Hard to tell what's wrong with just this information, I dont know what your tileset in statusscreensubmap looks like and how you are submapping it

#

show me the status of the VRAM before and after you do the load tileset

drifting harbor
#

When set to 50:

#

before

#

when set to 128:

#

before

unreal haven
#

This looks like it works like it supposed to

drifting harbor
#

So I can't load anything into any slot lower than 128?

unreal haven
#

no, it does load it at slot 50

drifting harbor
#

I'm using that as reference, am I wrong?

unreal haven
#

wow who wrote this, this is wrong lol

drifting harbor
#

COOL

unreal haven
#

Hold on, food ready in the oven, I'll give you a rundown in a moment

drifting harbor
#

i appreciate the help! take your time

unreal haven
#

Here this is a screenshot from the guide but with correct information

#

So for background tiles, you start counting the index from the 3rd part of the vram and count down then up to the 2nd part and down

drifting harbor
#

Okay that is actually helpful, thank you

#

And is there no way to use the sprite tiles in a scene that doesn’t need sprites?

unreal haven
#

No, unless you use logo type scene but that will break other stuff

forest hatch
unreal haven
#

If you look at his vram screenshot you can see its not using the second bank, so its not in color only mode

drifting harbor
#

Point and click scenes don’t divide vram differently?

unreal haven
#

No, only logo type scene is different, it swaps which section sprite/bg to use midscanline to be able to use the sprite VRAM area, but it comes with heavy limitations

drifting harbor
#

Right. Well, now that I know what the actual range of tiles I am working with is, I can optimize and make it work in the limitations. Thanks

pastel willow
#

@unreal haven Is the metatiles plugin releasing alongside the SMB project?

unreal haven
#

Yeah

pastel willow
zenith cape
#

is there a way to get the simlate input to work wen the player presses A. What I am trying to do is that the player is using the simulated input to go right and then if they press A then i want the jump to be a -> + A. But when i try to do this I just get a regular jump. thx

unreal haven
#

Simulating inputs overrides user inputs except for when cancelling the sequence.
From what I'm undertanding you're trying to do an auto-runner and be able to jump on A press? In that case using my simulate input plugin isnt what you need.

zenith cape
#

yes auto-runner style section but has the platformer physics. do you know if there another way to do this or i might just have to have the player hold the direction manually.

unreal haven
#

If you are using the platformer+ plugin, you could set the player velocity to make it keep moving

zenith cape
#

the platformer plus jump velocity?

zenith cape
#

oh i think i found it the player x velocity

#

thx got it working

somber patio
#

#scripting-help message

Hi Mico. Would you be able to elaborate more on this? I'm working on wrapping my head around what exactly Metatiles do and how I could use them in the newer update of your plugin for my game.

unreal haven
#

Metatiles arent released yet

somber patio
unreal haven
#

Yeah but not this version I'm working on, there's gonna be two version of the plugin
One that has the metatiles stored in a 32x32 table in SRAM that is updated on scroll (the one I'm making for the mario game)
and the other version will be able to store the whole map metatiles in SRAM (with certain limits) This one is the one that'll be able to tileswap before rendering

somber patio
unreal haven
#

Yes

somber patio
#

Can you explain a bit what you mean by storing whole map Metatiles In SRAM? Or, what that looks like in practice compared to how your current version functions?

unreal haven
#

Sorry I dont know how to explain it better, see it like an editable version of your background rom data. when a scene will load, it'll copy the background rom data to the ram, rendering will read from the ram instead of the rom.

severe isle
somber patio
unreal haven
pastel willow
unreal haven
#

Release of the Mario demake
https://github.com/Mico27/SuperMarioBrosMini
as well as the metatile plugin
https://github.com/Mico27/GBS-DynamicMapPlugin-alpha

I made it so that it works with the save file system (I use it to save the top score in the game)

GitHub

Super Mario Bros Remake using GBS. Contribute to Mico27/SuperMarioBrosMini development by creating an account on GitHub.

GitHub

Dynamic map plugin (alpha). Contribute to Mico27/GBS-DynamicMapPlugin-alpha development by creating an account on GitHub.

hot grail
#

Amazing work!

pastel willow
severe isle
unreal haven
pastel willow
unreal haven
#

You have to download it separately, github doesnt seem to download sub repos

pastel willow
#

it downloaded the other plugins in the project

unreal haven
#

because the other plugins dont have their own repo

unreal haven
pastel willow
pastel willow
#

I do see the load metatiles event being used in the project, but that's really it.

unreal haven
#

Yeah thats pretty much all that is needed

pastel willow
unreal haven
#

Well that and in the platformer file, I check the collided metatile for different tiles and call scripts depending on its type.
Its more performant that I do it in the engine and aggregate the amount of collected coins and call the script.

#

for getting and changing the metatile in script there's the "Get metatile at position" and "replace meta tile" events

pastel willow
#

I forgot that you're doing other versions of the plugins, so I should wait for those to come out

worn pecan
#

I’m the most interested in the actor behaviour plugin tho

#

seems rly awesome!!

worn pecan
#

( also if possible maybe someone could explain what do meta tiles do )

pastel willow
#

@unreal haven I found a glitch where you no longer can shoot fireballs as fire mario.

#

I don't know what triggered it, but it was in 1-3

rugged owl
#

Very excited to check this all out tonight. 🍻

rugged owl
#

Had a quick cheeky play before dinner and holy shit! This is impressive. Maybe the best platformer thing I've ever played in GBS. WOW.

somber patio
#

Also, what an amazing job on the Mario Bros port. It plays and looks wonderful.

unreal haven
unreal haven
somber patio
unreal haven
#

Oh then its not my plugin, are you using the latest version of GBS?

#

oh nvm Ican see it in the warnings, looks like its the latest

#

It looks like there an old version of a file somewhere that doesnt match the changed type from one of the latest update

#

I'll try reproducing it with a blank project too

unreal haven
somber patio
unreal haven
#

which sample project?

#

Oh I'm on 4.1.3, not sure which version it was where actor position signature changed, lemme look

pastel willow
unreal haven
unreal haven
somber patio
somber patio
unreal haven
#

Working on a tutorial right now so that it's a bit clearer on how to use it

unreal haven
rugged owl
#

Fantastic! One small edit:
".. Then, you main scene's background .."
Should be:
".. Then, your main scene's background .."

unreal haven
#

Thanks! fixed the typo

somber patio
#

On your HitBlock script, where/how does the $Tile_ID ($HitBlockID) get defined?

unreal haven
somber patio
somber patio
#

Testing this (I just replaced a tile with that "1" metatile) and I find as soon as the camera goes offscreen, the tile reverts to normal on return. Is this normal or am I missing additional steps to assure the tiles don't reset?

unreal haven
#

No that is how this version works.

#

This version's metatile map in the SRAM is the same size as the VRAM, so it works similary

#

The other version that I am planning to make will have the metatile map in the SRAM be the same size as the map itself, which, while taking a lot more SRAM space will keep the modified tiles even if off-VRAM

#

Its two different behaviors for different use. Which is why you cant backtrack in the mario game I made, because changes to the metatiles gets overwritten as the screen scroll

somber patio
somber patio
unreal haven
#

No that will be for the next version

sour shoal
unreal haven
#

Technicaly yes, but keep in mind that it wasnt designed with it in mind so there might be some quirks

drifting harbor
#

Just asked this in scripting help, then I realized I should have just posted it here.

#

#scripting-help message

unreal haven
#

Yes when the submapped section goes offscreen, when the camera scroll back it rerenders the tile from the ROM data, therefore losing the submapped tiles

drifting harbor
#

okay, so a trigger right before it comes onscreen should do the trick?

unreal haven
#

The issue is that you have to do it after it rerenders it, which is at the edge of the screen

drifting harbor
#

okay, i think i can manage that

#

thanks for the help

unreal haven
#

np

unreal haven
young prism
#

Any thoughts @unreal haven? The top/bottom threshold variables are set to 384 (128 + 256 as per the previously-referenced solution). My impression is that I have to change that somehow but I'm not familiar enough with how the plugin works to be able to guess what I need to change

unreal haven
young prism
#

48x48 canvas, hitbox is 6x7, centered, 16 pixels up. Dimensions: (5, 16, 6, 7) -> (x, y, w, h)

#

Also, thanks for your help, & thanks for making this plugin! I had looked into making a scene scrolling plugin awhile ago but didn't get anywhere with it

young prism
#

@unreal haven ?

young prism
#

(Found that setting the threshold in the definition doesn't work for some reason, but the "+ 256" solution works just fine)

unreal haven
#

Sorry was busy with something else, yeah not sure why the default values would cause that problem, but if adjusting the values fixes it then good

#

you're using the latest version right?

young prism
#

Yep

#

I got no clue. But hey, it works lol

sour shoal
#

I've got a scene of 255 8xpx tiles high & 64 8xpx tiles wide. Would the single screen scroll plugin still work?

young prism
#

That's a good question which I myself have been wondering. @ me if you get an answer!

slim agate
#

Messing around with the screen scroll plugin https://github.com/Mico27/GBS-scrollScenePlugin and really like it.

However having an issue when I try to use parallax as well. I get something similar even if I done use the scroll to go from one area to the next. It seems as soon as I use it anywhere I have the issue with Parallax. I created a custom tileset between areas as well with https://gb-studio-tile-count.glitch.me/ but the it stays pretty much the same

Having some issue wrapping my head around the scroll offset outline in the github, but if there's a prior post I'd love to read it for help.

unreal haven
#

The plugin doesnt support parallax

slim agate
#

Anyway to stop it running, or if it's used at all it kills parallax?

unreal haven
#

I think paralax should work if you do a simple scene change without usin the plugin's event

slim agate
#

It wasn't for me. Still garbled.

young prism
#

Hey @unreal haven what do I need to change if I want a larger overlay UI?

unreal haven
#

Not sure what you mean by larger overlay UI, unless you mean making it a bit taller, you just have to make your scene a bit smaller

tired sleet
#

Sooo trying to figure out how to display text or ui? for ssome reasson each time i try parts sof the map disapear?

#

when the game freazzes thats when im trying to load the Text on screen

#

how does this work and how might i get ui to render?

unreal haven
#

What are you using to display text?

tired sleet
#

advanced diolague, or i was

unreal haven
#

Yeah I think advanced dialogue does funky things like copying background data to overlay so It might not be compatible with it

tired sleet
#

HMMM

#

oops caps

distant pond
tired sleet
#

🤔

#

how might i draw ui?

distant pond
#

use the normal dialogue event with the non-modal option

rugged owl
#

I'm using the overlay for the UI in Cave Dave. Writing the text there via GBVM

distant pond
#

are you using GBVM because normal dialogue didn't work or for some other reason?

tired sleet
#

i see

tired sleet
distant pond
#

I don’t see why using GBVM the dialogue event could make a difference. But in not familiar with the metatile plugin so maybe I’m missing something.

rugged owl
#

I show the overlay like so:

VM_OVERLAY_SHOW 0, 17, .UI_COLOR_BLACK, 0 VM_SET_CONST_UINT8 _show_actors_on_overlay, 0
and update the HUD like so:
VM_LOAD_TEXT 3 .dw VAR_BOMBS,VAR_COINS, VAR_ROPES .asciz "\007\002\001\001\003\005\001%D2\003\014\001%D2\003\023\001%D2" VM_DISPLAY_TEXT

tired sleet
#

🤯

#

Im gona move to Scripting help

unreal haven
#

If you're using the default ui text stuff, you'll have to make sure that your tileset doesnt go over 192 unique tiles

tired sleet
#

mkmk

tired sleet
unreal haven
#

what does the VRAM looks like when you write text?

tired sleet
#

: V

#

how do i check that

unreal haven
#

When you are debugging, its at the bottom left

tired sleet
#

each time the numbers move thats me pressing select or start to change inventory items

unreal haven
#

try with the overlay filled white

tired sleet
#

nope

#

i dont even think the overlay is rendering

#

are there any plugin conflicts that i may have overlooked?

tired sleet
#

how does metatile submap work?

unreal haven
#

It allows you to replace metatiles from another scene

#

Like for example you could have in another scene a background image of a house, and you can "copy paste" the house in your main scene

tired sleet
#

mk 🤔 so i could also use it to load Chunks to make a map?

#

im guessing thats what EGVroom is doin?

unreal haven
#

No from what I've seen he seems to have made his own code for generating the map

tired sleet
#

ooooooh ok cool

unreal haven
#

But if you have presets section, it can be useful

tired sleet
#

Cool cool ill have to mess around with it.

rugged owl
#

I am generating the map myself yes. It's different every time you play !:)

tired sleet
rugged owl
#

It's here. #works-in-progress message

#

You can learn how to generate maps at that Spelunky link.

tired sleet
#

Ah I missed that haha 👍

tired sleet
unreal haven
#

If you're generating your map dynamicaly you have to not use the scroll code, like what EGVroom did.

tired sleet
#

🤔

unreal haven
#

Go in the dynamicMapPlugin files, open scroll.c, and add a return (without the //) so that it doesnt render over your dynamicaly rendered scene.

unreal haven
#

no, litteraly just do what I did in the screenshot without the //

#

The point is to not call scrol_viewport in scroll_update

#

or alternatively you can comment out the scroll_viewport calls,
or add your own condition if you want to enable/disable it

tired sleet
#

i justy noticed i coppied the code from above to bellow it

#

thank you a ton

young prism
young prism
#

@unreal haven How would i edit the Metatiles plugin to allow for 4x4 metatiles?

#

My initial thought, looking at meta_tiles.c, is to add some more pointers to different rows of the tileset

unreal haven
#

You'd have to rewrite the way the scroll rendering works, also you'd need an additional mapping to specify how a metatile with multiple tiles is built.
Also you'd have to figure out how you create the scene in gbstudio that support multi-tiled metatiles (best way would probably to have an external way of creating the map data).
Not a simple edit, would be pretty much a whole overhaul of the plugin.
I was planning on making a version of the plugin that support multi-tiled metatiles eventualy but I'm busy with other things at the moment.

young prism
#

Hmm. Ok. What do you mean by figuring out how to create the scene in GB Studio?

unreal haven
#

Well unless you're dynamicaly creating your scene data, you'd have to create a scene in GBStudio to hold your scene data.

young prism
#

With a 2x20-tile UI, you can cover the screen in 20 4x4 metatiles

somber spruce
#

Quick question about editing Scroll.c to preserve metatiles when scrolling away and back...

I understand that this will limit the Scene size to 256x256 pixels. My question is, will this apply to every Scene in the game? Or is there a way to turn it on or off for certain scenes?

unreal haven
mossy star
#

when using the metatile plugin on topdown mode, if the screen moves passed the meta tiles i've replaced, they return to their default tiles. what would i need to edit in order to preserve those tiles when scrolling?

mossy star
unreal haven
#

Nope, to be able to handle more than the 32x32 tile buffer you'd have to rewrite the whole thing and that point it'd be an entirely different plugin

mossy star
mossy star
#

i'm attempting to use meta tiles and the scroll scene plugin together, i am now getting this error when attempting to run.

any ideas on how i can fix that?

unreal haven
#

Well they're not compatible because both edit same files

#

You'd have to rewrite an hybrid of the two

mossy star
#

ah that sounds complicated lol

mossy star
#

would it just be a hybrid of the two collision files since that's the only errors occurring?

#

i'm just trying to figure out how complicated making them compatible would be

young flame
#

eyooo just used the Copy ROM data to variable plugin to store items data this is gonna make my life so much easier!

unreal haven
arctic wyvern
#

@unreal haven Is there a way to use your plugin where metatiles could be interacted with projectiles? Thinking brick breaker.

unreal haven
#

You'd need to make a plugin that sends and register the projectile coordinates on collision and send an event, and on the event check the tile it collided with and do whatever you need to do.

young flame
#

Mico have you had the chance to look into text scrolling in ui_alt_draw_text_buffer_char() yet? I compared how \r is handled in your code vs in ui.c and noticed a good bit missing so I copied and adapted it but it doesn't do much. Here's what I did:

 case '\r':  // 0x0d
                //og code
                //ui_alt_dest_ptr = ui_alt_dest_base += 32u;

                // line feed
                if ((ui_alt_dest_ptr + 32u) > (UBYTE *)((((UWORD)text_scroll_addr + ((UWORD)text_scroll_height << 5)) & 0xFFE0) - 1)) {
                    scroll_rect(text_scroll_addr, text_scroll_width, text_scroll_height, text_scroll_fill);
                #ifdef CGB
                    if (_is_CGB) {
                        VBK_REG = 1;
                        scroll_rect(text_scroll_addr, text_scroll_width, text_scroll_height, overlay_priority | (text_palette & 0x07u));
                        VBK_REG = 0;
                    }
                    #endif
                    ui_alt_dest_ptr = ui_alt_dest_base;
                } else {
                    ui_alt_dest_ptr = ui_alt_dest_base += 32u;
                }
                if (vwf_current_offset) ui_print_reset();
                break;
#

Here is the result of this:

; Text Dialogue
    VM_LOAD_TEXT            0
      .asciz "\\003\\3\\16This is so long\\nI can't believe\\nWe need more\\006\\020\\rthan two lines\\rto display all\\rthis!"
      
    VM_OVERLAY_CLEAR 1, 12, 18, 5, .UI_COLOR_WHITE, ^/(.UI_DRAW_FRAME)/
    VM_OVERLAY_SET_SCROLL   2, 13, 16, 3, .UI_COLOR_WHITE
    ;VM_CALL_NATIVE b_ui_alt_display_dialogue, _ui_alt_display_dialogue
    VM_DISPLAY_TEXT
    VM_OVERLAY_WAIT         .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT | .UI_WAIT_BTN_A)/
#

and here is the result of using your alt_display_dialogue() function:

; Text Dialogue
    VM_LOAD_TEXT            0
      .asciz "\\003\\3\\16This is so long\\nI can't believe\\nWe need more\\006\\020\\rthan two lines\\rto display all\\rthis!"
      
    VM_OVERLAY_CLEAR 1, 12, 18, 5, .UI_COLOR_WHITE, ^/(.UI_DRAW_FRAME)/
    VM_OVERLAY_SET_SCROLL   2, 13, 16, 3, .UI_COLOR_WHITE
    VM_CALL_NATIVE b_ui_alt_display_dialogue, _ui_alt_display_dialogue
    ;VM_DISPLAY_TEXT
    VM_OVERLAY_WAIT         .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT | .UI_WAIT_BTN_A)/
#

The \006 to wait for input works perfectly fine tho

young flame
#

oh heck yea! im out for the evening but ill def have a look asap! tysm!!

young flame
#

Morning! Ok so i copied the new file but I get the same behavior as before of not scrolling, is there anything else I need to do?

unreal haven
#

weird, I copy pasted your code and it works for me, not sure what's different here

young flame
#

hmm lemme see

#

Deleted my c file and recopied it from the zip

#

aaah ok now it works, my bad, apologies and again thank you very much

unreal haven
hot sun
somber spruce
unreal haven
#

I'll try and improve the documentation, I really suck at explaining things in a structured and comprehensible way haha...

hot sun
unreal haven
#

I just updated the metatile plugin on github, nobody told me that the plugin folder was missing from the commit until 30 minutes ago 😅

sour shoal
unreal haven
#

I think the plugin itself should work, but the example project can only be opened in 4.2.0

sour shoal
unreal haven
#

In the platformer plugin, I have a function that checks when the player enters a tile and I check its metatile ID, if its a coin, I change the metatile to an empty one and call an event script if I want to do something when the coin is collected. Usualy its for adding the coins to the counter and updating the ui

hot sun
unreal haven
# hot sun I think that was the part I couldn't understand with the demo/testing... I got t...

At the end of the platformer_update function, I have a function that checks if the player entered any new metatiles.
In the check_player_metatiles_entered function, I check for any new tile entered.
Then in the on_metatile_enter function I can check the metatile id of that tile and if it match one of id of a coin, I change it metatile and add to the VAR_FRAMECOINS variable
Which, once its done checking all entered tiles, if its non-equal to 0, I do a script_execute of the script that will append the VAR_FRAMECOINS to the coins total variable and update the UI.

#

Similary, when evaluating tile collisions, if there is a collision at a tile at a certain collision, I call the on_player_metatile_collision function.
Which I also then check the direction, the metatile ID and if its a brick or some such, I store in variables some info such as the position of the block, its metatile ID, and who hit it (in this case the player = 0) and call the script that will do whatever it needs to do.

hot sun
#

That's awesome. Thanks for the explanation!

unreal haven
golden moat
#

Out of curiosity, what are metatiles? I've seen mention of the plugin for them several times, but because I'm not that experienced with gamedev I'm unsure what they are.

hot sun
severe isle
unreal haven
#

I could, but 8x8 require 4 times the amount of SRAM space, so map size will have to be much, much smaller

#

making a 8x8 version of the sreenscrolling however seems reasonable

severe isle
#

If 8x8 means needing a much smaller map, Ill probably just use the 16x16 metatiles for my project

#

(someone else might find it useful though)

#

I was surpised to see how big the platformer scene was with the metatiles, your plugins always amaze me! 🙏

severe isle
#

@unreal haven I was using the Metatile plugin and noticed that the sample project (with the Mario background) had a modified version of Platformer Plus that retained some of the data from SMB Mini.

I'm using the alpha version of GBS 4.2.0. Previous P+ builds seem to be too large for the engine (playerstates.o and playerstatesb.o in specific), but this minimal version works great.

Do you plan on releasing this minimal version of P+, or merging some aspects of the minimal P+ with base P+?

Do you mind if people (including myself) use the modified P+ plugin found in SMB Mini/Metatile Project in other projects?

unreal haven
#

Sure I dont mind, do whatever you want with it.

toxic linden
#

for things like the pokemon and their attributes

unreal haven
#

For a pokemon crystal save structure, global variables would be very hard to manage that. It would be preferable to define a struct in the engine and have an array of those and create custom events to manage it.
This plugin's event currently only allows global variables to be configured in the save. Technicaly however its possible to specify engine variables to be saved if you write your own save_points files manualy instead of letting the configure save event create it.

toxic linden
unreal haven
#

Alternatively, you could also create the engine variable at the SRAM address and read/write directly there so you dont have to use WRAM space for that.

somber patio
unreal haven
#

Which adventure plugin are you using? you might have to do some edits to match the edits that are in the metatile plugin

somber patio
unreal haven
#

If you're replacing tiles, you have to use the "replace meta tile" or the "Submap metatiles" events

#

Look at the demo project for example, where in the 3rd scene's init it randomly submap the house in depending on a random variable

somber patio
#

I am making progress, but still understanding at what point the camera considers it has triggered the Render Event. I'm finding the if the XColumn is too close to the initial camera, it won't trigger the even that I have set. But it will if I put it say, 2+tiles away and then move the camera.

unreal haven
somber patio
unreal haven
#

oh right, sorry assumed you were initialy talking about the metatile plugin

somber patio
unreal haven
#

Well the plugin simply just fires the event whenever a row, column or the whole screen is rendered at once. There could be many reasons why its missing some columns here, could be that they were rendered before you could register to the event, could be that they were fired from before the scrolling because of rendering padding, but I cant be certain especialy not knowing whats happening in your code.

somber patio
#

I have a script that allows me to flip two columns of grass (based on what has or hasn't been cut). So basically when the camera moves to that render spot, I'm having it call the script. I suppose I could call those first columns before the camera move, though that feels less automatic or possibly not as fast.

From what I'm gathering if the camera is already in the spot, it's already rendered. And possibly it's already rendered the nearby surroundings.

unreal haven
#

Just to clarify this is all one scene right?

somber patio
#

Maybe instead of storing the Pending_h_x I can store just the current X first since that's where it starts.

unreal haven
#

there is no other current X, Pending_h_x is the current X.
My guess is that when you first start the scene, you arent managing the padded rendred columns/rows. You'd have to either remove the padding from the scroll code or before moving your camera, reset the scroll_x and current_col (current_col despite its name, is not the actual current rendered column but the previously rendered column position)

#

Alternatively I'd really recommend using the metatile-scene scrolling plugin instead. It'll fix pretty much all the issues you're currently having and will be much more performant than this method.

somber patio
unreal haven
somber patio
#

Hmm. So my project is almost entirely unique tile swapping since it's all about cutting grass. Every camera shift I have to load up that section of grass from memory variables before I pan over to it. My current method is doing this all in one scene utilizing camera tricks. Is there a way I could be adjusting the tiles of a neighboring scene using this plugin before panning over to it? Essentially, could you cut the grass in test_map 2 of your plugin, record it, and then it would always be gone when you panned back to it?

unreal haven
#

yes, there is a demo project in this that shows exactly that (look at the init script of the 3rd scene where it generates a random value and draws a house that will be displayed before the scene scrolls, like I said in a previous post, this one uses the submap metatiles event but it can be done for individual tiles with the replace meta tile event)

somber patio
somber patio
unreal haven
#

Check what files the other plugin are changing, from what Im seeing here there's a plugin that changes projectiles.c that didnt get updated with the latest GBStudio version where they changed player position to use signed point, and if interrupts cant find bkg_scroll_x/bkg_scroll_y its probably because another plugin is modifying scroll.c/scroll.h

somber patio
unreal haven
#

yeah

somber patio
#

When I search within all the plugins, the only files that mention projectiles are the "data_manager" and "scene_transition" files that are in the metatile plugin

unreal haven
#

which version of gbstudio are you using

somber patio
unreal haven
#

are you sure you dont have an ejected engine?

somber patio
unreal haven
#

When you eject the engine, any updates made to the engine by gbstudio wont be made

#

Imo its better to have your engine edits as plugin instead of ejecting the engine to prevent that kind of situation

somber patio
#

Oh the engine edits are in a plugin. They're just added things to Adventure Plus

unreal haven
#

Now from the error I see here, you probably added a new function in the ejected engine that was being referenced in your scripts

#

oh ok, then your grasscut function is in adventure.c correct?

somber patio
#

Yep yep. There's a whole bunch of functions the error references, it's all things that are in adventure.c, in that plugin. No changes in the ejected engine (it just was unintentionally ejected)

unreal haven
#

kk, then now what you need to do is to "merge" your adventure.c with the other plugin's adventure.c

#

I believe all I changed in my plugin in adventure.c was to remove clamping the player position when offscreen

#

lemme check real quick

#

Here change this in your adventure.c and you can delete the adventure.c from my plugin

somber patio
#

Gotchya, that worked, it's booting now. Thanks!

unreal haven
#

Lemme know if you have question about the metatile setup

unreal haven
severe isle
unreal haven
#

Dimension limitation are the same as normaly, but the total tilewidth×tileheight must not exceed 8k which is the size of the sram, and the more sram to take forit, the less you'll have for save data

unreal haven
hot sun
#

You're just a plugin machine at the moment! You spoken to @uneven orchid @smoky thunder about integrating any of these into the core? Thinking more of the "simpler" ones than the beast-metatiles plugins, etc. Some of the event based plugins would be handy to have as extended built-in events?

unreal haven
#

Most of them modify or add to the engine so I think those would be best to stay as plugins.
The only "pure" event plugin I have here is the one I just released (the script to input ex plugin)
which doesnt modify the engine.

hot sun
#

ahh... ha, fair enough! 👍🏻

unreal haven
#

I mean, its good to extend the toolset of gbstudio, but imo not at the expense of bloating the engine with stuff that only a few would use or has too much of a specific use case. But I wouldn't object if chris were interested to add some.

livid epoch
distant pond
unreal haven
#

I tried at first to make one that replaces the default attach script event but the way it creates the banked script inside didnt work with what I was trying to do. The only way I could make it work is making it inside of the attach script instead.

somber patio
# unreal haven Lemme know if you have question about the metatile setup

I'm working on starting this in its most basic form, using an empty map and just a few tiles, to learn how the replacement goes. My Tileset is the same as the grasstileMeta, but at 160*144. I have the scenes set to share tilesets and load the metatiles on scene load. However when I load, instead of being light, the background is all black.

unreal haven
#

Can you show screenshot of the scene properties and scripts?

somber patio
#

The GBVM here is to disable collision with my specific engine edits. It's still a black bg even with that off.

unreal haven
#

you're in DMG mode right? you can uncheck the "must match metata color attributes" checkbox

#

Also what does your Remove Cut Grass Collision do there?

somber patio
# unreal haven Also what does your Remove Cut Grass Collision do there?

This really may not be necessary, but this was from before your plugins were released. The engine creates a 20*18 Array and references the flags of 5 Variables to determine which 16px squares have or do not have collision. So calling the script in this scenario clears all collision since all the flags are off. It's not doing any actual tile swapping or anything.

#

To clarify, I haven't called any changes yet. Just opened the scene with the blank bg and the tilesets linked

unreal haven
#

kk, if I were you I'd just make a new project entirely first with just the metatile plugin to make it work so that you're sure there's nothing funky going on here with pre-existing stuff

#

or if you can send me the current project, I can take a look more in detail on whats wrong

somber patio
#

Kk, I'll give the new project a go and if I can't figure it, I'll send over the project. Thanks!

somber patio
#

Project has none of my engine edits, it's just a new project with your plugin and the BGs and tilesets

unreal haven
#

uncheck commit render

#

When you replace metatile in the init script, commit render should be unchecked or otherwise weird stuff will happen during screen transition.

#

only have it checked when for example your character cuts a piece of grass

#

Oh also, is there a reason you're using 20x18 scenes instead of 20x16 scenes? arent you using a 16px height hud at the bottom?

somber patio
unreal haven
#

Yeah I checked and I think the plugin only support the scene to be at max height of 16, I'll fix that but yeah that should fix your problem. Also for the piece that doesnt show up on scene init I think I know the problem, you'd have to make the distinction between if the init is run during a normal scene change and a screen scroll to see if you check it or not, I'll do a fix for that too.

somber patio
#

Okay cool! Thanks Mico

#

Oh one other thing, I found that the Source X is requiring multiples of 6? Like instead of 0,2,4,6,8, I can only get those tiles with 0,6,12,18,24

unreal haven
unreal haven
somber patio
unreal haven
#

what does your script look like

somber patio
#

The main script that loads grass checks each flag individually and swaps to the proper tile based on whether or not it's cut, a wall, etc. It works fine on that initial screen load but then moving to the right it gets cut off partially. Wondering if there could be an issue with my engine edits maybe? Changing that code made sure the X position on the right side works, so maybe I need to change something for the other side.

unreal haven
#

Check the commit render, I made a change that you shouldnt need to have it unchecked anymore

somber patio
#

I had it checked previously and was having the same issue. The unchecking was recent to see if it changed anything and it hadn't.

unreal haven
#

I think at this points it hard to figure out the issue like this, can you send me your project It'll be faster to figure out the problem.

somber patio
unreal haven
#

Yeah just use the plugins collisions, its built-in for what you're trying to do anyway

somber patio
unreal haven
#

I updated the screen-scroll version of the metatile plugin, I found a bug where if you were to edit tiles at the border of the scene on scene scrolling there would be some that were not rendered.

somber patio
unreal haven
#

In top down 2D? it should work if you just put the setting to 16px grid.

somber patio
#

It's adventure. It's a specific thing to my game so that when a player transitions to a new screen, at worst it only cuts the one piece of grass they would move into, and not two. No worries though, I got a solution figured out.

unreal haven
golden moat
#

My saviourrrr

#

Going to give this one a spin for sure.

rugged owl
#

Oooooh!!! I’ll be taking a look at this for sure for layering the riders etc properly in Hero GP. 👏

golden moat
#

I may have to try and find a way to determine overlap based on Y position using this, if that would be possible.

#

E.g. if the player's Y coordinate is a larger number, draw the player over an Actor, if the player's Y is less, draw the Actor over the player.

#

Strange, Github isn't loading for me.

unreal haven
#

reload, maybe its because I just pushed a quick fix

#

had misplaced an engine file in the plugin hierarchy

golden moat
#

Github in general is suddenly not loading and I don't know why.

#

The main page too.

icy flume
#

Works for me

golden moat
#

Weird.

#

Let me try a different browser.

#

Still nothing.

#

Strange.

#

LibreWolf, FireFox and Chrome all can't seem to reach the server.

#

But other sites and Discord still work, so it's not that my internet is somehow down.

unreal haven
#

mmm dunno, site is up on my end, even in incognito mode so maybe is a region issue

golden moat
#

I'm in The Netherlands, so possibly.

#

Going to eat some soup and try again later.

keen pivot
somber spruce
#

For games that are both DMG and Color compatible, will this plugin cause errors when played on DMG, or just do nothing?

unreal haven
#

No it wouldnt cause errors on DMG, it would simply have no effects.

somber spruce
#

Awesome

rose oracle
golden moat
#

Github is finally loading correctly for me, still no idea what happened the other day. If I want to download the Edict Actor Active Index plugin I just need to download the source, right?

somber patio
#

I noticed with the metatile plugin if I go from a scene utilizing the scroll function to a completely different scene, I can no longer use the standard GB Studio collision (where you paint it on the map). I do this for my town area. Is there any way to revert back to that normal collision in a scene instead of the submap way? I'm guessing I could make a new metatile scene but I'd like to avoid having to do that for the already designed and painted non-gameplay areas.

unreal haven
#

btw you dont need to submap stuff to build a metatile scene, you can make it like a normal scene, the tiles just have to match the metatile scene.

somber patio
#

I'm almost done fully implementing your plugin and the results are really incredible. At very least it's cut down my screen transition time by almost half.

keen pivot
#

For context, I'm using the top-down 2d scene type, and I've set the scripts up on horizontal screen-wide triggers that reorder sprites accordingly

hot sun
unreal haven
#

Make sure you're not using any other plugin that modifies the actor files (if thats the case, make the same edits in the other plugin)

keen pivot
#

That update works perfectly. This is genuinely a feature I've wanted in gb studio since day 1, the amount of freedom this just gave me in designing larger sprites is insane. Really great job!

mossy star
#

So if I'm understanding correctly, we are no longer limited to the screen size when using the meta tiles plugins?!

unreal haven
#

Only the screen scrolling version of the plugin is still limited to screen size, the other two arent.

mossy star
somber spruce
#

I've been working with the metatiles plugin and it is awesome, truly (and literally) a game changer.

Since I have more than 16 different metatiles, I'm finding I need to use VM_SWITCH rather than the Switch event to account for all the different conditional branches.

Is it possible for me to write the Replace Metatile event in GBVM?

unreal haven
rose oracle
#

I starting with 8px metatile plugin. In adventure mode works fine but I have a doubt with platformer type.

#

How I simulate jump to a block (like super Mario) and player doesn't cross the block

unreal haven
#

Did you check the example project for the 8px metatile plugin? it uses platformer type and has Mario blocks

sour shoal
#

Does the 16x16 metatile plugin work with P+ with slopes?

young prism
#

I check back in after a couple months and find that you went and dropped like four new plugins smh how am I gonna keep uppp

young prism
#

Hey @unreal haven question: Is there a way to store scenes in ROM as metatiles, other than converting a normal scene to metatiles upon load? Also, is it possible to convert the metatile16 + scroll scene plugin to use 4x4 (32x32) metatiles? It looks doable but IDK if it would break something

#

To clarify re: my first question. I want to know if it's possible to "define" a scene of metatiles in an external c file and then "load" that scene as you would load a regular scene

#

Or, possibly, replace all the metatiles in a particular scene with the predefined ones

unreal haven
#

For the ability to have an external file, not really, which is why it work the way it does right now by having the load metatile event which upon compiling will rewrite the scene tilemap file with the metatile ids.

#

As for having it a 32x32 metatile version that would require to rewrite a separate version (again) with it in mind.

young prism
unreal haven
#

yes thats how it works

young prism
#

Oh cool

#

That kinda eliminates the need for separate files then

unreal haven
#

If you check the code of the load metatiles event, you'll see that on compile it'll parse trough the scene tiles to check for matches with the tiles in the metatile scene and then assign the Ids of the matching metatiles, if a tile or group of 2x2 tiles is found in the scene that it cant match a metatile, it will throw an error during compile with the position of the non-matching tile

young prism
#

I assume that reduces the amount of bytes used by each scene?

unreal haven
#

yes

#

If you're using the 16x16 version that is

young prism
#

Ah yes

unreal haven
#

but even with the 8x8 version it'll remove the attribute tilemap

young prism
#

Can you have multiple metatile maps?

unreal haven
#

yes

young prism
#

This is game-changing

#

(pun intended)

#

Do you have to use a common tileset to scroll between metatile and non-metatile scenes?

unreal haven
#

You have to use common tileset to use the metatiles in general anyway

young prism
#

oh duh lol

#

Sorry, I'm at work and trying to get a grasp on how much I can do with this gigachad of a plugin

#

Approximately how fast is it to switch out an entire scenes' worth of metatiles on load? For generating new scenes

unreal haven
#

You're doing procedural scene generation?

young prism
#

Partially. At least, thinking about it

#

Right now I'm working on two ideas--one using metatiles + partial scene generation to get a massive game world, one using entirely procedural generation for the same thing

unreal haven
#

Well its doable, "fast" will be depending on what your generation code does

young prism
#

For example: in #graphics-help there's a post saying that you can probably fit about 300-500 unique scenes in the 4mb ROM size. Roughly, using metatiles, you could extend that to an upper limit of 2000, but GBstudio itself might run into performance issues with that many scenes. So I'm looking into alternatives, namely, reusing as many scenes as possible and changing metatiles here and there to make them less repeatable

young prism
#

I'm working on optimizing my generation code as much as possible

#

For some scenes, the replacements will be static, so those would be the quickest

unreal haven
#

Havent really benchmarked such a thing, so you'll have to see for yourself, but its litteraly just puttin an Id in an array, so the bulk of the workload is gonna be your algorythm

young prism
#

Thanks 👍

unreal haven
#

And also its best to do the generation in c code instead of script, since with scripting there's a lot of back and forth thus making things slower

young prism
#

I'm using multithreading combined with simplified generation schema in order to pre-generate the data before it's actually required, which is working out so far

unreal haven
#

There's also a submap metatiles event which allows you to submap sections of metatiles from another scene so that can be usefull too

young prism
#

Yeah, I'm thinking of using that to copy 4x4 chunks

#

This is the arrangement I'm trying to go with. I think it's a good compromise between unique elements and simplified processing

severe isle
# unreal haven Yes

Which P+ plugin is compatible with slopes?

Using P+ 4-alpha-0.1 results in the error:

Object file too large: playerstatesb.o 
Cancelled Build ```

Using `P+ 2-alpha` results in the error:
```Object file too large: platform.o 
Cancelled Build ```

Using the fork of P+ provided by the metatile plugin works, but attaching slope collision to a tile is like attaching no collision to a tile
unreal haven
#

Oh right, would probably need to rearrange P+ to be split even more, I remember P+ being pretty thigh on single bank space

unreal haven
severe isle
#

Potentially, but I could work around giving every scene metatiles if need be

unreal haven
#

well you can try going in the plugin's collison.h file and

#

Remove the else section and see if it'll fit the bank after

severe isle
#

Doing this now

#

Would it be possible to fix the Object file too large: playerstates.o error by deleting some features of P+?

unreal haven
#

Yes if you delete feature or straight up states that you dont want to use that can help

#

like for example, in 4-alpha-0.1 this is playerstates.o which doesnt fit the bank
You could get rid of the kockback state if you dont need it for example, or you could create a playerstatesd.c file and move some states in that new file

#

Same with playerstatesb.c which if you dont need wall jumps in your game, you could remove the wall_state

young prism
#

One more question: If I change the tileset a map is using, will the metatiles be affected?

unreal haven
#

You mean like, tileswapping the tileset to animate tiles?

#

I made a chart that is on the plugin's github that explains how its all mapped out
if you were to change the tileset, it would act just the same as without the plugin

young prism
unreal haven
#

Yeah same thing, it would work the same way as before

young prism
#

Cool. Thanks!

severe isle
severe isle
unreal haven
#

Which version of the metatil plugin are you using again? 16x16?

severe isle
#

8px

unreal haven
#

ok I was asking because the screenshot you posted above was using the 16x16 example project

severe isle
#

Ohhhh yeah, I was using that as a base to test out slope collisions

unreal haven
#

this is the limits for the 8x8

#

that leaves 1024 bytes for saves

severe isle
#

So if one variable is 2 bytes, that leaves 512 variables spread throughout three save slots?

unreal haven
#

The thing is that default GBS saves doesnt only save variables but a lot of other things like script context, stack, current scene, etc

#

If you were to use this plugin and want to use the 3 save slots, you could fit 170 variable (1024 / 3 / 2)

#

or triple that if you only use 1 slot

severe isle
unreal haven
#

You can change it but you have to make sure that :

  • it leaves enough SRAM space for the collision data + save data
  • the "width" must be a power of two (your scene width can be smaller but cant exceed this) and cannot exceed 256
  • Gotta recalculate the position of the __at()s for sram_map_data and sram_collision_data
  • Make sure to update meta_tiles.c and collisions.h with the same values
slim agate
#

Just wanted to say, whatever changes have come to the MetaTile16 plugin since feb 13th, seemed to have fixed this issue with parallax. I wasn't even using it, but having it in the plugin folder caused this issue.

The Newest ones from today dont have that issue.

unreal haven
#

mmh was probably fixed by another bug I spotted, glad that also fixed your issue

golden moat
#

Does the metatile plugin require GBS v4.2? When I try to open the demo projects without the screen scrolling support using v4.1.3 I'm not seeing anything.

somber spruce
golden moat
#

I've been hoping to use it for environmental hazards that vanish when you collide with them (so not walking on top, but touching the sides) and I have no idea whether that's possible or not with this plugin.

young prism
#

Hey @unreal haven sorry for the ping, but I have a couple more questions--

#
  1. Does the metatile + screen scrolling plugin work in color-only mode? I seem to remember there being limitations because of the split VRAM but i don't remember what they are
#
  1. If I disable automatic tileset loading by commenting out the appropriate function calls, would I be correct in assuming that it would use whatever tileset is currently loaded when rendering new scenes? And thus I could have more direct control over what tilesets are loaded at particular times
unreal haven
#
  1. all versions of the metatile plugin support color-only mode
  2. Yes you would assume right
young prism
#

Thank you!

golden moat
#

@unreal haven Can Metatiles have solid collision, yet still trigger something to happen when the player pushes against them, like an Actor set to a collision group?

#

(If not I'll just have to use invisible actors, but if I don't need to I would much prefer that.)

sour shoal
unreal haven
#

It works in all mode

sour shoal
severe isle
#

@unreal haven Could you please document how to get metatiles functioning for other P+ versions? Like what/where to modifiy a fresh P+ build to work with metatiles

The P+ plugin provided in the Metatile 8px project seems to be a modified version of the fork used in SMB Mini. I am not sure how to get the changes from the file working with a different version of P+, such as 4-alpha-0.1 which supports slopes.

young prism
#

Piggybacking off the above question, how drastically should I conserve space in SRAM in order for metatiles to work properly? I'm using single-screen (20x16) scenes

unreal haven
unreal haven
# young prism Piggybacking off the above question, how drastically should I conserve space in ...

if you're using the 16px screen scroll version, it takes the last 1280 bytes parts of SRAM leaving 6912 bytes for save data
if you're using the 16px version, it takes the last 3072 bytes parts of SRAM leaving 5120 bytes for save data
if you're using the 8px version, it takes the last 7168 bytes parts of SRAM leaving 1024 bytes for save data

Those limits can be edited in the plugins engine files

torn laurel
#

hey with ur copy scene submap to background plugin, does it not work if they scenes tiles are different? i was trying to kinda override the tiles from 1 scene to another as a workaround the tile limit

#

@unreal haven

golden moat
unreal haven
#

The "Copy scene submap to background" event needs to have the scene your copy from share the same tileset as the scene you copy to.
The "Copy scene submap to background tileset" can replace the tiles copied in the tileset VRAM but require that all the tiles you copy "into" must be unique tiles (see the pokemon example screenshot)

torn laurel
unreal haven
#

What does your setup looks like so I can have a clearer view of what you're trying to do

torn laurel
#

oh yeah ofc one sec!

#

here ya go

#

am i just being stupid? 😅

unreal haven
#

If you're not in color only mode, this wont work since there's too many unique tiles

torn laurel
#

yes but without sprites cant u go over the limit at all?

#

and even in color mode, it does this 😵‍💫

unreal haven
#

you still cant go over 256

torn laurel
#

for either scene? i assumed when i printed over the other scenes tiles what have less than 256 it would be fine? or am i mistaken?

golden moat
unreal haven
#

both scene have to be below 256 unique tiles if its not in "Color only" mode

torn laurel
#

but it is in color only mode now, so i am a bit confused?

unreal haven
#

As for why this wouldnt work in color only mode, Im not sure whats wrong, try setting the Copy tile attributes parameter to background

golden moat
torn laurel
#

yes ofc!

#

i was just messing around but i noticed it

#

ill send it over!

young prism
# torn laurel yes but without sprites cant u go over the limit at all?

You can't "get around" the limits, you have to be creative with how you use tiles to make it seem like there are no limits. If you copy a tile into a scene, it doesn't get "added" to the scene, it replaces a tile already there (and the limit is preserved). You also won't be able to see the "new" tile without redrawing the scene, and once you redraw, it'll replace every instance of the previous tile (because the previous tile no longer exists) and the limit is preserved.

#

The reason why the "copy scene submap to background" event requires a common tileset is because it's modifying the background data using the tiles already loaded. The "copy scene submap to tileset" plugin won't modify the background, but will modify the loaded tiles and replace the specified ones. So every instance of those tiles in your scene will be changed upon next redraw

unreal haven
#

Ah I figured out the issue, it was an issue with the plugin,
I wasnt checking if the tile Im copying from was from the other VRAM bank before deciding which tileset to read from

#

I'll upload the fix in a moment

#

@torn laurel Fixed, you can redownload the plugin from the github, I updated it

torn laurel
#

oh wow!!

#

thank u mico!!!

unreal haven
#

thank you stress testing it :p

torn laurel
#

glad i could help ya find a bug!!

torn laurel
#

can u resend the git? 😊

unreal haven
torn laurel
#

i assume i use v4? 😊

unreal haven
#

yes

torn laurel
#

thank you

#

❤️

#

works flawlessly now 😊

#

@unreal haven question! can it transfer over palletes? 😊 so if the scene im copying from has a different pallete, how good is it at transfering that? 😊

unreal haven
#

if you set Copy tile attributes parameter to background it will also copy palettes

torn laurel
#

okay thank u! ❤️

#

@unreal haven so i assume it doesnt work with automatic palletes? 😅

unreal haven
#

sadly no

#

only manual palletes

torn laurel
#

ah :/ is that at all planned for the future? 😊

unreal haven
#

I dont think its possible unless GBS changes how it is handled
Also when you copy the palette, it will still use the main scene colors since it only copy the palette indexes
So you'll have to change the main scene palette color depending on which scene you copy from

torn laurel
#

ah okay! 😊 thanks anyways!! im hoping its possible in the future!! could i possibly pay u to try see if its possible? 😊 idm paying!

unreal haven
#

No I'd rather not I dont like doing hobby stuff when it involves money, I keep that for work

torn laurel
#

oki doki!! ❤️

unreal haven
#

But I can think up of something and see if I can copy palette data from another scene

torn laurel
#

thank u!!!

#

it would just REALLY help is all

unreal haven
torn laurel
#

OMG THANK U!!

#

@unreal haven what does the commit function do? 😊

unreal haven
#

Commit will commit the color change imediately, so you have to keep it unchecked if its in a scene init script before the fadein, otherwise you'll see a flash

torn laurel
#

oh okay!

#

thank u!

severe isle
#

I tried to make it as generic and broad as possible for use in other projects

sour shoal
# severe isle Heres the sole P+ plugin, compatible with metatiles, split state files, slopes, ...

I got this error while compiling. src\core\meta_tiles.c:99: error 20: Undefined identifier 'tile_buffer'

src\core\meta_tiles.c:99: error 22: Array or pointer required for '[]' operation

src\core\meta_tiles.c:101: error 20: Undefined identifier 'tile_buffer'

src\core\meta_tiles.c:101: warning 154: converting integral to pointer without a cast

from type 'int fixed'

to type 'const-unsigned-char generic* fixed'

src\core\meta_tiles.c:107: error 20: Undefined identifier 'tile_buffer'

src\core\meta_tiles.c:107: error 22: Array or pointer required for '[]' operation

src\core\meta_tiles.c:109: error 20: Undefined identifier 'tile_buffer'

src\core\meta_tiles.c:109: warning 154: converting integral to pointer without a cast

from type 'int fixed'

to type 'const-unsigned-char generic* fixed'

1
Cancelled Build

severe isle
#

The project has a slightly older version of the metatile8 plugin, if you use the newest one it may cause an error

#

It looks like tile_buffer is defined in scroll.h for all metatile plugins, so make sure that file is located in the engine/include directory and no other plugin/engine edit modifies it

sour shoal
severe isle
#

Have you checked to see if any of your plugins have overlapping files? If two plugins edit scroll.h, only one plugin's edit will be accepted, which may be causing this error

young prism
# sour shoal I got this error while compiling. ...

This type of error occurs whenever a function referenced in one area of code isn't present where it should be, usually because a plugin file is missing or not what it should be. See KirbyKing's question ^^^

sour shoal
# severe isle I mean, which type of metatile plugin (8, 16, or 16+screenscroll) do you have?

Testing the 8x8 plugin. It was a conflicting plugin that caused the issue. But I ran into another problem. src\states\platform.c:349: error 20: Undefined identifier 'VAR_FRAMECOINS'
src\states\platform.c:416: error 20: Undefined identifier 'VAR_FRAMECOINS'
src\states\platform.c:426: error 20: Undefined identifier 'VAR_FRAMECOINS'
src\states\platform.c:512: error 20: Undefined identifier 'VAR_HITBLOCKID'
src\states\platform.c:513: error 20: Undefined identifier 'VAR_HITBLOCKX'
src\states\platform.c:514: error 20: Undefined identifier 'VAR_HITBLOCKY'

1
Cancelled Build

young prism
#

Same fundamental problem. Conflicting plugin. Id recommend building the project with only KirbyKing's version, then adding any other plugins one by one and seeing where the error occurs.

#

There isn't really a good solution for conflicting plugins other than manually merging them, which can be kinda tedious but allows you to use many plugins which alter the same files. Does require a little bit of programming experience, though, in case multiple plugins change the same element of game logic and you need to actually edit the plugins to make both possible

severe isle
# sour shoal Testing the 8x8 plugin. It was a conflicting plugin that caused the issue. But I...

I know this issue, thankfully its not plugins this time. You need to have a six variables named “COINS”, “FRAMECOINS”, “HITBLOCKID”, “HITBLOCKSOURCE”, “HITBLOCKX”, AND “HITBLOCKY”. Once you have them named, make sure they are used somewhere in the project. This is crucial for variables to be recognized by engine files.

This can be done by simply having an event group like:
Set $COINS to 0
Set $FRAMECOINS to 0
(continued)

unreal haven
#

Why are you using the super mario mini version of the platformer engine

severe isle
#

I imported the coin code from the Metatile8 project, is that alright?

#

The metatile8 project seems to be built off the MarioMini project

unreal haven
#

oh yeah right, I used the for the demo project

#

Wasnt meant to be used as a plugin itself (since I hardcoded a few things like those variables)

sour shoal
young prism
#

Bad alloc is a failed memory allocation

#

Not sure what threw the abort signal but something funky is going on

severe isle
#

I would suggest restarting your computer and recompiling.

#

Also possibly try the Metatile and P+ plugin together in a blank project, and see if this same error occurs

sour shoal
somber patio
#

Running into an issue copying to the BG. Everything from scene 1 copies fine, but scene 2 gets corrupted at the end. I initially had it strung together as one big scene and was getting the same issue. This is using the most up to date of the plugin.

unreal haven
#

My guess its probably due of how gbstudio compile the tileset to not cover the UI reserved area

#

Temporary solution would be to make sure the scene you submap from has either less than 128 unique tiles or between 192 and 256 unique tiles

unreal haven
#

Here, I pushed the fix on github

somber patio
sour shoal
#

I'm trying to add GumpyFuction's 'One-way Platform Snap Threshold' setting in the modified Platformer+ I got this error "src\states\playerstate_fall.c:504: error 57: Label undefined 'endYCollision'
" Here's the folder if anyone is interested in helping me out.

severe isle
#

I searched up "One-way Platform Snap Threshold", it looks like this is paid content from Gumpy Function's course?

#

I dont think Ill be able to help you, sorry

sour shoal
severe isle
#

Thanks for informing me! I was looking at the Lesson 6 overview, when this page has Lesson 6 project files:

#

Do you know if any of Gumpy Functions’ LBaP project files have any usage licenses?

#

I saw that he commissioned this specific P+ change, so Id like to make sure its alright to use

young prism
#

^^^ this is a generalization, not everything which is free to download is usable in a commercial project, but generally it's a pretty good rule of thumb. Check the license on the project.

sour shoal
sour shoal
sour shoal
hot grail
#

Hi Mico. If I remember correctly, you wrote a pull request that put animation states into the global header data? How would I use that to check an actors animation state?

unreal haven
hot grail
#

Got it thx

severe isle
unreal haven
#

Uh I could've sworn someone asked if you can replace all instance if a metatile, anyway
I added a replace collision event so that you can edit the collision of a metatile. Using that event with replacing the tileset tiles, you can do things like the P switch in mario games where it replaces coins for bricks and bricks for coins
https://github.com/Mico27/gbs-MetatilePlugin
The 8px metatile and 16px metatile example project shows exactly that

GitHub

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

torn laurel
#

hey question for mico27! what do all ya plugins do? 😊 just asking cuz they all seem very useful ❤️

somber spruce
somber spruce
#

What do the collision value fields in that plugin refer to, by the way? Are Spare Collision Types supported?

#

Ah right, I got it. For anyone else wondering:

Spare 8: -128
Spare 9: -112
Spare A: -96
Spare B: -80
Spare C: -64
Spare D: -48
Spare E: -32
Spare F: -16

unreal haven
young prism
#

If I've defined custom collision in engine.json, I assume that will be copied as well if it's part of the metatile?

unreal haven
#

yes

#

Just make sure your scene containing your metatiles uses the same scene type as the scene that uses them so that you can use the same custom collision configuration

young prism
#

Thanks!

somber spruce
unreal haven
#

the values you posted fit what the config has, flags are unsigned 8bit values so when you put in -16, its actualy 240 when casted as an unsigned 8bit.

sour shoal
#

How does this work exactly? Does it detect certain tiles or do I have to assign certain tiles as Collectables/Coins?