I've finished!
2-dimensional Minecraft on a calculator!
Press arrow keys to move, press 4,2,6, and 8 to move your selector thing around (the thing you use to place and destroy blocks), Mode to switch between place and destroy modes.
There is gravity, but you have infinite blocks. This program is not slow like most of my other ones.
This program doesn't include blocks that have any function, but I will add it as soon as I remove the letter graphics.
Can someone show me how to convert this program from the Home Screen to the graph? I know a way, but it takes over 5 minutes for the program to redraw the screen.
If you have played this, please comment, I want to see how many people have used this.
:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]→[A]
:5→X
:1→Y
:5→L
:1→M
:5→A
:5→B
:5→N
:5→O
:1→P
:1→H
:1→R
:While 1
:getKey→K
:X-(K=24 and [A](Y,X-1)=0)+(K=26 and [A](Y,X+1)=0)→X
:If K=25 and not([A](Y+1,X) = 0)
:Then
:For(W,1,3
:If Y>1
:Then
:If [A](Y,X)=0
:Y-1→Y
:End
:End
:End
:If Y<8 and [A](Y+1,X)=0
:Y+1→Y
:If K=22
:Then
:If P=1
:Then
:0→P
:Else
:1→P
:End
:End
:If K=83
:Then
:If P=0
:Then
:0→[A](B,A
:Output(B,A," "
:End
:If P=1
:Then
:H→[A](B,A //Sorry for the earlier mistake, fixed now
:Output(B,A,H
:End
:End
:If R=1
:Then
:0→R
:ClrHome
:For(V,1,16
:For(W,1,8
:If not([A](W,V)=0)
:Output(W,V,[A](W,V
:End
:End
:End
:If [A](M,L)=0
:Then
:Output(M,L," "
:Else
:Output(M,L,[A](M,L
:End
:X→L
:Y→M
:If [A](O,N)=0
:Then
:Output(O,N," "
:Else
:Output(O,N,[A](M,L
:End
:X→N
:Y→O
:If (K=82 and A>1) or (K=84 and A<16) or (K=73 and B>1) or (K=93 and B<8)
:Then
:If [A](B,A)=0
:Then
:Output(B,A," "
:Else
:Output(B,A,[A](B,A
:End
:If K=82
:A-1→A
:If K=84
:A+1→A
:If K=73
:B-1→B
:If K=93
:B+1→B
:Output(B,A,"O
:End
:Output(Y,X,"*
:End
|
What the community thinks:
I tried recoding what's shown above…and when I ran it…it went in an endless loop.
Never mind…I fixed the prob…one recommendation is to preset the G variable so it doesn't pop up as an invalid dim if it has a value more than the dimensions itself.
Ok here's a couple of major bugs…if you go out of bounds, it'll do an "invalid dim" error…also, sometimes when I try placing a block…it'll disappear when I try placing another one somewhere else.
That doesn't happen with me… I'll see if I can fix that…
I realized that I accidentally typed a G instead of a B! Sorry!
thanks! (theres still the bug when you go outside the screen range…but thats ok.)
Because of that glitch, sometimes I create some stairs leading to a pit that goes through the bottom of the screen and I call it the "Banishment Pit of Glitches", and when you jump off and reach the bottom, the game crashes. :)
You can delete the first line of code, and the game will save your world unless either you've never run the game before, or you used some other program on your calculator that changes matrix [A].
Actually…I improvised on both of those things…I added a menu in the beginning, and had a selection for "Saved Game"…which went to a Lbl that was located right before the "While 1"…so it looked like this: "Lbl D:1->R:While 1". This would pass both the "create new terrain" part and the preset variables…so your guy and the placer cursor were at the same spot. To fix the "out of bounds" glitch, I made the preset terrain have a wall on all of the sides…and I edited the placer cursor so it cannot change the outside walls whatsoever…kinda like bedrock.
Hello, welcome to Thursday. Even though it's Wednesday.
I just wish I could find a way to put this on the graph…
If you do manage to rewrite this code onto the graph, i can help as far as block/game mechanics (like redstone and such)
Reason why is that i've played/watched minecraft enough that i pretty much understand the mechanics so well
I actually already know how to do it. I made a 2-dimensional Minecraft game in Python, and I have redstone, 10 new dimensions, working arcades, cheese, and tons of other stuff. It's over 4500 lines of code!
lol nice
That's a pretty good idea…
You seem pretty fluent in TI-Basic. You should make an account.
Maybe.
I am also trying to make a "multiplayer mode" for this game as well. But due to the slight complexity to make this possible, i am making the multiplayer version a different program (and ill also add more blocks into it while i'm at it)
I have an account now!
it doesnt work on my computer! All it has is a row of 1s at the bottom and an asterisk that you can move
oop never mind is it supposed to place 0s and 1s when you use 2, 4 , 6, and 8?
Could you help me with programming the walls? I'm having trouble
If you mean placing blocks, use 2 4 6 and 8 to move a "placer" cursor and press 5 to place a block, and press mode to switch between place and remove. If you want to make walls on the outside, go to the code, and make the matrix default to:
[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]→[A]
I made my own minecraft game, it uses the graph screen and runs really fast
The only good way to make different types of blocks is with text graphics. you could do it directly with pixels but it would be EXTREMELY slow. Here's how i would do it:
there would be 2 loops, one for movement and one for block placing.
the code in the movement loop would always run, but the block placing would only happen if the calculator detected you were pressing a key that would place a block. There would be a menu where you would type the letter/symbol you wanted to place, and then use the number keys to place it.
i dont understand how to start the game :(
How to start the game? well if you've typed the whole thing into your calculator, then go into [PRGM], go to the submenu [EXEC] (which it should already be on), then scroll down to whatever you titled it as, and then hit [ENTER] twice.
Instead of defining the matrix [A] manually, it'd be quicker and would take less space to use `0identity(8→[A]` and then (somehow) change the last row to all ones.
To do this, here's a really simple code:
I considered a For loop in my head but thought maybe there was a better way, heh…
Oh, and sorry that I didn't count the rows/cols that well; that is indeed a 16x16 array. Thanks for catching that.
Help! I typed in the program but a syntax error came up in the [A] in the first line!
What can I do??
make sure you are using the [A] from 2nd matrix, not actually typing it out.
The Silver Phantom welcomes you
you can create it using pixels by adding this in the beginnig:
0->Xmin
94->Xmax // Total Pixels Across
0->Ymin
62->Ymax // Total Pixels up and down
And just Pxl-Off( or Pxl-On( in what ever way possible
I saw a pong game that used this "technique"
When I try to run it all that happens is it takes to the home screen and just displays 1's on the bottom.
that's what's supposed to happen, I think. The 1's are the blocks
when i put in (y,x-1)=0 it said error please
help
Nice job! The biggest thing would be to replace:
:If K=22
:Then
:If P=1
:Then
:0→P
:Else
:1→P
:End
:End
With:
:If K=22
:not(P→P
For some reason the [a] variable doesn't work.
Are you using the Matrix A? This won't work if you type in the bracket [ then A then the bracket ]
Whoops! got a little too excited and typed it out. Now it's working! thanks!
I'm assuming that the player is the little star icon. I apologize if I'm wrong. Anyway, when the game starts it's on the top of the screen, and I can only move it left and right. When I place a block, I can go through that block when moving right, but it won't let me move after I get past it (going right) at all. I have no clue what's wrong, and I'm pretty sure I put the code in right. Strangely enough, I can move the block placer in any direction I want. Does anybody know how to fix this? :(
P.S. I said I'm pretty sure I put the code in right, but if you could supply me with some of the lines to check, that'd also be great.
EDIT: looking through it I don't think there's any key handler for the down arrow. Can anybody else move up and down?
EDIT 2: I've also found that when there's a block on one side of me, I can't move in the other direction either.
Have you checked some mode settings of the calculator are correct? If some graph/home settings are set weird, it can cause problems.
Hewwo, my name is Achak Claw. I was formerly BioHazard.
All the settings are set to whatever is on the left side (except for the 'set clock' button, but if you push that it just resets the time)