So what should we look into if we want to understand the F4NS language before it releases?
-
So we've already had a listing a commands for F4NS (which seems incomplete, located at https://www.fuze.co.uk/about-fuze4-nintendo-switch.html), but for us folks waiting on release, we still don't know the ins and outs of the F4NS language outside of code provided by those with early access. I had multiple questions pertaining to how things work in F4NS, but after thinking about it (and having typed up those questions only to delete them and ask this other question here...), if we want to best understand how F4NS operates, which language should we look into? I know we were told it would be "as easy as BASIC, powerful like C and versatile like Python", but if it's a mix of them all programmatically, then from each language, what works as expected? Are there various operators or statements that are unique to F4NS that none of those languages have?
I'm in the process of parsing my code from my MM2PTC project (and it is a mess because I had to squeeze it all into 9999 lines of code), and I'd like to be familiar with the F4NS language as I'm parsing, because I'm sure there are instances where I can shrink the code or make it far more readable if I can convert it on-the-fly as I parse.
There is one thing I would like to know, as it does pertain to my project. With F4NS, are we able to assign a function to a variable (as opposed to what a function returns), and then call that function by calling the variable instead? I think with Python, that is accomplished by doing something like this....
def hello(): return "Hello" y = hello print("%s World" % y() ) --Output-- Hello World
(forgive me if this looks incorrect because I've never actually programmed in Python, but I know enough C to hopefully learn Python quick, but I mainly wanted to get the point across).
-
I would guess the closest point of reference is FuzeBasic for Windows/Raspberry Pi. Even then it looks like it has been updated in some important ways that should make the Switch version significantly better.
-
you can take a look at the help system online now
-
Oh sweet! I will be bookmarking this so that I have an off-screen reference while playing with F4NS.
-
When you initially start it will be pretty invaluable. The guys will also have videos and stuff up for you to watch as well :the_horns:
-
@MikeDX Thanks, but now the questions/requests will be pouring in, at least from me. Already got a few in mind. :smile:
Any word about my specific question pertaining to functions assigned to variables/arrays? It's mainly for organization and quick access to AI blocks for my project (which is going to have hundreds of these blocks for things like enemies, objects, weapons, etc). Being able to do something like "call_AI[9] ()" that retrieves the name of a function from the 10th element of the call_AI array (because 0 counts as the first), and then calling the function itself with the parenthesis attached at the end would be a lifesaver, not to mention a timesaver. Unless of course there's something in a similar sense that can do what I'm looking for, so long as it doesn't consist of having hundreds of IF statements that call the individual functions directly.
-
@Discostew I am going to say hands down that is 100% no.
HOWEVER!
We are at the very very start of this. The version of FUZE that gets launched on Friday will be very different to the one we are playing with in 3, 6 or 12 months time.
There is a lot of good stuff coming, and the ability to do things like this is definitely on the table.
-
@MikeDX Alright. Maybe I can post a request for something of that nature. Will we get a "Request" section of this forum, or should we stick to this section for that?
With that though, anyone have a good alternative method to what I was looking to do? Gonna have hundreds of functions for enemy AI, and when I load in an enemy, I don't want to have to do the following just to correctly access the AI for the enemy...
if <enemy 1> then enemy_AI_1() else if <enemy 2> then enemy_AI_2() ... else if <enemy n-1> then enemy_AI_n-1() else enemy_AI_N() endif
Guess I could reduce the max number of checks from (N) to (N/2) by splitting them up, where if I have 100 AI functions, the first conditional would split it 50/50, then within each of the 50s, the next conditionals could split 25/25, then so on and so forth, but that's still a good amount of checks. We don't even have "switch-case" functionality (yet).
-
@Discostew There is the Wishlist pinned topic at the top of this category. Might want to look through some of the examples when you get them to see how this kind of thing is tackled now
-
@MikeDX Minor thing but that image is broken for me at the top. Otherwise neat!! I'm gonna start reading it already. Friday can't come soon enough...
-
@plinky said in So what should we look into if we want to understand the F4NS language before it releases?:
@MikeDX Minor thing but that image is broken for me at the top. Otherwise neat!! I'm gonna start reading it already. Friday can't come soon enough...
which image on what page? 😊
-
@MikeDX It seems to be fixed now! Maybe it was just my PC.
-
I must be missing something obvious, but can someone point me to the fuzebasic windows download?
-
I believe it's no longer available
-
@MikeDX Since major changes are in the works ie. 3, 6,12 months, will the upgrades be included in the original purchase price or will there be some sort of subscription service?
Jeff
-
@MikeDX As I read your help files, they remind me of the textbook Land of Lisp by Conrad Barski, MD. Most enjoyable. I hope that a pdf version of the manual will be available for my various e readers.
Jeff
-
@jlgreer1 The general layout was inspired by the BBC micro Basic manual. I am working on a pdf version of the command reference now.
-
@jlgreer1 said in So what should we look into if we want to understand the F4NS language before it releases?:
@MikeDX As I read your help files, they remind me of the textbook Land of Lisp by Conrad Barski, MD. Most enjoyable. I hope that a pdf version of the manual will be available for my various e readers.
Thanks Jeff but I can't take any credit for the help whatsoever except posting it on here! 😁