Tips & tricks - what would you like to see

2

Comments

  • ArmellineArmelline Member, PRO Posts: 5,354

    @Socks It's also worth remembering that one rule inside another and one rule with 2 conditions are functionally different. Sometimes you need both together, sometimes you need to stack them. And of course, when taking into account the otherwises, the two become even more different.

    So although in some cases you can benefit here, sometimes you'll be forced to combine the conditions to get the result you desire.

    Interesting stuff, though!

  • app_sauceapp_sauce Member, PRO Posts: 206
    edited June 2015

    I did a few games on another engine that used its own scripting language and this seemed to be the case in that engine when using nested if/else statements. For example,

    if color == 1 && global.gameOver == false
    {
    playerSpd = 1;
    }

    if color == 1
    {
    global.gameOver == false
    {
    playerSpd = 1;
    }
    }

    The second would be cleaner. Because it wouldn't check both conditions every step, it would only check the second if the first was run, otherwise the second condition would not execute.

    I guess the same is true for gs. I guess I'll have to go back and incorporate nesting in my gs projects!

    Thanks

    SocializeTwitter , **My Site ** **Play Loop Zen Free **iOS HERE, Google Play HERE

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069
    • 1) intermediate/advanced
    • 2) I'd love to know the bigger picture of how certain aspects of the engine work. In general we can test one way of doing things vs another with xcode tools, but i'm sure you guys creating the systems in the engine at GS have some insights we may not!

    @Armelline said:

    • Advanced
    • Honestly, the thing I'd find most useful is a fairly technical and in-depth look at how GameSalad operates "under the hood". Does it work harder to save a table with 5 cells or a list of 5 attributes? How does it decide its order of execution? What strain is a constrain attribute really placing on it? Getting down to the nitty-gritty that would allow for really tight optimisation and deeper understanding of how things work.

    Edit: Are animated gifs not working on the forums any more? They don't seem to work for me recently :(

    I think this sums it up pretty nicely.

    Follow us: Twitter - Website

  • app_sauceapp_sauce Member, PRO Posts: 206

    1) level - intermediate
    2) tricks I'd like to learn - I would like to learn more about the trig functions. But, as far as the engine goes, I agree with @Armelline . I don't expect gamesalad to give us an inside look at their tech or anything that could compromise their business. However, they could maybe publish a best practice guide to optimisation and clean "code" within gamesalad.

    SocializeTwitter , **My Site ** **Play Loop Zen Free **iOS HERE, Google Play HERE

  • SocksSocks London, UK.Member Posts: 12,822

    @Hopscotch said:
    Fancy that! :D

    . . . but much worse than that, much much worse . . . I was wrong !

    :smiley:

  • SocksSocks London, UK.Member Posts: 12,822

    @Armelline said:
    Socks It's also worth remembering that one rule inside another and one rule with 2 conditions are functionally different.

    Yes, that's the thing that's not immediately obvious, Rule:conditionA+ConditionB looks to be doing the same thing as Rule:conditionA > nested > Rule:ConditionB . . . . but apparently not !

    By the way, to actually see this effect I had to generate 1,400 actors all running these two alternative rules, so in everyday use it probably wouldn't make much of difference, but in situations where you have - for example - dozens of actors running around the screen, firing off dozen of bullets each (and asteroids, never forget the asteroids) - and each of these actors has a number of conditions - then I'm going to guess you would start to see some noticble improvements in processor efficiency.

    @Armelline said:
    Sometimes you need both together, sometimes you need to stack them. And of course, when taking into account the otherwises, the two become even more different.

    Yep, that was my first suspect in hunting down the reason for the stark performance difference, I thought that one rule was constantly having to check/calculate the otherwise section - so I dumped my otherwise rule (from both alternatives), a simple change colour channel to 0, expecting the difference to disappear, but the difference remained !

    @Armelline said:
    Interesting stuff, though!

    Agreed, 100% the kind of thing I'd like to see more 'Tips & tricks' about !

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    @Socks said:

    Curious to know, with 1400 actors, what kind of performance impact did you see with the rules being multi conditional instead of seperate nested rules?

    Follow us: Twitter - Website

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @AlchimiaStudios said:
    Curious to know, with 1400 actors, what kind of performance impact did you see with the rules being multi conditional instead of seperate nested rules?

    In the multi-conditional version - I had a very long list of wilfully complex conditions starting with a when touch is pressed at the top.

    Running without touching the screen gave me 21fps.
    Running with my finger on the screen gave me 21fps

    In the nested version - I had a rule with a single when touch is pressed condition - and nested within that rule the same very long list of wilfully complex conditions (except of course the when touch is pressed condition).

    Running without touching the screen gave me 60fps.
    Running with my finger on the screen gave me 21fps

    The obviously conclusion is that in the nested version GameSalad is only processing all the maths and conditions (I threw a lot at it !!) once the first condition (in the rule above the nested rule) is met - in the multi-conditional version, even though the first condition is not met GameSalad still ploughs on ahead and calculates and checks all the other conditions.

    Obviously the difference between the two all depends on the number and complexity of the rules. I was using lots of stupid stuff like: if 7464.92983023703703039 * (sin(309303.3097230933093020309) cos(39283930933890.3890))(sin(309303.3097230934493020309) cos(392839304344433890.3890)) *87.2828282821283987231 is not equal to 1464.92983023703703039 * (sin(309303.3097230933093020309) *cos(39283930933890.3890))(sin(309303.3097230934493020309) *cos(392839304344433890.3890)) *87.2828282821283987231

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    @Socks said:
    Obviously the difference between the two all depends on the number and complexity of the rules. I was using lots of stupid stuff like: if 7464.92983023703703039 * (sin(309303.3097230933093020309) cos(39283930933890.3890))(sin(309303.3097230934493020309) cos(392839304344433890.3890)) *87.2828282821283987231 is not equal to 1464.92983023703703039 * (sin(309303.3097230933093020309) *cos(39283930933890.3890))(sin(309303.3097230934493020309) *cos(392839304344433890.3890)) *87.2828282821283987231

    Thanks for sharing! 40 FPS is huge, although I doubt we'd ever see close to that kind of change in real world, it still shows it's significant.

    Follow us: Twitter - Website

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @AlchimiaStudios said:
    Thanks for sharing! 40 FPS is huge, although I doubt we'd ever see close to that kind of change in real world . . .

    Yeah, I'd say it's something that's worth considering for actors with lots of conditions, or even in situations were you have just two conditions, but one of those conditions is a very involved calculation, something you don't want to force GameSalad into calculating on every single cycle of the code when the preceding condition has already not been met.

    For example I have quite a lot of moderately long calculations like . . . . magnitude( game.A X - self.Position.X +(( self.Size.Width /2)cos( self.Rotation )), game.A Y - self.Position.Y +(( self.Size.Width /2)sin( self.Rotation )))-( self.Size.Width /2) . . . or . . . ( scene.Camera.Size.Width * 0.475)*cos ((- game.Camera Skew *sin ( game.Time * game.Camera Skew time ))-18)+ scene.Camera.Size.Width /2 . . . that I was entirely unaware were being repeatedly calculated on each cycle.

    So even with just a couple of conditions it seems it may well be worth nesting.

    @AlchimiaStudios said:
    it still shows it's significant.

    Well you can reduce the whole conversation to one of which set of conditions is faster to process A, B, C, D, E, F, G, H, I, J and K - or just A . . . . so if A, B, C, D, E, F, G, H, I, J and K are all just when attribute = 10 we probably wouldn't see much difference at all between nested and multi-conditional set ups.

    EDIT - just tested with the same 1,400 actor project, when the conditions are simple checks (like when self rotation = 0 . . . or when self alpha = 1) the difference between the two is very small (~58-59 fps vs ~59-60fps).

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069
    edited June 2015

    @Socks said:
    EDIT - just tested with the same 1,400 actor project, when the conditions are simple checks (like when self rotation = 0 . . . or when self alpha = 1) the difference between the two is very small (~58-59 fps vs ~59-60fps).

    I know we are straying little from topic here. But I had an idea, going to test it later.

    Since GS checks rules on the whole scene vs whats in camera, you could feasibly put all rulesets/behaviors/logic into simple single condition checks of camera position or camera controllers position in the scene. This would mean that anything not in camera only triggers when close to/in view.

    It theoretically would help with actors that have tons of rulesets, but don't always need to be active if not being displayed, or if you have particularly large scenes.

    Follow us: Twitter - Website

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @AlchimiaStudios said:
    Since GS checks rules on the whole scene vs whats in camera, you could feasibly put all rulesets/behaviors/logic into simple single condition checks of camera position or camera controllers position in the scene.

    Yep ! I do this !! I did some testing for the this very purpose - and what you don't want is a magnitude calculation as your first condition as you will be forcing all your actors into making that measurement on each cycle when the actor's normal rules (or at least the first condition) could well be less taxing - for this purpose I found that collision is more efficient than magnitude, so you can constrain a screen sized / invisible actor to the camera (or make its layer non-scrollable) and then actors can check for collisions with this area (make it bigger if you need actors to leap into life slightly before they come into view) - but each game is going to be different, and you'd probably want some actors to be inactive when off screen and other to be active, so you'd probably want to do it on a actor by actor basis, and even here if you had actors that needed to remain active while off screen you could certainly switch visual effects off, like colour changes and animations and spinning, wobbly stuff and so on.

    If a moderator wants to / or can be bothered / hacking this conversation out into its own thread that would be good, as it's kind of overtaken the thread a little :* :o

  • neomanneoman Member, BASIC Posts: 826

    @KevinCross Welcome back! Good to see you on the forum again. @Armelline and @Socks cheers for the video and for the demo file ... :wink: And hope you are better now Armelline ... :smile:

  • PhilipCCPhilipCC Encounter Bay, South AustraliaMember Posts: 1,390
    edited June 2015
    1. Deluded beginner who thinks he is an advanced intermediate. :D
    2. Tables and Functions... and Best Practice... and Pathfinding... 7ths chords... Oops, wrong forum!
  • freneticzfreneticz SwedenMember, PRO Posts: 774

    we should have a thread with performance optimization

  • imGuaimGua Member Posts: 1,089
    edited June 2015
    1. advanced
    2. I would love to know how can I package gs game to run on Windows (as an .exe). But it's more of a hack I guess. If it's possible.
  • owen_dennisowen_dennis Just a guy, you know. Member, PRO Posts: 236
    edited June 2015

    1) I'm probably intermediate at this point. I really am not going to be able to figure out functions on my own to save my life, but hey, I went to art school cause I got a C in math and A+ in art!

    2) I would like a some updated images and lists of how to do adhoc testing, setting up your device for testing, and getting things onto the app store. I don't know exactly how it is now, but when I was first starting to do adhoc testing I had to watch a bunch of old videos by tshirtbooth and everything was out of date. It took a lot of work figuring out how everything functioned. Right now, it's all functioning, but I have no idea what I'm doing. I'm afraid if I change one setting on my ipad or some provisioning profile or something that the whole thing will fall like a house of cards. I'm afraid to update anything because I'll never figure out how to get it working again.

    What even is a provisioning profile? Why do I need it? How many do I need? Do I need a different one for each game? For awhile, I didn't understand that I could just load a new version of my app onto my ipad through xcode without making a new provisioning profile every time, so now I've got like a dozen of them just sitting on my computer. What even is xcode? Is it a language or an app? People were referencing it all the time without ever explaining what it was.

    Seeing as this is a product designed for non-programmers, stuff like that would be helpful for people that are just starting out. These are all very programmer heavy things that a paralyze non-programmers with fear and is perhaps one of the largest hurdles to entry.

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @owen_dennis said:
    2) I would like a some updated images and lists of how to do adhoc testing, setting up your device for testing, and getting things onto the app store. // Right now, it's all functioning, but I have no idea what I'm doing. I'm afraid if I change one setting on my ipad or some provisioning profile or something that the whole thing will fall like a house of cards. I'm afraid to update anything because I'll never figure out how to get it working again.

    Lol, agreed, that's another area I am pretty much clueless about, and like you say it all feels so precarious that I rarely want to update my iPad viewer or in any way getting involved in all that iTunes-connect-Xcode-profile madness as I don't know what I'm doing, when I have set up the viewer it was only after 3 or 4 hours of pressing buttons and dragging things from one place to another and guessing at settings and repeatedly clicking on things that I haven't got a clue what they are doing - but miraculously I've got there a few times, but I don't know what I did to make it work, so need to start from scratch each time - it's a nightmare.

    @owen_dennis said:
    What even is a provisioning profile? Why do I need it? How many do I need? Do I need a different one for each game? For awhile, I didn't understand that I could just load a new version of my app onto my ipad through xcode without making a new provisioning profile every time, so now I've got like a dozen of them just sitting on my computer. What even is xcode? Is it a language or an app? People were referencing it all the time without ever explaining what it was.

    Absolutely ! That was one of the big issues for me, when I sat down with all the recommened videos I thought they would walk me through the whole process from the start, but most of them start with quite a few assumptions already in place, so rather than saying "Ok, first we are going to start with the basics, what is a provisioning profile, why do you need one and what do they do . . . ' - instead the videos I watched tended to start like this: "Ok, I'm going to assume you have your provisioning profiles installed in the standardized Xcode formatting configuration (with the registry number preceding the target value of your current build version)" (me: "wha . . . what !?")

    It felt like teaching a child to count to ten, rather than: "Let's learn how to count to ten, ok, here we go . . . 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 . . ." instead there seemed to be a lot of: "Ok, I assume you've all got your starter numbers in place" (me: "What !? What's a starter number !?") "Right, now go to your previous starter number's reference value and add the reverse value of your com.Apple.number.offset which will be your offset" (me: "What?!??") "now we can skip the next section as it will just be a repeat of your previous numbers (either 4, 5, 6 or 5, 6, 7 depending on your current versioning version of the version profiler version)" (me: "&^%*!!!") "Right so from there on it will be 3, 4, 8, 9 (then repeat the offset value), then if you have a duplicate or secondary com.Apple.number.offset it will be 12". :smiley:

    @owen_dennis said:
    Seeing as this is a product designed for non-programmers, stuff like that would be helpful for people that are just starting out. These are all very programmer heavy things that a paralyze non-programmers with fear and is perhaps one of the largest hurdles to entry.

    These have been exactly my thoughts, GameSalad is aimed at the non-programmer, at designers and teachers, businessmen and students - yet the stuff outside of GameSalad itself (ad hoc / profiling / publishing / Xcode set ups etc) seems to break that drag-and-drop non-coding philosophy - and I agree that it's a enormous hurdle to entry - I know a lot of that stuff is out of GameSalad's hands, but users don't need the system changing, they just need it explained clearly. Ultimately the goal here is to make something appear on a mobile device - but I feel that stage is somewhat unsupported - there really needs to be an up to date (and kept up to date) comprehensive walkthrough that makes no assumptions about the users knowledge/experience.

  • JSprojectJSproject Member Posts: 730

    1) your experience level - intermediate/advanced
    2) what topics you want to learn about - deep dive from the developers into how we can optimize our logic for performance (as touched on by others in this thread).

    @owen_dennis and @Socks in regards to provisioning profiles, device testing etc. @Thunder_Child has done some great and up to date tutorials which should have your bases covered. You find them here:
    https://www.youtube.com/channel/UC_bqytdPTZklSPdb1qXC68A

  • Thunder_ChildThunder_Child Member Posts: 2,343

    @JSproject

    owen_dennis and Socks in regards to provisioning profiles, device testing etc. Thunder_Child has done some great and up to date tutorials which should have your bases covered. You find them here: CORRECTED LINK

  • owen_dennisowen_dennis Just a guy, you know. Member, PRO Posts: 236

    @Thunder_Child said:
    JSproject

    This is good and helpful to have, thank you! The fact of the matter is, however, that every time I wanted to find that stuff out I had to google it and then find some thread from years ago that linked me to a movie that was removed.

    It should be in the gamesalad glossary area as an official thing that is updated whenever xcode or apple updates their site. It's a hassle for sure, but it's necessary. You shouldn't have to visit the forums and ask someone post a video to help you set up your device, it's the most basic and fundamental goal of this software and it should be readily available in the glossary.

  • vikingviking Member, PRO Posts: 322

    1) your experience level - intermediate
    2) what topics you want to learn about - I would like to learn more about pre-planning a project. Programmers I know who ship AAA games tell me that knowing how to structure your systems during pre-production is key. I usually build my games organically and often pay for it later when my spaghetti code becomes a big mess. More ideas on how to structure and pre-plan a project would be awesome!

  • Thunder_ChildThunder_Child Member Posts: 2,343

    @owen_dennis said:
    It should be in the gamesalad glossary area as an official thing that is updated whenever xcode or apple updates their site. It's a hassle for sure, but it's necessary. You shouldn't have to visit the forums and ask someone post a video to help you set up your device, it's the most basic and fundamental goal of this software and it should be readily available in the glossary.

    Lol. Pretty sure that just hit a funny bone !

    I will update and clean up those vides as needed to they don't become outdated.

    Thanks.

    Now back to the original thread discussion folks

    :smile:

  • owen_dennisowen_dennis Just a guy, you know. Member, PRO Posts: 236
    edited June 2015

    Well that's a little rude in your first sentence and thanks in your second sentence I guess? I don't know the tone here?

    I'm not asking for videos from gamesalad here, just to check apple and xcode once a month, see if it's still what it's always been, and if not, then update some screencaps and the directions in the glossary. It shouldn't be the a volunteer job from a member of the forums, it should be something that is official.

    Because what if you stop volunteering to do this? Do you think you'll still be updating those videos two years from now if you've moved on to some other platform? I don't know what ever happened to tshirtbooth, but he seems to have disappeared. That's what happens to volunteers after awhile. The videos are absolutely helpful and I and many others appreciate them, but it doesn't negate the fact that there should be more in depth, official documentation on something that is so fundamental to the program.

    If I started working in gamesalad today, and had never looked at the forums, I would probably still have a lot of trouble doing something that is the core foundational idea of what this program was built for. I would still end up googling it and finding fan made videos that are out of date, and I would wonder if I was doing it right and would eventually have to head to the forums to ask what's going on. It's especially frustrating because often some of the first comments are "search the forums and you'll find it", which just loops you back to the beginning of this whole process.

    None of that should happen. There should be step by step, up-to-date, official instructions for total newbies on how to test adhoc that can be found in the official documentation.

    I love your videos, I just don't think they should have to exist.

  • supafly129supafly129 Member Posts: 454

    1) Intermediate
    2) Same as @Socks and @Armelline I'd love to know how to best optimize my games and understand how tables/rules/attributes can impact performance

  • RedRoboRedRobo Member, PRO Posts: 682

    1: Intermediate
    2: The relationship between Gamesalad and the Android SDK/SDK manager. I still find this a bit of a dark art...like when does Gamesalad actually utilise the SDK on my machine and is it important to have all versions or only the latest and why?

  • SocksSocks London, UK.Member Posts: 12,822
  • Thunder_ChildThunder_Child Member Posts: 2,343
    edited June 2015

    @owen_dennis said:
    I love your videos, I just don't think they should have to exist.

    What the heck? How was I rude?

    When I said you hit a funny bone...I guess that could be thought of as rude. (Mind blown)

    It just so happens I believe someone in the GS staff saw the comment...knows about my videos and mentioned including those in the cookbook.

    That's exactly how GS should do it. Yes they could make videos but the forums are superb for providing them...by peeps like me...@Braydon_SFX @tshirtbooth @The_Gamesalad_Guru and others. I guess that makes me wonder where you think it should stop? Should there be a video to calculate the vector of the dangle and the dangle? The answer is no.

    You mentioned tshirtbooth but he made them for the forums...as a member of the forums. I don't believe he was required to do it either nor do I completely agree GS should either.

    I suppose you also feel there should be step by step for testflighting...or how to publish to Google Play...or how to interpolate an actor to move to a certain position...

    GS provides the code to do something...IT IS for you to figure out how to do it...or ask the forums.

    Sorry I don't agree with you about me being rude. You didn't get it. It was a good thing. Your blind over your noobness is getting the better of you. But it's ok...I've been there too.

    This is kind of a bummer you said that just after you did I outlined a complete new set of tutorials including explanations about what things mean. Kind of blew the air out of my sails.

  • pHghostpHghost London, UKMember Posts: 2,342

    @owen_dennis GameSalad is about making the games. Managing certificates and such is a separate issue that has nothing to do with GS itself, you need to do it even if you develop coding from the ground up. Luckily, there are a lot of great people here who will point you in the right direction and help out, but there is absolutely no obligation on the side of GS to make a tutorial for something that is not even done in their software. On their side it is all automatic. If you generated and installed all certificates and so (Apple's requirements) correctly, GS will sign for you automatically.

    Anyway, if you want to discuss it more, open a new thread, so this one can stay on topic.

  • owen_dennisowen_dennis Just a guy, you know. Member, PRO Posts: 236
    edited June 2015

    Oh, well it looks like I misunderstood your intent in the post then. I thought "hit a funny bone" was you laughing at me for suggesting what I suggested, which felt rude, but I misinterpreted. Sorry about that. Don't let that anything take the wind out of your sails, they really are great videos!

Sign In or Register to comment.