You probably are aware of most of this already, but just in case since you mentioned it was a performance test - here’s a pic I snapped of it running on my laptop (2015 MBP) with the performance metrics turned on:
Some random thoughts about the performance, take with however many grains of salt you wish:
The stars have physics, not sure if this is intentional? If not, you can turn off the “is solid” checkbox and that will dial the physics processing time to 0
It looks like the Expressions are taking the most time (out of the behaviors), which kind of makes sense since you have more of those than anything else, but that’s definitely taking more time than I’d like. It looks like you could probabaly eliminate the “center x” and “center y” blocks and do that subtraction inside of the “new x” and “new y” blocks to save a couple of script evaluations.
I would be curious to see if using an Emit instead of Spawn would be slightly faster, since the objects will be getting recycled instead of created and destroyed. May be more trouble than it’s worth to test, just pointing out a potential avenue for exploration in case you’re interested.
DANG … I always forget to turn off the physics, lol.
Thanks for reminding me
And no worries, I appreciate any feedback, that’s why I put my stuff here in the first place. Learning something new with every tinker.
Yes, the expressions could be optimized, I totally aggree. That’s what my 1st drafts look like when I plug things in and out. Normally I go then with a comb through them and bundle everything nicely up.
Would maybe not look so thrown together if I would know from the beginning what I want and how to do it … but I don’t, haha
I will look into the emit, good suggestion, didn’t occur to me.
And to every other tinkerer here, just go for it. Don’t be shy to mess things up
Ok, cleaned up and changed a view bits. Now to the reason why the particle system wouldn’t have worked for me.
Press the cursor keys and you’ll see. You can also switch to fullscreen mode for a more immersive experience
This is still just a preliminary concept tinker. I didn’t really change the main expressions, just ‘wired’ them back to the main controller using globals. The FPS dropped significantly, have to dig down to see why. Maybe I try using messages instead, does anyone know if they are faster than globals?
I don’t think nicely bundeling it all up should make a difference by what I am aware off?
This is super cool! I tried to do something similar a couple months back with clouds but was only able to have a static view of them flying by. You also have WAY simpler code. It’s really interesting to see how you did this though. This is great!
Feel free to abuse it any way you like. The basics are actually not that hard, just google around for ‘Weak Perspective Projection’.
Or in layman’s terms:
projected x = 3D X/ 3D Z
projected y = 3D Y/ 3D Z
Looked simple enough for me to tinker around with. Math buffs will probably pull their hair out when they see how I (ab)used it, LOL. Extra bits added to the basic formula to get the fake camera movement.
You will find the same calculation in other tinkers of mine, like the 3D cube one and the Roadracer thingy.
I saw some starfield demos yesterday day and then it was like “HEY, what if I add a fake camera to that!”
So in a way it is a 3D particle system now.
For the sprite stackers here, could also be used for a fake 2.5D iso world level. As in, not only to have the ISO view, but to rotate the whole thing wink.
I’d like to see an entire game based around sprite stacking. I’m thinking it could be used to make a semi 3d action rpg. Obviously that takes a ton of work and commitment, but it would be pretty dang cool!
@thebrickccentric hey good to see you back! Did you get your computer fixed? Tink and I are back on Goblins — after a brief hiatus for a jam. I can catch you up if you’re able?