Navigation

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

    Wishlist

    Comments & Feedback
    63
    245
    43828
    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.
    • _
      _JKDOS F last edited by

      I'll give this a try.

      We need an elseif or elif

      if (a) then
          // do a
      elseif (b) then
          // do b
      else
          // do else
      endif 
      

      I'd also like to see a switch case someday. Might look like this.

      switch (expression)
          case value-1
              // do this
              break
          case value-2
              // do this
              break
          default
              // do this
      endswitch
      1 Reply Last reply Reply Quote 4
      • Martin
        Martin Fuze Team last edited by

        @_JKDOS As you already know, the latter of those two is on the list of things to come. The first is unlikely. But, request noted.

        _ mixaal 2 Replies Last reply Reply Quote 1
        • _
          _JKDOS F @Martin last edited by

          @Martin Thats awesome. I would think getting the switch condition would be more unlikely, so I count myself lucky

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

            Functions to help us determine what type a variable is, like isInt, isFloat, isString, isVector, and isArray. Dunno if isStruct would be workable.

            Eearslya 1 Reply Last reply Reply Quote 4
            • Eearslya
              Eearslya Donator @Discostew last edited by

              @Discostew For structs, maybe even a generic isA that we can pass a struct type to.

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

                Intellisense?
                Parameter context / reference for commands?
                Summary-comments that appear when a type or method associated with it is selected or hovered over?

                1 Reply Last reply Reply Quote 1
                • Eearslya
                  Eearslya Donator last edited by

                  getDrawTarget(). Useful for functions that draw to images. It would allow them to save a reference to the current draw target and restore it before they return, so the rest of the program doesn't end up confused.

                  1 Reply Last reply Reply Quote 1
                  • pico8-jihem
                    pico8-jihem F last edited by pico8-jihem

                    Can you add a strSplit(<string>,<string separator>) function that returns an array of strings ?
                    result=strSplit("this+is+my+text","+")

                    after execution, result = ["this","is","my","text"]

                    Discostew 1 Reply Last reply Reply Quote 2
                    • pico8-jihem
                      pico8-jihem F last edited by Martin

                      Can you add function indirect call ?

                      // classic function
                      function draw()
                      return void
                      
                      // put the address of the classic fonction draw in the field indirectdraw of the structure 
                      myForm=[ .prop1=0, .prop2=1, .indirectdraw=@draw ]
                      
                      // call the draw function using the tructure field
                      myForm.indirectdraw() ==> call function draw
                      

                      An even better use could be to pass as the first argument of the called method the structure itself:

                      // classic function
                      function draw(self)
                      // access the field of the structure self using self.field
                      return void
                      
                      // put the address of the classic fonction draw in the field indirectdraw of the structure 
                      myForm=[ .prop1=0, .prop2=1, .indirectdraw=@draw ]
                      
                      // call the draw function using the tructure field
                      myForm.indirectdraw() ==> call function draw(myForm) because the indirectdraw field is inside myForm
                      

                      And now, you can start to play with OOP... :-)

                      What do you think about that ?

                      [edit by Martin] Added code tags

                      mixaal 1 Reply Last reply Reply Quote 1
                      • _
                        _JKDOS F last edited by _JKDOS

                        I think someone already mentioned insert and remove at index for arrays, but some more things that would be nice to have for arrays are push() pop() shift() and unshift()

                        For anyone curious
                        push() - Adds a new element to end of an array
                        pop() - Removes last element from an array
                        unshift() - Adds new element to beginning of an array
                        shift() - Removes first element from an array

                        1 Reply Last reply Reply Quote 4
                        • Discostew
                          Discostew F @pico8-jihem last edited by

                          @pico8-jihem said in Wishlist:

                          Can you add a strSplit(<string>,<string separator>) function that returns an array of strings ?
                          result=strSplit("this+is+my+text","+")

                          after execution, result = ["this","is","my","text"]

                          Here's my version of that. Takes a string and a separator string (length of 1)

                          function strSplit( strd, sep )
                            arr = []
                            if( len( sep ) == 1 ) then
                              while(( loc = strFind( strd, sep )) >= 0 ) loop
                                if( loc == 0 ) then
                                  strd = strd[ 1: ]
                                else
                                  arr[ len( arr )] = strd[ :loc - 1 ]
                                  strd = strd[ loc: ]
                                endIf
                              repeat
                            endIf
                          return arr
                          1 Reply Last reply Reply Quote 1
                          • pico8-jihem
                            pico8-jihem F last edited by

                            @Discostew Excellent, mine is very similar. Thank you for sharing :-)
                            Some of the requested functions can be done programmatically. The purpose of my request is to have a native function (faster than anything we can write).

                            1 Reply Last reply Reply Quote 0
                            • mixaal
                              mixaal F @Martin last edited by mixaal

                              @Martin Regarding switch vs if-[elsif...]-else-endif the main difference in many languages is that switch supports ordinal values only (due to optimized jmp table) but if-elsif supports arbitrary expressions (resulting in boolean). So in case F4NS switch supports arbitrary expressions it's a clear vote from me but if not there still might be handy to have elsif keyword.

                              1 Reply Last reply Reply Quote 0
                              • mixaal
                                mixaal F @pico8-jihem last edited by mixaal

                                @pico8-jihem Haha, this is just a step away from adding classes ;-). Maybe something like golang implements for their "sort-of-OOP" might be here in F4NS as well. Golang basically ignores all the principles from OOP but left structures (F4NS has structures as well), added namespace definition and allows hook functions to structures. Nothing more. No constructors, no inheritance and no polymorpism - memory gc is solved via escape analysis. So possibly something like this might appear in the future version of F4NS?

                                1 Reply Last reply Reply Quote 1
                                • N
                                  Nisse5 F last edited by Nisse5

                                  It would be nice if the standard

                                  result = input(prompt, multiline)
                                  

                                  function could include an optional 3rd parameter, with the default text in the edit field. That way it would be easier to edit existing data.

                                  1 Reply Last reply Reply Quote 0
                                  • mixaal
                                    mixaal F last edited by mixaal

                                    For the 3D:

                                    1. Something like :
                                      https://www.khronos.org/opengl/wiki/GLAPI/glDrawArrays

                                    Handy if you want to draw arbitrary objects from data.

                                    1. Parametric fog - fog makes the melancholic atmosphere in games ;-)
                                    1 Reply Last reply Reply Quote 0
                                    • pico8-jihem
                                      pico8-jihem F last edited by pico8-jihem

                                      "...something like golang implements for their "sort-of-OOP" might be here in F4NS as well..."
                                      @mixaal l think it's enougth and I would love it :-)

                                      1 Reply Last reply Reply Quote 0
                                      • B_Studios
                                        B_Studios @Jonboy last edited by

                                        @Jonboy I would really like to see Fuze have a 3D model creator and texture creator to used with the program’s 3D capabilities in a future update. A music and sfx creator would also be helpful when making games with your own original music or sounds.

                                        B_Studios 1 Reply Last reply Reply Quote 3
                                        • B_Studios
                                          B_Studios @B_Studios last edited by

                                          @B_Studios I also think more advanced 2d drawing tools for the sprite creator and more themes for the menu would be cool to see in a future update. Keyboard themes would also be cool to have options for keyboard designs besides the two already existing red and black keyboard themes.

                                          1 Reply Last reply Reply Quote 0
                                          • Tratax
                                            Tratax F last edited by

                                            Hey Team, one for the website tutorials - Any chance of putting in links at the bottom of each page for the next/previous topic?

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