FUZE DEV GAME
-
I've been hard at work in bringing a programming puzzle game to Fuze, Though it hasn't been easy. Lots of bugs and crashes. But I've managed to get a working game so far.
The language for the game is the same for the Hack assembly. However, functionalities are different. For example, in previous versions of the Hack language you can basically press a button on the D-pad and it gets registered just by getting the data from @KBD. Now, @KBD is used as a system call for the current game. Meaning the VM will wait until the user has pressed a key on the Keyboard before progressing further into your code.
Another change is the @SCREEN which was used to plot pixels to the screen. However, in this game it is used to insert characters into the console's cursor.x and cursor.y positions. The cursor can be changed by editing the values in @screen + 1 and @screen + 2.
@KBD + 1 is another system call. However, this is used as a checker for the game. Values are placed in its arguments via RAM[2] + n. This is the same as @R2 + n. If the answer submitted is correct the game will notify the player and advance the level.
RAM[0] aka @R0 is used for the return address. Thus when calling the system call functions. You'll need to specify a return address for them to return back to. RAM[1] aka @R1 is used for the return value. Example: @KBD when called will return the typed letter into @R1.
NOTE: This game is far from finished and in its beginning stages. So there will be some form of bugs and crashes.
Shared code: 9XWS3MND9K
-
I have a similar game in progress, but instead of programming it's electronic components. Might of already told you about it when I planned it to be a circuit simulator.
-
@JMM161437 Yes I remember your game. I'm really looking forward to it! A similar idea concerning the circuit simulator also came into mind. But instead of building the circuit. You use the HDL language (Hardware descriptive language). Which is basically a language for hardware design. Kind of like example:
NAND = ~(A ^ B)
-
Small update:
I was not happy with the @SCREEN functionality. Makes programming for this game harder than what it needs to be. Instead. I've changed @SCREEN to be a system call which looks after the cursor's X and Y positions automatically based on the given character. So each typed character will increment the X axis of the console's cursor while '\n' will make the cursor move down a line and reset the X axis to 0.Here is a slight sneak peek of it in action.
-
🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩 (sorry, min. post is 12 chars 🤣) @Martin: hope you don't ban me now.
-
@LucasJG25 that seems like a great concept for my project... my biggest issue is with it right now is finding time to work on it with all the other things I'm creating in Fuze and on my laptop... Might have more on my plate than I can swallow
-
Would it be possible to add in support for the software keyboard?
-
@vinicity I could but then changes to the screen will have to be made. Since if it's undocked the software keyboard takes up most of the screen.
But I wouldn't stop you from putting a showKeyboard() in the code. You could give it a try in docked mode and let me know how it fits on screen. As since I only have the lite version of the switch. I can only use undocked mode.EDIT: I just realized that I have set ` which is chr(96) (I think it is 96) as the button to use to run the code in game. I don't see that button on the software keyboard. though you could change the character in the code to ~ which I do see on the software keyboard.
-
Error detection is now done for the VM. It's not fleshed out but it will point to the line of code which has the error. Thus the VM will inform you and will not run your code until the error is dealt with.
Share code: 73933MND9K (pending)