Alon's Forum Posts

  • WOW! this is VERY impressive AllanR !

    I see how complicated it is and the glitches you've mention but the concept is really good!

    Not that I can understand most of the code, but this is very inspiring, thank you for sharing :)

  • Thanks for the advice Fib I'm still learning C3 as I go, containers are useful indeed I just need to start using them more often (like I'm using Families all the time for the same kind of objects on my code).

    I didn't think it's super complicated until Ashley explained how scary it is, especially for a really basic user (not even close to be advanced programmer hehe). I did saw some code examples in C2 even that it wasn't so many lines it wasn't easy for me to understand most of the code just like Ashley explained.

    Ashley I'm aware how busy you and the Scirra team are extremely busy, but is there a tiny chance to add such feature/tool in the future? maybe even inside the Drag-N-Drop behavior so we can control rotate/resize? or maybe nothing related to the Drag and Drop and just in a different form that will be easier to make "controllers" as extra to the Drag and Drop? I believe it could be useful for Touch (Smartphones) as well... but for now I focus on PC so I can't say.

    I'm aware it's less common for Construct users but in my case, my current project is not a game but a tool-set for creating content, so far it looks and works really nice with the features I want (HUGE thanks to the community help) so I'm aware that my suggestions / requests / and questions as a non-advanced programmer are either stupid or sound nonsesne, but maybe such behavior could be used for others as well.

    After all, the idea of Behaviors is AMAZING! and it save so much time for people like myself who can't understand how to code everything, I'm IN LOVE with C3 mostly because of how helpful they are! :)

    Anyway, I'll keep doing some tests... I may just replicate a C2 code which I don't really like because if I can't understand a code it will make things complicated for me later on... or I'll just stick to the current way everything works which is NOT the best for the typical user: "Hotkeys"... lots of them!

  • Hi All,

    I would like to try something on my project, but since it's huge already as I try to do it on a fresh-new file first I realize that I have no idea how to actually approach or do it at all.

    I have a Drag and Drop instances (different sprites) on the layout, I can Resize, Rotate, and reset to original size/rotation, using different keyboard shortcuts since there are different way to tweak them for example to resize with bigger scale steps you can hold the shift button, same for the resize.

    This is what I try to do:

    When I click with mouse on individual instant, I want to have a "Controller" appears that will alow me to do the actions I describe above, but I'm confused and not sure how to make the controller works in general and especially for each specific instance only when clicked

    Here is a nice visual example of what I'm trying to achieve (Jamboard):

    Is there any simple example file I can explore to see some efficient solutions to such thing?

    Thanks ahead for any help!

    Tagged:

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Thanks for the explanation!

    Use BBoxLeft, BBoxRight, BBoxTop, BBoxBottom expressions to position your panels.

    I think that's how I stopped the panels from getting out of the viewport, I'll give it a try!

  • Hi All,

    On my growing project I have floating panels for the GUI, since it's easier for me to design I used 9-patch (and I love it!) instead of redesign the panels manually.

    But I want them to STOP when collide with each other.

    The only idea I had is to create an invisible sprite with the same size of the panel, Pin it to each panel and code the Sprite collision... but I don't like this idea very much.

    Is there a way to do a collision for the panels using the 9-patch or it will be just easier with the way I just mentioned?

    The shorter/efficient code, the better. Thanks ahead! :)

  • I made the picker with drag&drop because it was faster. You can definitely change it to simple click, it should be even easier than what you have now with the circle. Simply clamp picker position to Canvas.BBoxLeft, Canvas.BBoxRight, Canvas.BBoxTop, Canvas.BBoxBottom.

    I'm almost there... it works but, not perefect:

    I'm trying to cleanup, or more like getting rid of ANY of the "round" wheel code with all the complicated unnecessary code but I made a mess, but I did get a bit closer to the goal after trying to add the clamp.

    It feels a bit clanky on the edges (I wanted it to keep sliding instead of being stuck), more like how the picker keep sliding on your version with the drag and drop or the original wheel, while touching the edges it didn't stop.

    I was afraid to delete any code or variables that used for the Wheel because I already made a mess, so I just disabled them for now, I think it can be a REALLY short code with the RGB Gradient box compare to the wheel.

    If you'll have a look, please feel free to mess around or delete anything that related to the Wheel code:

    DOWNLOAD C3 File Here

    Thanks ahead for any help!

  • OH! I see... Nice! :)

    I just added a temporary "after 2 seconds" instead of Start Layout (so the FullScreen will launch first) and it works like you said, I should probably do something like: "AFTER FullScreen complete" or "changed" it will need to paste the wheel again... because users may have different window sizes.

    Maybe I should re-paste the wheel every-time the "panel" will appear, I don't know what's the best way.

    I wish there was a more efficient way so it will work no matter what size of the window will be, but I didn't play with the "Windowed vs. FullScreen" options for users yet... it sounds super complex for now so I'll just go step-by-step solving the Color-Picker first.

    About the BOX Color instead of Circle/Wheel I tried to use your version with the box which is also more advanced but I couldn't get the picker to act like in the current version, I mean by clicking anywhere on the wheel instead of dragging the picker since it's faster.

    I think the code should be less complex because the Wheel have some extra round/radius code that I would happily get rid of... if I knew how of course.

    Thanks for the awesome help sensei dop! I'm learning new things from you all the time! :)

  • Thanks! dop2000 I always learn something new!

    EDIT ISSUE:

    It works almost perfect, but when picking color on half-bottom of the wheel it's a bit laggy at the EDGE of the wheel, can you please have a look?

    DOWNLOAD here

    BTW- (off topic) For efficiency sake: I Don't mind to changing the code from Circle Color Wheel to a traditional Cubic-Like shape if it will make the code shorter! (I just have no idea how to do that with the same drag and drop picker code).

    Thanks ahead! :)

  • Hi All,

    In my bigger project I have a "GUI" layer which sets both: Scale and Parallax to 0.

    Whenever I Zoom In/Out all the layers affected but the GUI layer is not since all the panels, menus and stuff that need to stay 100% the same size and position are there.

    Thanks to the kind help from the community I'm trying to add the color picker to the GUI layer.

    The issue starts after scaling the layout, the mouse x,y position ratio changing as well... or should I say NOT changing with the original 1:1 scale ratio of the layout.

    I don't really know how to fix this, so I created a mini file to show you the issue more visually:

    DOWNLOAD - Zoom Color Picker Issue C3 Project File

    .

    I'm not even sure what is the most efficient solution since it's only an issue with the "Picker" object, I don't need the mouse position ratio to be changed on any other drag and drop objects I have on my bigger project because everything works great, but I need to find a solution for the picker itself I guess, I'm confused...

    If you can solve and please explain either here or in the code using comments it will be very helpful to learn and understand, I hope it is not too complicated. Thanks ahead for any help! :)

    Tagged:

  • The gamma-correct gradient may be mathematically correct, but it looks wrong compared to gradients produced by other tools (like Photoshop, Corel Draw, Gimp etc.) The grey area in the middle is too large. It would be nice to have a option to choose gradient method.

    I couldn't describe it better... I'm years in the video/graphics/post industry and I can easily tell it looks wrong with all the respect to the way it actually works behind-the-scenes.

    It shouldn't be the default way for most users, especially artists who came from digital graphics to C3.

    Also, what is the "sprite gradient" everybody is talking about in this thread?

    I'm not sure, but maybe like in my example which is pure simple B/W gradient made in Photoshop compare to the one that created in C3 using the drawing canvas object.

  • I believe that the last (4th) number is for the Alpha channel which I don't want it to be under it's 100% (none transparent) since I need the alpha channel available as an extra parameter that I will actually tweak later on.

    I wonder if it's possible at all with the canvas object, because for now the gradient looks unbalanced as I showed in the examples above...

  • Thanks rokstars322 I had a feeling I did something wrong with the numbers, oops! :)

    I need to remember that it's 100 max instead of 255 like in true 24bit/32bit colors for post production video and digital graphic software.

    You're right it does look weird... it doesn't fill the area correct from start to end like it should:

    Hard for me to describe but it looks like it's unbalanced, the 50% middle point seems like it's WIDER or stretched in a way instead of well balanced from black to white:

    Ashley is there a way to get a more accurate Black to White gradient in C3 using the Drawing Canvas Object?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This post became VERY interesting thanks to all your different approaches and solutions! :)

    Sorry for this long post, I hope that some of you may find this interesting:

    Since I'm not a programmer, but I am a professional animator (my day job) and have years of experience with post production, my simple-brain wanted to try the same way I use when I work on a post production stage for a video.

    It's called "color grading" and it can get much more complex than what I tried here, but I think this will make my original goal (2 points gradient covers the layout) a bit more interesting with my approach joins to the party.

    .

    Basically in video post production we start with a simple "canvas" to do a color grading over specific group of layers by adding an adjustment layer on top and placing the needed effects over it (so you can dynamically change it at any time during production) and THIS is what I tried to SHOW on this file, based on the first file by noah since it was the most simple for me to look at.

    .

    I call this "FAKE GRADIENT" because it is probably NOT how an actual programmer will do this, also I'm not interested using the SPRITE Gradient way on a FULL canvas, because it will add extra space "size" to the saved file project for the user, also since it's already built-in and can be used with the Drawing Canvas with more Dynamic way to manipulate it using true-colors instead of a sprite.

    .

    As you can see, on the MIDDLE this is what I FAILED to achieve, covering the FULL area with gradient.

    on the RIGHT is I show how it SHOULD look like but I played with the numbers on the Drawing Canvas Gradient and couldn't get to the same result...

    I wonder if anyone can have a look and make the MIDDLE drawing canvas to look more like the RIGHT one because I believe that I can't get the covering numbers right...

    The final goal is to cover FULL LAYOUT SIZE with the canvas + gradient and not just a tiny cube which makes the quality looks smooth and amazing... color grading with less than 32bit true color covers a full screen may look REALLY BAD that's why I mention this.

    Play around with the color wheel, and look at the Middle and the Right examples to see what I mean:

    DOWNLOAD - Color Grading Project

    I'm curious to see this "Fake" way works on the drawing canvas without a SPRITE gradient!

    please feel free to share your versions :)