• RE: New to Fuse4-want a Faery Tale Adventure like game

    No, nothing wrong, but you asked about the code blocks and it's all in there :)

    posted in General Discussion
  • RE: New to Fuse4-want a Faery Tale Adventure like game posted in General Discussion
  • RE: what is your favorite keyword or statement in fuze

    I like to use a double not operator (!!) which basically converts to a boolean value:

    !(false) == true
    !true == false
    0 == false
    1 == true
    !0 == true
    !1 == false
    !2 == false
    !(!1) == true
    !!2 == true
    !!2 == 1
    !!1 == 1
    !!0 == 0
    

    I do think there are plenty of developers who are not aware this, so they might need to think thrice before they understand what's happening. So it one to use with care. But provided that you work with a loosely typed environment, I think it's an elegant and compact way to constrain a value as boolean.

    posted in Coding
  • RE: what is your favorite keyword or statement in fuze

    I don't have one favorite keyword but several:

    • createImage()
    • setDrawTarget()
    • drawQuad()or drawImage() / DrawImageEx()
    • setBlend()
    • simple drawing commands like: triangle()/ line() / plot() / circle()

    I like these commands not because of how any of them work individually but rather because of the various ways I can combine them to do amazing things. That is how I believe programming is supposed to work; you have a small number of simple pieces that you can combine together in arbitrary ways to make incredible creations.

    posted in Coding
  • RE: New to Fuse4-want a Faery Tale Adventure like game

    I’d recommend counting when the player lifts their finger as a button press. In my programs, you will often see I don’t make an action occur until then, so as to only have registered the action once.

    If you look at my small Game States Demo in the TitleScreen() function, there’s a spot where aPressed==false, meaning they let go of “c.a”. You could increment a global variable count in that spot, such as buttonAcount+=1, and then check if it’s the right count, and then do the action and reset.

    posted in General Discussion
  • RE: New to Fuse4-want a Faery Tale Adventure like game

    Counting button presses isn’t so straightforward. You might think you can just make a ‘counter’ variable then put ‘if c.l then counter = counter + 1’, but that will just zip up your counter super fast, 1 per frame. I haven’t done it yet, but my question here: https://fuzearena.com/forum/topic/1195/use-of-flags-with-button-presses will probably be relevant. Maybe.

    posted in General Discussion
  • RE: what is your favorite keyword or statement in fuze

    It was a bit hard to figure out - I thought it was just a % mod example at first..

    Handy to know you can create a list and use it all in the same line though :) I’m thinking it might be useful for menus maybe? Save a bit of space or something..

    Back on topic, my favourite So far is the terrain stuff. Especially since I found out you can have more than one. They’re user-creatable 3D Objects! Also I used reflect() the other day and it worked just as advertised. Really neat! Dot() and cross() are great too, though you need to google to find out what they’re really for...

    posted in Coding
  • RE: Particle Demo

    I would normally just use the upvote button but that is so cool it deserves a comment!! Very cool indeed - well done.

    posted in Creation share codes
  • RE: what is your favorite keyword or statement in fuze

    I'm going to follow up on that so that my reply doesn't come across as too harsh! It's certainly great to hear about these kind of ways of working, or tricks if you will.

    Firstly, from a user point of view because it might simply be something you've not thought of before and it will very soon become second nature and advance your programming skills. I remember someone showed me something about 'malloc' in C about 20 years ago and I thought it was so neat and concise that I still use it to this day.

    Secondly, from a Fuze internal point of view, it might highlight that users are using something in a way that might not of been considered before and it could highlight potential issues, or indeed if something is really obscure it could help shed some light on why some issue is already happening and help us provide a workaround until a fix can be put in place.

    posted in Coding
  • RE: what is your favorite keyword or statement in fuze

    So does x = 1 :D

    (And yes, I know that's not what you're getting at)

    [EDIT] PS: There are times when it's better to be clear in code than clever. When something crosses the line is entirely down to personal taste but if anyone has to think too hard about what the above is doing then I'd strongly suggest that it's one of those times. If you glance at that and it's second nature that you immediately realise what it's doing then knock yourself out, but don't expect it to be readable to everyone.

    posted in Coding