I won't post the code below but if someone can help me make this code more efficient, simple, and AWESOME, then post your email address or user name below and I will send you the code.
Well, why do you not want to post the code in here? Posting public would increase your chance to get one person to help by much.
We all post our code here, so that we can get helped. If you have any problems with piracy, just see it in such a way, that you would post your code under a OpenSource license. The wiki here gives you so many program codes and tutorials for free, although it could also cost something. So why dont you want to give the wiki also something back for free?
Wake me, when you need me.
This is my first time posting codes on this website. Do you know how to post it??
Copy your code then press in the menu above the Text Editor on the button where code is the caption or manually enter
[[code]]
insert the code here
[[/code]]
And then paste the code there
Wake me, when you need me.
Features I have on this program
- Collision Detection with Matrix
- Map Making with Matrix
- Different Types of Blocks
- Removing and Adding Blocks
- Code it so you don't over lap blocks
Things I need Help on
- Making the code simple and fast
- What features to add
- Crafting feature would be nice
- Putting NPC(Ex. Zombie probably leave out creeper for now) in action
This whole program only works on TI 84 Color Plus Silver Edition
So if you want the code in TI 84 Plus I will try convert it ASAP
THIS CODE IS FOR THE TI-84 PLUS C SE
I WILL CONVERT THIS CODE INTO TI-84 ASAP
(If you can understand codes very well you can probably convert it yourself)
There are 5 Programs you are gonna have to make
1. MCBlock
2. MCMain
3. MCMove
4. MCTerran ( I spelled it wrong so just ignore it)
5. Minecraft
MCBlock
X→S:Y->T
"*+C (Add 6 more blocks you want to add *NO SPACES*)"->Str1
X+sum(Δlist(K={73,93->X
Y+sum(Δlist(K={82,84->Y
If K=63 or K=64:Goto 4
Goto 5
Lbl 4
If K=63:H-1->H
If H=0:9->H
If K=64:H+1->H
If H=10:1->H
Lbl 5
[A](X,Y)->Z
If K=64 or K=63
Goto 0
If Z≥1:Goto 1
H->[A](X,Y)
Lbl 0
Output(X,Y,sub(Str1,H,1
Lbl 1
S->X:T->Y
DONT RUN THIS CODE YET I WILL POST 4 MORE PROGRAMS THAT WILL WORK TOGETHER TO RUN MY GAME.
Well, the first thing, that I would change, is overthinking the code and removing the Labels and gotos and change them to loops, but maybe this depends on your programming habit. ;)
Wake me, when you need me.
Thanks
I use a lot of Goto and Lbl in games. I don't know how While works? Can you teach me??
Here's the wiki page
While is pretty straight forward, at the beginning of it's loop, it will check to see if the conditional you placed is true, if it is, it will loop the commands inside it and do it again. if it isnt, it will end the loop and resume the code after the end.
The Silver Phantom welcomes you
im going to not touch the lbls until you post all the code, so ill just nit pick the minor stuff.
K=63 or K=64
can be
sum(K={63,64
If K=63:H-1->H
If K=64:H+1->H
can be
H-(K=63→H
H+(K=64→H
The Silver Phantom welcomes you
And then,
H-(K=63→H
H+(K=64→H
can be
H+(K=64)-(K=63→H
Just Saying I don't have TI-Connect Right now so I have to type the code by hand. If there's any ERROR then tell me where and what the Error is if you can.
And thank you for your cooperation.
This should be called MCMain but this program had the code for the player to move so I called it M_CMove
MCMove
5->:13->Y
Lbl 0
output(1,3,"BLK:
Repeat K≥32
getkey->K
If Ans:Output(X,Y,"
X->A:Y->B
X+sum(Δlist(K={25,34->X
Y+sum(Δlist(K={24,26->Y
[A](X,Y)->Z
If Z≥1:A->X
If Z≥1:B->Y
Output(X,Y,"∏
Output(1,1,H
End
If K≥63
prgmMCBlock
If K=34:Goto 0
If 32≤K≤52:Goto 7
Goto 0
Lbl 7
If K=32:Output(X-1,Y," " (There's a 1 space here) // I was going to make this code all simpler//
If K=32:0->[A](X-1,Y)
If K=41:Output(X,Y-1," " (Same Here)
If K=41:0->[A](X,Y-1)
If K=43:Output(X,Y+1," "
If K=43:0->[A](X,Y+1)
If K=52:Output(X+1,Y," "
If K=52:0->[A](X+1,Y)
Goto 0
I know my code's not organized but it works!
If someone can make a better code than this just post it right below
You can probably run this code but Just make sure that you make Matrix [A] is 10 X 26
Does the game work????
I think it is hard to determine if the game works if we do not have the entire code to the game.
There are a few errors in the code that I found, though.
In MCMOVE:
Line 1: 5->?
Line 3: Output(
Line 5: getKey
Line 19: If 32<=K and K<=52
so you need to change line 19 to what electro gave. the calc doesnt see 32≤K≤52 as a whole, it sees (32≤K)≤52 which will always be true because 1 (true) and 0 (false) is both below 52
The Silver Phantom welcomes you
Sorry, this I got alittle lazy with some parts of the code. Can Anyone teach me how to make If then codes shorter.
I usually do something like this…
If K=21:Output(5,1,":D
If K=21:
If K=21
I don't want to make a Goto or Lbl too. So can anyone help he understand how to make this If then condition shorter.
What you do here is this:
If K=21:Then
Output(5,1,":D
...
End
The Then performs several commands in between it and End.
5->X:13->Y
Lbl 0
Output(1,3,"BLK:
Repeat K≥32
getkey->K // Stored into K //
If Ans:Output(X,Y,"
X->A:Y->B
X+sum(Δlist(K={25,34->X
Y+sum(Δlist(K={24,26->Y
[A](X,Y)->Z
If Z≥1:A->X
If Z≥1:B->Y
Output(X,Y,"∏
Output(1,1,H
End
If K≥63
prgmMCBlock
If K=34:Goto 0
If (32≤K≤52):Goto 7
Goto 0
Lbl 7
If K=32:Output(X-1,Y," " (There's a 1 space here) // I was going to make this code all simpler//
If K=32:0->[A](X-1,Y)
If K=41:Output(X,Y-1," " (Same Here)
If K=41:0->[A](X,Y-1)
If K=43:Output(X,Y+1," "
If K=43:0->[A](X,Y+1)
If K=52:Output(X+1,Y," "
If K=52:0->[A](X+1,Y)
Goto 0
Can you guys make this code smaller and simpler?? I can make line 22~End shorter with the equation I came up with last night.
Putting the whole statement in brackets does not help:
If (32≤K≤52)
What you could use, is
If 32≤K and K≤52
Or the optimized version, using a mathematical trick with abs, which states that every
a<x<b
simultaneously can be expressed by
abs(x-(a+1/2*(b-a)))<1/2*(b-a)
Or if x also could be still equal to a or b then
abs(x-(a+1/2*(b-a)))≤1/2*(b-a)
Using your example, it would be:
If abs(K-42)≤10
I hope that I did not do a mistake, but I think, this is the right code ;)
Wake me, when you need me.
I think my mind exploded across the room. Got to go and pick em'up. But I still don't understand how you got that equation.
Well, then your head will completely explode after the following: I quote the page abs(
This can be taken to extreme degrees. For example, the following code uses abs( three times to test if X is the getKey keycode of one of the keys 1, 2, 3, 4, 5, 6, 7, 8, or 9:
:If 2>abs(5-abs(5-abs(X-83
Well, it is difficult to explain this, but I will try to graphically explain this:
Given a point x on a simple one dimensional line, you can test if it lies between a point a and b.
The absolute value (abs() does always mean - when its argument is a subtraction - a difference.
And of course, the point x is between a and b, if the difference betweeen x and the half range of a and b is less than half of the difference of a and b.
Well, of course it is a bit complicated, but if you think a while about it, you realize that it is completely logical.
Wake me, when you need me.
I will draw out what you said. If I get some activity in my mind, I will let you know.
OOooooo. I think I got something….
I'm going to change the variable alittle
A=0 B=10 X=4
A_ _ _ _ _ _ _ _ _ _ _ _ X _ _(Half Way) _ _ _ _ _ _ _ _ _ _ _ _ _ _B
and I got lost from here….