Tinycloud778 2019-01-24 20:39
Tap on which way you want to go and the character will move there
Tinycloud778 2019-01-24 20:40
I need to know if I use this type of movement or just you press the directions and the room appears
was8bit 2019-01-25 01:52
I've rewritten the code to be more flexible..., please post if you need help with what i did :)
was8bit 2019-01-25 01:54
1) I moved the text characters to page 4 as when you use PRINT or TEXT it uses page 4... if you don't manually add the text to page 4, NX will secretely place text to page 4 even though the page seems empty
was8bit 2019-01-25 01:56 (Edited)
2) I created a SUB routine, as they are more powerful... variables inside a SUB exist only inside the SUB and won't interfere with variables of the same name in your game... you can also input variables, numbers, or even math inside the CALL SUB(...) command, making SUB a very powerful tool if you are clever with it ;)
The SUB handles all player movement in any room..
was8bit 2019-01-25 01:59
I also made the character jump from cell to cell, (8x8 pixels) so the program can "see" the text characters printed to the screen... I made the empty doorways actually the room number making it easy to jump from room to room, and also it "sees" the # as a wall, and only allows the player to move into an empty text " "
was8bit 2019-01-25 02:01 (Edited)
Also, i organized everything.. only one main game DO LOOP, all movement is handled by the SUB, and all room jumping handled by one GOTO group, making it super easy to add and edit new rooms :)
was8bit 2019-01-25 02:08
BTW, welcome to the dark side ;) ('cause the background here is dark....)
Welcome to NX :D
was8bit 2019-01-25 16:29
This 2nd version changes how the code sees what your player touches.. now you are not limited to just numbers 1-9...
I made a mini game where you can get a key and get gold... kinda a fun game you've envisioned :D
was8bit 2019-01-25 16:30
I you like it, go ahead and use it :)
was8bit 2019-01-25 18:49
In V3.0 I revamped again, and now all rooms are one size and up to 32 rooms are stored in one background file, editable with BG Designer...
Tinycloud778 2019-01-25 20:02
Wow thank you very much
Tinycloud778 2019-01-25 20:04
Can I post this
was8bit 2019-01-26 04:31
Yep, I made it for you :)
was8bit 2019-01-26 04:34 (Edited)
Actually, it currently will only work for rooms 1-9, I'll need to tweak the code to make it able to read all 32 rooms... let me get that ready for you....
was8bit 2019-01-26 05:27
Ok, V4.0 now works with room numbers 1-9 and room A-W (0,X,Y,Z are not room numbers)
The problem is that the rooms are always remade anew.. so when you pick up gold, or unlock a door, when you leave then come back to the room, more gold reappears and the door goes back to being locked...
But, i have an idea how to fix it...
was8bit 2019-01-26 05:29
I'm love your ideas, this is fun working on this :D
was8bit 2019-01-26 06:47
Ok, fixed that issue, changes to a room are now saved... i fixed it by first loading up the rooms into array memory... changes then are easily made to array memory, and rooms are drawn from array memory.. :)
was8bit 2019-01-26 06:58
One last issue I want to fix, currently you enter into a room at the upper left corner... I'd like to make that work better... but I'll have to get to that later....
was8bit 2019-01-26 11:42
.. another issue to fix, loading them up immediately cause a "flash" before the title screen appears, I'll fix that too... later as I have time :)
was8bit 2019-01-26 18:45
V0.6 fixes both problems.. as long as the doorways line up between 2 rooms, this version will feel very natural as you walk thru the maze if rooms :)
was8bit 2019-01-26 18:51
The main things to remember is
1) that all of page 1 must remain as text characters as the code is optimized for this
2) doorway characters that lead to a room are in order (1-32) characters 1-9 and characters A-W .. so of course 1-9 are rooms 1-9 and A-W are rooms 10-32
3) "#" is a wall, always an impassable,wall... "*" is the player
4) all other characters can represent things in the room.. currently "-" is a locked mini door, "=" is gold, and "?" is a key.. but I've made the item recognition built in using easy comparison so IF="?" THEN it's a key, so you easily change and add things and write code to handle different things :)