As someone requested, I have uploaded the extension to my itch.io page since the Clickstore has been unavailable for a little bit:
Please login to see this link.
Don't have an account yet? Then register once and completely free of charge and use our wide range of topics, features and great options. As a registered member on our site, you can use all functions to actively participate in community life. Write posts, open topics, upload your pictures, put your videos online, talk to other members and help us to constantly improve our project and grow together! So, what are you waiting for? Become a part of us today!
Login or registerTo get support for a technical issue such as installing the software, to query a purchase that you've made/would like to make, or anything other than using our software, please visit our Customer Service Desk:
Open a TicketAs someone requested, I have uploaded the extension to my itch.io page since the Clickstore has been unavailable for a little bit:
Please login to see this link.
It's more about how many objects are on a single "row":
Linky's example is what is known generally as "packing a 2D array into a 1D array" (well, or many other variations of that phrase).
Here's an article about it with pretty easy to read code in Python: Please login to see this link.
Basically it boils down to:
1) Know how many things ("columns") can occur in each "row" (in this case, the "row" is a single exact Y pixel-position); if you need 1,000 objects on one "row", you need to define the width to be 1,000 "columns"). This width is does not have to be width of the screen (although this is easiest and is what I've outlined below more or less; if you don't need 100% accuracy you can use fewer values by dividing the width of the screen by 10 for instance, but the rest of the math gets a bit trickier).
2) Define the length of the final array (this isn't needed in the pure numerical example in your case, but it is helpful to know what the highest possible value would be): this is always the number of rows * the number of columns in each row.
3) Find the range of positions that represent the row for a given object:
Y-position-of-object * width
which would be:
Y( "Group.Friends" ) * 1280
4) Add the X index to this position for a given object:
Y( "Group.Friends" ) * 1280+ Alterable Value B( "Group.Friends" )
For example:
1) You need to represent up to 1,280 objects on a row (this is how many horizontal pixels there are).
2) There are 720 vertical pixel positions in a 720p resolution screen.
This means the maximum value for an object is 921600.
3) For an object at X=123 and Y=420, the row "block" is:
420 * 1280= 537,600
4) And the X index is 123, giving a final sort number of:
537,600 + 123 = 537,723
Another object might be at X=574, Y=420, giving:
420 * 1280= 537,600
537,600 + 574 = 538,174
Which means it would be sorted "after" the first example object, and therefore drawn over it (if they are large enough to overlap).
Linky correct me if I messed up anyway plz
[Edit: I did fix my math after remembering that you need to do more work to make the 2D array lower resolution than the full width of the screen.]
(For anyone else who finds this thread in the future...)
This is the closest to a canonical place to find effects as far as I know:
Please login to see this link.
Easiest way to do this just for cubes would definitely be to create 6 planes using a bit of event code or XLua code.
I figured it out! The code got a bit messy, but I think it works
Thanks a ton for posting the solution you ended up going with, I wish more people did this! It is very helpful for others in the future.
That is a really amazing level of uptake! Congrats. Any tips to do that?
Also have you considered something like offering people an extra "X" levels for $0.99 once they finish the first 10/20/30 or some other kind of add-on pack instead of running ads? Some users (like myself) won't even consider a game that has any kind of intrusive ads (so yeah I don't play a ton of games on mobile lol).
I'd be amazing to test the difference in financial performance between something like that (which I always feel more comfortable with) vs. ads, but of course you'd have to be careful and use a good A/B test model so that roughly half the users get the original scheme (based on if their Game Center ID is even or odd maybe?) and the other half get the tested scheme.
Anyway just a thought, and would love more info. Again, great job. Looks like a fun game too.
What primitives are you using? If planes then you can easily set this using the Texture Repeat Count X and Y values, I am not personally sure about the other primitives as they don't see to have these specific settings, but I'm sure it's possible somehow. For mesh objects you'd need to set the UV values properly in your external editor.
Please login to see this attachment.
I can't believe I didn't notice that, but thanks for pointing it out. Is it because the same event is firing two of the same projectile? Is the second "set angle" check just not working or is it applying it to the first of the two fired objects?
Yes, I believe it's because the same event is firing two of the same projectile. Aside from having a clone of the same object, you should also be able to fix it by splitting it into two separate events, one to fire the top & center and one to fire the bottom. This should ensure the scoping is correct for the second one.
I don't think the 3rd angle rotation set action is applying to the first launched object, because the first / top one remains oriented correctly (if it were setting it should be oriented downwards instead of upwards).
So, I'm guessing it's technically a bug of some kind in the set angle action, but as I can't see how the internals are implemented of course, can't be 100% sure. It could be something else or could even be as-intended for some other subtle reason. It's possible that, if this is the case, splitting the event in any way won't work but that would be... surprising to me, I would think that'd have been encountered before.
Yves could chime in maybe?
Yes, it will work in your simple example, but unfortunately, as I mentioned, this won't work in the case of my code because I need to select not only the Maximum but, at some point, also all objects positioned above the selected one or sometimes choose a couple of objects from the middle as well. It would be simple if we had it in the active object, just like the fixed value. Choosing Maximum and Minimum is not enough. I can do it personally, but it requires to create own Z-order system and control it during sorting. Workarounds that you have to craft for seemingly simple things. Such creations already require a certain level of knowledge, and CF has always been aimed at simple and fast creation.
For Clickteam, it's just adding a single return with the index position of the object in the oList and object scoping based on that value. For us, it's generating a significant amount of code, which will probably run slower.
You can compare lyrGetLevel() to anything you like, including for instance, another value's lyrGetLevel() value, which would tell you if it's above or below the given one.
I've also noticed this issue, though I can't say for sure that I used in the past it was pretty surprising to me -- especially if everything still remains index based. I had kind of thought that the change implied that everything would be more based on the assigned names, if that isn't the case this could be super confusing and furstrating especially for newcomers -- if two objects have different Alterable Values with the same name in different indices, I suspect that most people unfamilar with the index system will expect them to be the same "variable".
This may not help a ton, but maybe help a little bit, you have a WinBatch or Keyboard Maestro macro to press "Tab, Shift Tab, Space" x number of times for how many values you need to add, then bind that to a keyboard shortcut and press the shortcut after clicking on the blank area to the left of the New Alterable Values button. (I'm not sure if Keyboard Maestro lets you do parameters to input the number of repetitions you want, but you can do that in WinBatch for sure, or something similar.) Just a workaround though to make the labor less intensive. I'll see if I can get something to work like this in WinBatch and let you know if you're interested.
Linky raises excellent points that I was not fully aware of. In fact my first answer was going to be, don't worry about it just use frames on an Active.
This is an interesting method but I don't see how it would work properly if having say a playing walk animation in the left and right direction with 10 frames each? Unless I misunderstood something?
With this approach, the first 10 frames of the right animation would be "dummy" frames essentially, just a copy of the walk-right animation cycle.
When the active turns right there can be a delay for the frame number to be in the correct range, which could be 10 frames or could be 0 frames. So, the direction you'd get would be incorrect for up to the first 10 frames (numbered 0-9) until it gets past frame 11 and then at that point it would loop back to frame 11.
This may or may not work for your game based on your graphics and other interactions obviously.
In this clip, I have the frame speed set to 10 so it's easier to see the values changing:
Please login to see this attachment.I did just find a way to sort of do it, by using different loop values in the animation frames. This is just with 1 or 2 frames but it could work with actual animations too, such as frames 1-16 for left-facing and 17-32 for right-facing:
Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.
Again in this case, you can use the same input as used in the animation/movement logic (in this case mouse position, but it could be an AI variable for instance) in order to determine which one will be selected. Just one of many ways to do this:
* Always
Player_Head : Set angle to ATan2(Y( "Player_Head" ) - YMouse, XMouse - X( "Player_Head" )) (Quality = 1)
Player_Head : Set direction to Angle( "Player_Head" ) / 11.25
Counter 3 : Set Counter to CompareIntegers( "Immediate If Object", XMouse - X( "Player_Head" ), "<", 0, 16, 0 )
Is there some reason you don't want to use the input values and/or Alterable Values to determine the result?
Was thinking about pooling this morning and seems like the same object could be useful for that too.
Please login to see this attachment.
I see, do you know why the original error happens in the first place? The event works just fine when the Friend is facing the right, but it only acts up when the Friend (or any object) is facing to the left.
If I'm not mistaken, the issue is just less obvious on the right side because the shot graphics are oriented that way.
You can see here that the center and bottom shots are aligned to each other:
Please login to see this attachment.
The Particle Spray object has a lot of potential for blood and other liquid effects.
Quick example I threw together as a blood spray...
Please login to see this attachment.
It looks kind of like it might be a transparency issue. Do you use a transparency color or do you use an alpha channel for your spites?
If you're able to post an original Aseprite file and a mfa that show the issue (maybe make a new one as an issue reproduction sample, if you don't want to post your source files) I'll look into it, I have Aseprite as well (though I mostly use permanant markers and Photoshop for my sprites lol)
Ah okay, this makes more sense suddenly to me after seeing it in action for some reason.
The problem is essentially a scoping issue, I think. I was able to fix it by creating a clone of the Friend Attack object named Friend Attack 2 and modifying the actions for the third shot to use that object:
* FRIEND animation Laugh is playing
+ Current frame of FRIEND = 3
+ FRIEND: BulletToggle is off
+ FRIEND is facing a direction ...............
+ Only one action when event loops
FRIEND : Launch Blue Friend Attack toward ............ at speed 40
Blue Friend Attack : Set angle to Dir( "Blue Friend Attack" ) * 11.25 (Quality = 0)
FRIEND : Launch Friend Attack toward ............ at speed 40
Friend Attack : Set angle to Dir( "Friend Attack" ) * 11.25 (Quality = 0)
FRIEND : Launch Friend Attack 2 toward .............. at speed 40
Friend Attack 2 : Set angle to Dir( "Friend Attack 2" ) * 11.25 (Quality = 0)
the timer : Fire event "BulletToggleFriend" after 00''-15
Display More
(To keep collision detection simplified you'll want to apply a Qualifier to the shots so they all can be tested against at once, so that duplicate Friend Attack object won't be too much of an issue with other parts of the Eventing.)
Please login to see this attachment.
Almightyzentaco (Fusion 2.5 Tutorials)
Captain Quail (Firefly Tutorials)