Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Hints and Tips

    General Discussion
    25
    60
    8362
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Zero Division
      Zero Division @Discostew last edited by

      @Discostew Not sure this is really true. Depends on the interpreter's implementation. If it parses to bytecode before execution, this might be a non-issue; variable names are probably not kept and likely simply become pointers under the hood. If it's a syntax-directed interpreter, you may be right.

      Zero Division 1 Reply Last reply Reply Quote 0
      • Zero Division
        Zero Division @Zero Division last edited by

        @Zero-Division @Discostew

        I usually strip out identifiers at the lexical analysis phase, so they're gone before parsing begins. The token stream produced retains the begin and end indexes into the original source code file for each token, which allows for things like printing error messages that reference the line and column where something blew up, recovering the name of a function, etc.

        Anyway there are so many ways to do it that I think we should resolve to measure the performance of FUZE on shared benchmark programs before making any assumptions about its performance characteristics: otherwise we're operating on pure speculation/superstition.

        Discostew 1 Reply Last reply Reply Quote 0
        • Discostew
          Discostew F @Zero Division last edited by

          @Zero-Division Dunno why I didn't do a simple test until now, but my assumption was wrong in thinking that shorter variable names produced faster results. I must have done some small but significant change with my code at the same time that resulted in faster processing.

          Zero Division 1 Reply Last reply Reply Quote 1
          • K
            kendog400 F @Zero Division last edited by

            On nitendo swotch this would be R1 (right top button) (user section) or L1 (preset Pgms)

            1 Reply Last reply Reply Quote 0
            • Zero Division
              Zero Division @Discostew last edited by

              @Discostew I suspected as much. We really need a way to get the text of a program off of the switch to share online that's less onerous than screenshots. Then we can really start to science the performance characteristics of FUZE with benchmarks.

              1 Reply Last reply Reply Quote 0
              • Zypher
                Zypher @pianofire last edited by

                This post is deleted!
                pianofire 1 Reply Last reply Reply Quote 0
                • pianofire
                  pianofire Fuze Team @Zypher last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • Spacemario
                    Spacemario F @Discostew last edited by Spacemario

                    @Discostew I was totally unaware of this, thanks!

                    EDIT: I posted before I read that the "local" thing might be a fluke. Either way, very interesting!

                    1 Reply Last reply Reply Quote 0
                    • Martin
                      Martin Fuze Team last edited by Martin

                      Moved discussion on the performance of varaibles within loops to it's own topic as need to keep the pinned Hints and Tips as clean as possible and free from general discussion:
                      https://fuzearena.com/forum/topic/522/for-loops-discussion

                      1 Reply Last reply Reply Quote 1
                      • I
                        IANRASE last edited by

                        For anyone trying to get a USB keyboard working with the Switch while undocked:

                        Not all USB-C to USB A/micro/mini converters will work.

                        There is a youtube video for hooking up a keyboard while undocked stating that any USB OTG hub will allow you to connect a keyboard, even if its a Micro USB hub connected to the Switch via a USB C to USB Micro adapter, but I have tried getting this to work with no success (I've tried a combination of 2 different USB-C-To-Micro adapters, 3 different micro-to-standard adapters/hubs, both OTG and normal, and two different keyboards).

                        However, it seems regular (non OTG) USB-C to USB-A adapter will work as long as it is USB 3.1 (which is weird because the keyboards I tried were USB 2, so the other adapters should have worked).

                        Anyway, if you want to connect a keyboard without the dock, here are the adapters I've found so far that work:
                        IHome USB-C to USB-A adapter
                        AmazonBasics USB Type-C to USB 3.1 Gen1 Female Adapter Cable
                        Nintendo Switch Lite Dual USB Playstand By HORI - Officially Licensed by Nintendo (also works for the regular Switch)
                        HORI Nintendo Switch Multiport USB Playstand

                        1 Reply Last reply Reply Quote 2
                        • SteveZX81
                          SteveZX81 F last edited by

                          I think I have a decent 'tip' for you.

                          Create/Code a game for YOU, not for your friends/family.

                          I say this because I made a 4 player game for my family to play and the feedback I got off them was beyond discouraging, of course they didn't mean to be rude or cruel and they aren't really gamers but things like 'it took you how long?', 'really? how can something that looks like that, take you so long?', 'why are the graphics so old?' and 'that was ok dear but why don't you make us a game like mario kart now?' just made me wonder why I even bothered. in fact it honked me off so much that I didn't touch Fuze for the next 3-4 days.

                          Now I'm coming to the conclusion that you need to create things for yourself, sod everyone else.

                          lawyerlounge pianofire 2 Replies Last reply Reply Quote 5
                          • lawyerlounge
                            lawyerlounge @SteveZX81 last edited by

                            @SteveZX81 dangs that is rough, but true. Unfortunately it just comes down to a lack of understanding of how in-depth creating a game can be. That makes sense though, sometimes I already start to imagine what others will think when creating anything (music, art, games) and it can be cumbersome sometimes... lol

                            1 Reply Last reply Reply Quote 0
                            • pianofire
                              pianofire Fuze Team @SteveZX81 last edited by

                              @SteveZX81 They obviously have absolutely no idea how much work goes into making a computer game

                              Martin 1 Reply Last reply Reply Quote 2
                              • Martin
                                Martin Fuze Team @pianofire last edited by pianofire

                                @pianofire said in Hints and Tips:

                                @SteveZX81 They obviously have absolutely no idea how much work goes into making a computer game

                                OR, any appreciation for different types of games and where they originated from. Had it not been for classics like Tanks, Mario Kart would never have existed.

                                1 Reply Last reply Reply Quote 2
                                • digDug
                                  digDug last edited by

                                  Just found this out, thought I would share. While using a USB keyboard. Using CTRL+B (Opens bookmarks), ESC (Closes bookmarks), but DEL (Deletes selected bookmark). Simple I know. I had that doh why wouldn't work moment.

                                  plarpco 1 Reply Last reply Reply Quote 4
                                  • plarpco
                                    plarpco @digDug last edited by

                                    @Lust4ragE Check out all the keyboard shortcuts put together by @Alexander

                                    1 Reply Last reply Reply Quote 1
                                    • LinkCraft
                                      LinkCraft F last edited by

                                      I noticed that if text or images on your screen are flashing it can cause screen burn in and it takes a long time for it to go away (3 min of flashing text took an hour to completely disappear) so try to avoid that. Lol

                                      waldron 1 Reply Last reply Reply Quote 1
                                      • waldron
                                        waldron F @LinkCraft last edited by

                                        @LinkCraft02 is screen burn still a thing

                                        1 Reply Last reply Reply Quote 0
                                        • Martin
                                          Martin Fuze Team last edited by

                                          It has indeed become a thing once more due to OLED. Really would have hoped that tech would have learnt from plasma but apparently not.

                                          1 Reply Last reply Reply Quote 1
                                          • W
                                            WhiskeyJack last edited by

                                            I don't know if this has been discussed before. But I was able to simulate a switch feature by using a loop and making sure I break on each condition.

                                            loop
                                                if x < 1 then 
                                                    do_something()
                                                    break
                                                endif
                                                if x < 5 then 
                                                    do_something_else()
                                                    break
                                                endif
                                                // put the default options here since they don't match any conditions
                                                default()
                                                break // don't forget to break here
                                            repeat
                                            

                                            The coolness of doing this is that if you have a large number of exclusive possibilities that you are testing for you can exit the checking as soon as you find the right one. Or if you're dealing with a deeply nested if .. then .. else this can cut down the depth.

                                            1 Reply Last reply Reply Quote 9
                                            • First post
                                              Last post