-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modcharting Tools #2913
Modcharting Tools #2913
Conversation
lets not call triggerRedraw every frame
use shaders instead... |
shaders? but what about where the notes go around a certain shape like a square or circle? |
If you are talking about using fragment shaders to do positional effects for sustain trails, then that is just not viable. We would need to create a new camera or bitmap for each sustain trail. Which would be memory and performance intensive. If you are talking about vertex shaders, then we literally need to create more vertices to do positional effects. |
I've seen the use of shaders in sustains before. But in my opinion, the adding of separated parts to the sustains may complicate it |
Do you know what type of shaders they were? Meaning fragment or vertex. When people use shaders for sustain effects, i've always only seen fragment shaders. And from looking at their code, it was always kind of weird and limiting |
Fragment is everywhere, I've never seen anyone use vertex. (in the end, everything came out of shadertoy) |
Hmm, like I said, fragment shaders are limiting, because either you have to apply the effect to all sustain trails, or you need to create a new camera or bitmap for each sustain trails, which is going to be bad for memory usage. I could also imagine that it would be pretty costly for the performance, since you would be going through ~1million pixels for each trail, which is pretty bad in my opinion. But I guess it depends on what the funkin team thinks is best |
Yep. I do think they'll say it's best for the sustains to be one piece
only, might want to see when it is reviewed
…On Wed, Jun 26, 2024, 4:50 p.m. lemz ***@***.***> wrote:
Hmm, like I said, fragment shaders are limiting, because either you have
to apply the effect to all sustain trails, or you need to create a new
camera or bitmap for each sustain trails, which is going to be bad for
memory usage. I could also imagine that it would be pretty costly for the
performance, since you would be going through ~1million pixels for each
trail, which is pretty bad in my opinion.
But I guess it depends on what the funkin team thinks is best
—
Reply to this email directly, view it on GitHub
<#2913 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATNYONJWGU7MJA6Z55TAMI3ZJMSQZAVCNFSM6AAAAABJ4WLTZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGYYDKMJWGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
still work in progress
what kind of modcharts specifically need segmented sustains? |
when you use the shader on the sustain itself, the fragment shader will affect the graphic that is used for drawing, meaning you cant do any positional effects |
to demonstrate what i mean: void main() {
vec4 color = flixel_texture2D(bitmap, openfl_TextureCoordv + vec2(0.125, 0.0);
gl_FragColor = color;
} sustainTrail.mp4As you can see it doesnt change the position of the trail, rather it changes where to sample from the hold texture. The reason why i said that we need a camera is because the camera covers the entire screen and if we apply the 0.125 to uv.x then it would offset the entire graphic of the camera, which would be the expected behaviour. |
still needs to be fully implemented but end pieces work now
this time its alot better
why wasn't this here?
it wont be changable in the menus
closing for now, because i wont work on this for a while maybe just a few days, but idk |
:( |
reopening this, because i had an issue and maybe while im not working on this pr, someone can find a solution to it. polymod error: Could not import class funkin.play.notes.modifier.NoteTransform script: import funkin.play.notes.modifier.NotePathUtil;
import funkin.play.notes.modifier.NotePathModifier;
import funkin.play.notes.modifier.NoteTransform;
import funkin.play.song.Song;
class CoolModifier implements NotePathModifier
{
public function new() {}
public function calculateTransform(time:Float):NoteTransform
{
return new NoteTransform(0, time);
}
}
class HighSong extends Song
{
var modifier:CoolModifier;
function new()
{
super('high');
}
function onCreate(event:ScriptEvent)
{
modifier = new CoolModifier();
}
// im pretty sure i could just use onNoteIncoming
function onUpdate(event:UpdateScriptEvent)
{
for (note in NotePathUtil.getNotes())
{
note.modifier = modifier;
}
}
} |
Cannot import enums/abstracts/whatever in modules |
i just realized, im pretty sure hscript doesnt support multiple class definitions in a file. |
hscript does support multiple classes in a single file, like class One
extends Module, class Two extends Module, etc, but not two class One and
class One
…On Tue, Jul 2, 2024, 6:13 p.m. lemz ***@***.***> wrote:
i just realized, im pretty sure hscript doesnt support multiple class
definitions in a file.
guess i need to rework the modifier stuff
—
Reply to this email directly, view it on GitHub
<#2913 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATNYONKDSS6QCSRL6SGEH6LZKMQ2FAVCNFSM6AAAAABJ4WLTZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBUGU2DKMJSHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
hmm, maybe its something else then. currently i have an issue with this: im not on my pc right now so i cant give you the exact error, but it was something along the lines of: target class null i just imagined that the cause of that is having multiple classes in one file. |
ive tested it out with another script in base funkin: i get an error here: var testClass = new TestClass(); error: Could not determine target class for "null" (unknown type?) full script: import funkin.graphics.adobeanimate.FlxAtlasSprite;
import funkin.Paths;
import flixel.FlxG;
import funkin.audio.FunkinSound;
import funkin.play.character.MultiSparrowCharacter;
import funkin.play.GameOverSubState;
class TestClass {
public var cool:Int;
public function new() {
cool = 5;
}
public function print() {
trace(cool);
}
}
class BoyfriendCharacter extends MultiSparrowCharacter {
function new() {
super('bf');
}
override function playAnimation(name:String, restart:Bool, ignoreOther:Bool) {
if (name == "fakeoutDeath") {
doFakeoutDeath();
} else {
super.playAnimation(name, restart, ignoreOther);
}
var testClass = new TestClass();
testClass.print();
}
function doFakeoutDeath():Void {
FunkinSound.playOnce(Paths.sound("gameplay/gameover/fakeout_death"), 1.0);
var bfFakeout:FlxAtlasSprite = new FlxAtlasSprite(this.x - 440, this.y - 240, Paths.animateAtlas("characters/bfFakeOut", "shared"));
FlxG.state.subState.add(bfFakeout);
bfFakeout.zIndex = 1000;
bfFakeout.playAnimation('');
// We don't want people to miss this.
FlxG.state.subState.mustNotExit = true;
bfFakeout.anim.onComplete = () -> {
bfFakeout.visible = false;
this.visible = true;
FlxG.state.subState.mustNotExit = false;
this.playAnimation('firstDeath', true, true);
// Play the "blue balled" sound. May play a variant if one has been assigned.
GameOverSubState.playBlueBalledSFX();
};
bfFakeout.visible = true;
this.visible = false;
}
} |
This feels like something fit for mods/frameworks to implement, and not implemented into base code itself |
i never thought of making this a framework, but i guess that might just be better. |
Feedback and tips are appreciated.
ADDITIONS
NotePathModifier
interface for specifying the path that the note should followTODO
FILE ADDITIONS
assets/shared/images/NOTE_hold_assets.xml
assets/week6/images/weeb/pixelUI/arrowEndsNew.xml