Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Potato

Pages: [1] 2
1
TI Z80 / Re: Chess in Basic
« on: September 27, 2011, 06:03:32 pm »
By text do you mean as in clrhome gets rid of it all text? Because I already have graphics drawn out for each piece...


2
TI Z80 / Re: Chess in Basic
« on: September 27, 2011, 05:32:12 pm »
Oh wow never thought to do it that way.  That's probably a lot faster than what I was doing.  I had it test each a pixel and based off that it would branch off into different things to determine what piece.

3
TI Z80 / Chess in Basic
« on: September 27, 2011, 05:06:59 pm »
[Edit: Also had another problem.  I wanted to have a banner on the side so that when a piece is selected it showed the name plus a more detailed drawing.  Is there anyway that I can clear just that section of the screen with ease?  I might be able to do clrdraw with what hot_dog suggested since with that I can just remake the board, haven't tried it out, but I want to have a back up plan]

Currently working on Chess in Basic and could use a little bit of help.  So far I've only coded very basic parts of it but I've noticed during testing that it's already a little slow.  In a nutshell what my program does is:

-Display the picture of the chess board (including the pieces already on it.  I chose this method so that I could archive and unarchive pics within the program and also save games)
-Draw the cursor.  
-Get key so that the cursor can move left, right, up and down while also allowing the player to select a piece (by pressing 2nd).
-When 2nd is press the prgm checks the pixels in that square.  It can determine the difference between a black square, white square, and every single piece. (it sees rooks and bishops as the same but this shouldn't be a -problem)
-If a piece is selected it determines what piece it is (it determines if it's a piece at all first) and then what moves are available to it (and if it's a pawn if it's able to "jump" two squares) [at the moment I only have it programmed for pawns).  All available moves are shown with a x through the square and all remaining pixels are darkened (a black square is actually a checkered square).  If 2nd is pressed again on the pawn it reverts the available moves back to their original square type.

But even though I've only programmed white pawns (not even the black pawns yet) it takes about a half second for the cursor to move, and even longer to display the available moves. Before I continue I want to try and speed up this program so that it runs faster and not take 10 seconds per cursor move, (let alone moving to the piece you want)



Other non important stuff:
Each piece is not saved as a pic.  I also plan to have the original pic drawn in using pic on and pic off but only at the end when I'm sure this works.  
Each piece is not a variable.  The program checks the pixels to determine what each square is, not what variable is where.
I actually can't move a piece yet.  I simply haven't programmed it to but I'm fairly confident I could if I decided to put it in.
It will be a person vs person game.  Not a person vs computer game.  I'd rather it have AI but I'm not sure how to make this, if you know how that'd also be helpful. (Keep in mind this is in BASIC).

4
TI Z80 / Re: Tetris on the calculator - Help?
« on: April 23, 2011, 09:39:43 pm »
Sorry to here about the mem clear.

Oh it wasn't a mem clear.  the only button that worked was the on button.

And for some reason I couldn't link it to my computer either.
Strange.  How did you reset it?  Just pull a battery?

Couldn't, had to get a new one. 
You had to get a new calculator??? We might have been able to help you fix the problem.  Did you try turning it on while holding the Del or Stat key?

Yeah. :I 

It's not like I wasted money or anything; the new calculator was actually my cousin's old one. 

5
TI Z80 / Re: Tetris on the calculator - Help?
« on: April 23, 2011, 02:22:33 pm »
Sorry to here about the mem clear.

Oh it wasn't a mem clear.  the only button that worked was the on button.

And for some reason I couldn't link it to my computer either.
Strange.  How did you reset it?  Just pull a battery?

Couldn't, had to get a new one. 

6
TI Z80 / Re: Tetris on the calculator - Help?
« on: April 23, 2011, 02:16:24 pm »
Sorry to here about the mem clear.

Oh it wasn't a mem clear.  the only button that worked was the on button.

And for some reason I couldn't link it to my computer either.

7
TI Z80 / Re: Tetris on the calculator - Help?
« on: April 23, 2011, 02:11:05 pm »
How is this going by the way?

Well it WAS going good until my calculator broke and I had to restart...Haven't had the motivation to start that over yet lol

What I had going was it picked a random number between 1-7 and that in turn opened up a program based on the number.  The program made a piece fall and when it hit the bottom it stopped.  I also made it so the pieces could stack and I was working on making secondary programs so that when you hit a key (I think i set it to alpha or 2nd) it would switch the program and instead of say a l piece falling it would be a _ piece now (it turned).  Didn't finish that.  I plan on picking it back up soon though so I'll update you with it later :)

[Moral of the story: Back up your work on the computer]

8
TI-BASIC / Re: Quick Question
« on: March 31, 2011, 08:53:46 pm »
I'd recommend getting Doors. That way, you can get lots of asm libraries in one package.
the command for CelticIII/Doors to Archive or unarchive is det(0,"PROGNAME",0)



Doors I do have.  Thanks :D



Although Now i am confused.  is it

:det(0,"PROGNAME",0)
:PROGNAME
:det(0,"PROGNAME",0)

to unarchive, run and archive

9
TI-BASIC / Re: Quick Question
« on: March 31, 2011, 08:46:52 pm »
I'd recommend getting Doors. That way, you can get lots of asm libraries in one package.
the command for CelticIII/Doors to Archive or unarchive is det(0,"PROGNAME",0)

Doors I do have.  Thanks :D



10
TI-BASIC / Re: Quick Question
« on: March 31, 2011, 08:44:24 pm »
Yup.  The only downside is that it's another file that the user has to download if they don't have it already.

Of course, most people who know about the existence of calculator games already have xLIB, Celtic, etc. on their calc already :)

Not me :D

I lost my wire so I can't do it now but I suppose I can steal a wire from my friend.

Now question about Assembly:

How exactly does it work? (Do I code it on the calc or computer, do i have to download anything etc)

11
TI-BASIC / Re: Quick Question
« on: March 31, 2011, 08:39:31 pm »
Sadly, unless you use an assembly library, it is impossible to archive or unarchive programs inside another one.

Ugh.  I should move to Assembly soon then -.-

12
TI-BASIC / Quick Question
« on: March 31, 2011, 08:37:20 pm »
[Ugh sorry for new post...This isn't really worth of it but I don't have enough posts for shoutbox yet]

How do you unarchive/archive programs inside of programs, or is it even possible?

I have this little organizer I made for all the programs I have.  The main idea was so that I can keep all my things archived and still be able to access them.  Only problem is that it won't let me unarchive/archive them.

The way I had it set up was

:If z=34
:Then
:unarchive PRGMprogramname
:PRGMprogramname
:archive PRGMprogramname
:end

13
TI Z80 / Re: Tetris on the calculator - Help?
« on: March 31, 2011, 08:31:28 pm »
Welcome to Omnimaga!

to stack, try using pixel test.
spinning... how do you store the tetris piece in memory? a list? a variable?
anyway, welcome to omni!
have the peanuts

What do you mean store the tetris piece?
The picture or ones that have already landed or which piece?
the one that you are moving.

To be honest, right now I'm not entirely sure.  The only way I know right now how to make them is to go through each time and make the pixels.  Although I'm afraid that might make it too slow so perhaps using pics (not sure how to use them though).

How does the calculator know which pixels to turn on to make the particular shape that is moving?

Does it check a list to see which pixels it should turn on?
Is it hardcoded in?
Or does it use some other method?

Well right now it's just using letters (I was testing it)

Basically it rands an int 1-7 and that pics a program (dropai1 through dropai2)

Those programs look basically like this

:1->M
:45->X
:1->Y
:While M≠ 45
:Getkey->M
:Text(57,X,"X"
:If B=1
:Then
:Y+1->Y
:Text(Y,x,"x"
:end
:If Pxl-Test(Y+7,X
:Then
:45->M
:end
:If Y=48
:then
:45->M
:If M=24 and X>5
:Then
:Text (Y,x," "
:text (57,x," "
:x-1->x
:end
:If M=26 and X<90
:then
:text(y,x," "
:text(57,x," "
:x+1->x
:end
:end

14
TI Z80 / Re: Tetris on the calculator - Help?
« on: March 31, 2011, 08:21:23 pm »
to stack, try using pixel test.
spinning... how do you store the tetris piece in memory? a list? a variable?
anyway, welcome to omni!
have the peanuts

What do you mean store the tetris piece?
The picture or ones that have already landed or which piece?


the one that you are moving.

To be honest, right now I'm not entirely sure.  The only way I know right now how to make them is to go through each time and make the pixels.  Although I'm afraid that might make it too slow so perhaps using pics (not sure how to use them though).

Heya and welcome on the forums. Unfortunately I cannot help as I never programmed a Tetris game before. However I heard it was a challenging project for a new programmer, so you must be prepared for a huge task and ready to take on such large project. Good luck if you decide to take on it.

Thanks :)

I'm not exactly a new programmer (but I'm def not a pro).  I've made basic stuff and I'm also working on minesweeper (just don't feel like finishing it at the moment)

15
TI Z80 / Re: Tetris on the calculator - Help?
« on: March 31, 2011, 07:56:54 pm »
Sorry >< New and such

Pages: [1] 2