Thanks so much! Works like a charm! If I ever get this darn game finished I'll mention you in the Special Thanks!
Posts by azurie
Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
-
-
Thanks for taking a look at this. I'm using Direct3D 9. And I'll append the XML file that I've been tinkering with.
If it would help to reduce the complexity, flipping on the Y axis isn't particularly necessary.
Code
Display More<effect> <name>HueAndFlip</name> <author>Nobuyuki (Original by Nokola)</author> <description>Shifts the hue of the surface.</description> <parameter> // Name of parameter property <name>Hue Offset</name> // Parameter name (in the .fx file) <code>HueShift</code> // Description <description>Controls the hue shift offset.</description> // Type (int or float) <type>float</type> // Property type (EDIT, SLIDER, SPIN, CHECKBOX, COLOR) <property>spin</property> // Default value <value>0.0</value> // Optional : min and max values, not used by all the parameters //<min>0.0</min> //<max>1.0</max> </parameter> <parameter> <name>Flip Horizontal</name> <variable>flipX</variable> <type>float</type> <property>checkbox</property> <value>0</value> <description>Flips image on the X-axis.</description> </parameter> <parameter> <name>Flip Vertical</name> <variable>flipY</variable> <type>float</type> <property>checkbox</property> <value>0</value> <description>Flips image on the Y-axis.</description> </parameter> </effect>
-
I'm looking to merge two separate effects into one, flip and hueshift. I've appended code for each.
Payment amount can be discuss by PM.
Thanks,
Brian
Code
Display Moresampler2D img : register(s0); bool flipX, flipY; //Main Shader Function float4 ps_main(in float2 In : TEXCOORD0) : COLOR0 { float2 uv = float2(In); float4 color; if(flipX){ uv.x = 1.0 - In.x; } if(flipY){ uv.y = 1.0 - In.y; } color = tex2D(img, float2(uv)); return color; } technique tech_main { pass P0 { PixelShader = compile ps_2_a ps_main(); } }
Code
Display Morefloat HueShift; sampler2D Samp : TEXTURE0; #define QUAD_REAL float #define QUAD_REAL3 float3 QUAD_REAL3 rgb_to_hsv_no_clip(QUAD_REAL3 RGB) { QUAD_REAL3 HSV; float minChannel, maxChannel; if (RGB.x > RGB.y) { maxChannel = RGB.x; minChannel = RGB.y; } else { maxChannel = RGB.y; minChannel = RGB.x; } if (RGB.z > maxChannel) maxChannel = RGB.z; if (RGB.z < minChannel) minChannel = RGB.z; HSV.xy = 0; HSV.z = maxChannel; QUAD_REAL delta = maxChannel - minChannel; //Delta RGB value if (delta != 0) { // If gray, leave H & S at zero HSV.y = delta / HSV.z; QUAD_REAL3 delRGB; delRGB = (HSV.zzz - RGB + 3*delta) / (6.0*delta); if ( RGB.x == HSV.z ) HSV.x = delRGB.z - delRGB.y; else if ( RGB.y == HSV.z ) HSV.x = ( 1.0/3.0) + delRGB.x - delRGB.z; else if ( RGB.z == HSV.z ) HSV.x = ( 2.0/3.0) + delRGB.y - delRGB.x; } return (HSV); } QUAD_REAL3 hsv_to_rgb(QUAD_REAL3 HSV) { QUAD_REAL3 RGB = HSV.z; //if ( HSV.y != 0 ) { // we don't really need this since it just adds an obsolete instruction slot QUAD_REAL var_h = HSV.x * 6; QUAD_REAL var_i = floor(var_h); // Or ... var_i = floor( var_h ) QUAD_REAL var_1 = HSV.z * (1.0 - HSV.y); QUAD_REAL var_2 = HSV.z * (1.0 - HSV.y * (var_h-var_i)); QUAD_REAL var_3 = HSV.z * (1.0 - HSV.y * (1-(var_h-var_i))); if (var_i == 0) { RGB = QUAD_REAL3(HSV.z, var_3, var_1); } else if (var_i == 1) { RGB = QUAD_REAL3(var_2, HSV.z, var_1); } else if (var_i == 2) { RGB = QUAD_REAL3(var_1, HSV.z, var_3); } else if (var_i == 3) { RGB = QUAD_REAL3(var_1, var_2, HSV.z); } else if (var_i == 4) { RGB = QUAD_REAL3(var_3, var_1, HSV.z); } else { RGB = QUAD_REAL3(HSV.z, var_1, var_2); } //} return (RGB); } float4 main(float2 uv : TEXCOORD) : COLOR { float4 col = tex2D(Samp, uv); float3 hsv = rgb_to_hsv_no_clip(col.xyz); hsv.x+=HueShift; //if ( hsv.x < 0.0 ) { hsv.x += 1.0; } if ( hsv.x > 1.0 ) { hsv.x -= 1.0; } return float4(hsv_to_rgb(hsv),col.w); } // Techniques technique PostProcess { pass pass0 { PixelShader = compile ps_2_0 main(); } }
-
Hi, I've been messing around with the HueShifter and FlipX effects, trying to put them together in a single FX file. But to be honest, I'm outside my depths here.
Here are the code snippets from the FX files. Can anyone shed some light on how I might merge these two effects? I'd really appreciate any help.
Code
Display Morefloat HueShift; sampler2D Samp : TEXTURE0; #define QUAD_REAL float #define QUAD_REAL3 float3 QUAD_REAL3 rgb_to_hsv_no_clip(QUAD_REAL3 RGB) { QUAD_REAL3 HSV; float minChannel, maxChannel; if (RGB.x > RGB.y) { maxChannel = RGB.x; minChannel = RGB.y; } else { maxChannel = RGB.y; minChannel = RGB.x; } if (RGB.z > maxChannel) maxChannel = RGB.z; if (RGB.z < minChannel) minChannel = RGB.z; HSV.xy = 0; HSV.z = maxChannel; QUAD_REAL delta = maxChannel - minChannel; //Delta RGB value if (delta != 0) { // If gray, leave H & S at zero HSV.y = delta / HSV.z; QUAD_REAL3 delRGB; delRGB = (HSV.zzz - RGB + 3*delta) / (6.0*delta); if ( RGB.x == HSV.z ) HSV.x = delRGB.z - delRGB.y; else if ( RGB.y == HSV.z ) HSV.x = ( 1.0/3.0) + delRGB.x - delRGB.z; else if ( RGB.z == HSV.z ) HSV.x = ( 2.0/3.0) + delRGB.y - delRGB.x; } return (HSV); } QUAD_REAL3 hsv_to_rgb(QUAD_REAL3 HSV) { QUAD_REAL3 RGB = HSV.z; //if ( HSV.y != 0 ) { // we don't really need this since it just adds an obsolete instruction slot QUAD_REAL var_h = HSV.x * 6; QUAD_REAL var_i = floor(var_h); // Or ... var_i = floor( var_h ) QUAD_REAL var_1 = HSV.z * (1.0 - HSV.y); QUAD_REAL var_2 = HSV.z * (1.0 - HSV.y * (var_h-var_i)); QUAD_REAL var_3 = HSV.z * (1.0 - HSV.y * (1-(var_h-var_i))); if (var_i == 0) { RGB = QUAD_REAL3(HSV.z, var_3, var_1); } else if (var_i == 1) { RGB = QUAD_REAL3(var_2, HSV.z, var_1); } else if (var_i == 2) { RGB = QUAD_REAL3(var_1, HSV.z, var_3); } else if (var_i == 3) { RGB = QUAD_REAL3(var_1, var_2, HSV.z); } else if (var_i == 4) { RGB = QUAD_REAL3(var_3, var_1, HSV.z); } else { RGB = QUAD_REAL3(HSV.z, var_1, var_2); } //} return (RGB); } float4 main(float2 uv : TEXCOORD) : COLOR { float4 col = tex2D(Samp, uv); float3 hsv = rgb_to_hsv_no_clip(col.xyz); hsv.x+=HueShift; //if ( hsv.x < 0.0 ) { hsv.x += 1.0; } if ( hsv.x > 1.0 ) { hsv.x -= 1.0; } return float4(hsv_to_rgb(hsv),col.w); } // Techniques technique PostProcess { pass pass0 { PixelShader = compile ps_2_0 main(); } }
Code
Display More// Pixel shader input structure struct PS_INPUT { float4 Position : POSITION; float2 Texture : TEXCOORD0; }; // Pixel shader output structure struct PS_OUTPUT { float4 Color : COLOR0; }; // Global variables sampler2D Tex0; PS_OUTPUT ps_main( in PS_INPUT In ) { // Output pixel PS_OUTPUT Out; Out.Color = tex2D(Tex0, float2(1.0-In.Texture.x,In.Texture.y)); return Out; } // Effect technique technique tech_main { pass P0 { // shaders VertexShader = NULL; PixelShader = compile ps_1_4 ps_main(); } }
-
Hello all. I have a question regarding memory usage that I think is going to turn more into a suggestion to the Clickteam Devs.
Is there any way to remove an object from memory other than restarting the frame? I've done the basic optimizations of unchecking "create at start" and checking "load on call", and this does help a TON, but for bigger projects I would love to be able to micromanage when an object is removed from memory.
If there is no way to do this currently, mayhaps a "destroy and remove from memory" action would be good. Or an object property checkbox like "remove from memory when there are no copies of object in play". These are just some thoughts; I don't know how Clickteam works behind the curtains so I'm not sure if this would even be possible.
-
Hello everyone! I'm in a tough spot regarding controllers. I just submitted my game to Steam and they rejected it because of the following issue:
Failure:
Your build has failed our review because the "Full Controller Support" category appears on the store page, but the game does not appear to fully support the Xbox One controller during local multiplayer.With 4 controllers connected before launch:
Controller 1 will control player 2
Controller 2 will control player 1With 4 controllers connected before launch:
Controller 1 will control player 4
Controller 2 will control player 2
Controller 3 will control player 1
Controller 4 will control player 3I think what they're referring to is that the player light indicator on the xbox controller can mismatch what "player" you are in the game. I knew that this would happen occasionally, but it really has no impact on the game so I just kind of let it slide. Seems I can't do that anymore.
I'm using Joystick 2 object and I know that comes with a level of jank, but I have my events set up in a way where that can be swapped out pretty easily if need be (though I'd hate to lose my rumble settings). I'm pretty confident this is an issue occurring on the clickteam side of things rather than faulty events. Has anyone dealt with this before? Any suggestions would be great.
-
Sorry all, I've figured it out. It's been moved to the windows tab under Properties.
-
Hi again, I've encountered what I think might be a big issue. The game I'm working on i carried over from mmf 2.0 last year. In that file I (for whatever reason) had .ogg files unselected in the Sound Filters section. Here's an image for reference.
Please login to see this attachment.
So fast forward a year and I've replaced a bulk of my audio files with .ogg files. This has cut down on a lot of space. Everything was great! Until I built an executable. None of the .ogg files will play, and I believe it's because I had the .ogg files unselected in the old Sound Filters section in mmf 2.0.
My question is, is there a way to access the Sound Filters section in 2.5? It's certainly not in the same place as 2.0. I really hope somebody can help with this. This would be a really big hit to not be able to use .ogg files.
-
Thanks a lot! I'll have to go through and see if turning "Play sounds over frames" off will have an impact on anything.
I'm not really having frame drops or anything, just doing what I can. X)
-
Hello all. I have a question about Load on Call in the Data Elements menu. I understand that Load on Call for an object means it will not be loaded into memory until it is created during a frame. Then when you exit the frame it will be released from memory.
Is this the same for Load on Call for Data Elements? For example, if I play a song during a frame and it is loaded into memory, will it un-load from memory once the frame ends? I've got a ton of sounds in my game and I'm trying to optimize. If anyone has any knowledge on this, it would be very helpful. Thanks!
-
That alt value thing is what I ended up doing and it works. Thanks!
As for determining the order of object event resolution, I think you can see the order they resolve in by hitting the "import object" button in the event editor. The way that lists objects seems to be in line with the order that objects resolve their events
-
Surprisingly, this doesn't affect the order that object events resolve in. For example, say object 1 has a behavior and object 2 has a behavior. No matter how you order them, it seems the behavior for object 1 will happen first when events are being cycled through.
That said, I found an alternate solution to my problem so I'm good in that regard. But I'd still be curious to know if there is a way to reorder the way object events resolve.
-
Hi all. I'm having a bit of trouble with object events. I assumed the events would resolve in order from top to bottom of the workspace toolbar. But as far as I can tell, object events actually resolve in the order that the objects were created. Does anyone know if there is a way to change this order?
-
Hey ya'll. I figured out what was causing the extreme frame rate drop. Figure I'd share in case anyone else runs into this issue.
Simply, it was because I was using the joypad object. I can't say if it was because it was conflicting with something else, but I swapped out the the joypad object for the joystick 2 object and everything was fine.
-
Thank you. Much appreciated. I'll disable the compression as well. The stdrt.exe thing really drives me crazy so it's good to hear there's a way avoid that.
-
If you have "Compress the runtime" checked, you can try to build the exe without that checked. An app I was building was showing up in all my friends' emails as a virus until I unchecked that.
-
To create more global variables click on the application in the Workspace Toolbar, and in the Properties box, go to the Values tab. Press new to add more Global Values. You can double-click on the names of the values to rename them.
-
Hey ya'll. I don't have a lot of technical know-how, so my question might seem pretty simple. About the Compression Level, Compress Sounds, and Compress Runtime options... do they in any way affect the speed and performance of games, or just the filesize? I guess to simplify the question, is there any disadvantage to checking these options?
Bonus question: Does Enable Visual Themes affect performance?
-
It's a built exe that I'm testing with so its not the debugger. And I recently switched to direct3d and that has helped general performance but not the ridiculous frame rate drop. However, I do use controller polling quite frequently, so per Pisces' suggestion, I'll try turning that off to see if it helps.
-
What's weird is that when it's running at 4 FPS, it's at all times. And when it's running perfectly, it's at all times. It is a fairly intensive game in term of graphics and amount of events, but I've also tested other small games and gotten similar results.
It really does feel like a machine-specific issue; that just makes me wonder why I could run Five Nights just fine when it's also a fusion game.