Drawing multiple of the same sprites?
-
I've been looping watching over the tutorials for basic arrays, for loops and the 2 structure vids for the last 48 hours trying to decide how I should start with this also, only with mine I just want blocks (top down map just like an empty screen but with blocks to make it harder to catch the enemy without being a closed in Maze.) I need collision only else I would have used box.
Thanks DavePs
I assume if I want to set each block position manually which I do that I replace the [I] in the for loop with [*one number between 0 and 19] x 20 times -
@Maxwello Sounds like building a map in the map editor and using collision boxes would be the way to go for you! Then you just do
collideMap()
and some x and y speed cancellation and bob should be your uncle.Take a look at "Super FUZE Platformer" and the way that Will is doing the collision with the level. The exact same will apply only in top down fashion.
-
@Dave I did build a map with the editor but it was hard to not be wonky (for me) but I got one to try then I erm.. Couldn't work out how to load it in lmao.
I'll have another look ty -
@Maxwello At the start of your program call
loadMap("mapName")
, then before yourupdate()
line in the main loop, calldrawMap()
That will draw the entire map, all layers etc. If you want to achieve something like parallax scrolling (scrolling different layers at different speeds), you'll need to draw the layers individually. For a top down game, this shouldn't be a concern though!
-
@Dave thanks Dave I did that and it looked like a blank screen so perhaps it was a layering issue, now you have Confirmed that's the way I can keep trying knowing I'll succeed eventually thanks again
I may have had drawmap and update map back to front. (puts on boxing mitt.. Downward thrust) -
@Maxwello You might have issues with your sprite camera if that's the case. I would recommend taking a good look at the FUZE Platformer program. I would direct you to a tutorial for this, but currently there isn't one. This is being worked on however! You will have a better resource for this in the future.
-
@Dave oh it's cool I think one of these threads had some 2d camera advice.
On the subject of tutorials some seem to be greyed out throughout have you noticed this? -
@Maxwello Which tutorials do you mean dude? I'm not sure what you mean by grayed out - do you mean tutorials on here in FUZE Arena or within Fuze itself?
-
@Dave they have probably always been this way and I've just had a massive brain malfunction
Edit
OK sussed it omg as soon as I saw the photo then glanced back at the switch it clicked its cos I have a bunch of code greyed out in my code with the /* */Edit2
Sorry if this is common sense I guess I just hadn't been in this position before
I just didn't know sorry and I've been straining my eyes with it too lol
-
@Maxwello Hmmm - this is strange. Initially I thoght "Ah! you've found an issue, I'll fix that" - but I took a look at this tutorial on Fuze and this grayed out effect is not on mine. We will look into this. Out of interest - what happens when you copy and paste that block of code into a Fuze program? (Move the cursor using the d-pad to that code block so it is highlighted with the white border, then press the Y button to copy the code. "Copied code to clipboard!" should appear as a message at the bottom of the screen. Then, go to an empty project and paste the code from your clipboard in there.
-
@Dave it pastes in fine.. Seems that it occurs only if you have any of the commented out woth the /*. */
Even if it's just like
/*hello
Within an entire project if you then open help.
I guess it sees the help as an extension of the project?
-
Oh, that's definitely a bug! Thank you.
-
Great info - thanks @Maxwello !