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 - Radical Pi

Pages: 1 ... 3 4 [5] 6 7 ... 80
61
Portal X / Re: Portal X
« on: March 09, 2010, 11:25:04 pm »
Note to self: learn Axe while it's still young

This is simply stunning. I've never played the real Portal, but I'll be sure to give this a go when you finish it!

62
Gaming Discussion / Re: Cool online games
« on: March 09, 2010, 11:03:03 pm »
Wow, I remember playing that game last year. I was addicted to it for about a week, to the point that I could beat the entire game without losing more than five to ten lives.

63
TI-BASIC / Re: Collision Detection Help
« on: March 09, 2010, 06:53:14 pm »
Your most recent code doesn't work if you ever go into any of the screen's edges (A=1 or A=8 or B=1 or B=16) because even if you might not be trying to move in the offscreen direction, your code still ends up testing each space adjacent to you, of which one will be offscreen and cause an error.

It would be much easier to fix this up if we knew whether or not your maze would ever allow you onto those edges :P

EDIT: And there's my answer. So the problem is solved totally now?

64
TI-BASIC / Re: Collision Detection Help
« on: March 09, 2010, 06:33:30 pm »
This is just me brainstorming without testing my thoughts with code, but I think ztrumpet's code fails because Str1 doesn't get updated to include the nether zone that you can move into. But if you did add all that whitespace to Str1 every time you went farther out of bounds, it would just open up a whole new can of worms regarding tracking your location in the string. And fixing all those new problems would just make this a horribly inefficient piece of code I would think, when so many alternatives are possible.

Maybe you should either completely disallow going offscreen, or make the Output(A,B,"* line be conditionally dependent on being onscreen.

65
TI-BASIC / Re: Collision Detection Help
« on: March 09, 2010, 06:18:12 pm »
What spaces? *looks*
Ah, ingenious! Those spaces prevent domain errors from when you're trying to go up at the top of the screen, or down at the bottom of the screen, or the same for the sides (although those should only matter in the very first and very last place in the string). I never thought to do it that way!

EDIT: 8 seconds. We're even now :P *ZTrumpet lols...

66
TI-BASIC / Re: Collision Detection Help
« on: March 09, 2010, 06:10:21 pm »
tifreak: But your current location in the string is just 16A-16+B at any given time, assuming you're using the typical 8x16 homescreen map string. That's not really worth its own variable in my opinion.

meishe91: Your location in the string at any time is just 16A-16+B. To get the above space, subtract 16 from that. To get the left space, subtract 1. Down: +16. Right: +1. See how it works?

67
TI-BASIC / Re: Collision Detection Help
« on: March 09, 2010, 06:02:40 pm »
Disregarding the fact that you could totally rewrite that code for efficiency...
Change AB+16 to 16A+B, and change AB-16 to 16A-32+B.
Warning, though, this solution still doesn't take into account when you're trying to move off the screen, so do something about that. I just fixed your subs :P

EDIT: Argh, beaten with a more in depth solution

68
TI Z80 / Re: Monopoly v3.0 BETA
« on: March 09, 2010, 04:46:36 pm »
DJ Omnimaga, that's exactly how I've felt for the last several years. I think I'm going to fit right in at this place ;D

Anyways, this project sounds cool. I don't play Monopoly very often, but when I do it gets competitive and intense fast :)
I can't wait to see this when it's done!

69
TI Z80 / Re: A typical Connect 4 game in TI-Basic
« on: March 09, 2010, 02:12:24 am »
There's cumSum( for finding the cumulative sum of a matrix's columns, but that can't really help me at all, not the way I'm currently storing the grid. Plus, it would only do anything useful for the downwards victory.
The fact that you can win diagonally is what makes this so hard to make more efficient, I think.

70
TI Z80 / A typical Connect 4 game in TI-Basic
« on: March 09, 2010, 12:51:08 am »
EDIT 2: This code is outdated. The final version is in a later post in this topic.

This is what I've been working on all day. It isn't completely finished; I realized just a few minutes ago that I totally forgot to handle a tied game, and it doesn't give you any fancy victory message when you win. And you will win, since the AI opponent is just "choose a random column." But I didn't make this for the AI; I made it for everything else.

The main program is MAINLOOP (obviously) and I made GRAVITY a subprogram because it saves a few bytes. That brings me to the main reason I made this topic... I want to see if this can be optimized any more than it already is. I think I've already done a decent enough job on it, but I really want to make it as small as it can be.

I've attached both programs, and here's the code too:

Code: [Select]
MAINLOOP
:Disp "WILL YOU MOVE
:Input "FIRST? Y/N: ",Str1
:Str1≠"Y→T
:{6,7→dim([A]
:Fill 0,[A]
:ClrHome
:For(A,2,7
:Output(A,2,". . . . . . .
:End
:Output(8,2,"-------------
:Repeat W
:If T
:Then
:Repeat not([A](1,Ans
:randInt(1,7→C
:End
:prgmGRAVITY
:Else
:DelVar M4→C
:Repeat M
:Output(1,2C,"V
:Repeat max(K={21,24,26,45
:getKey→K
:End
:If K=45
:Return
:If K=21 and not([A](1,C
:Then
:prgmGRAVITY
:1→M
:Output(1,2C,"
:End
:If K≠21
:Then
:Output(1,2C,"
:C-25+Ans→C
:Ans-7(Ans=8)+7not(Ans→C
:End
:End
:End
:{1,1,1,1→{L1}
:T+1→T
:1→A
:While A<4 and R+A≤6 and Ans
:If T=[A](R+A,C
:Then
:1+{L1}(1→{L1}(1
:A+1→A
:Else
:0
:End
:End
:1→A
:While A<4 and C-A≥1 and Ans
:If T=[A](R,C-A
:Then
:1+{L1}(2→{L1}(2
:A+1→A
:Else
:0
:End
:End
:1→A
:While A<4 and C+A≤7 and Ans
:If T=[A](R,C+A
:Then
:1+{L1}(2→{L1}(2
:A+1→A
:Else
:0
:End
:End
:1→A
:While A<4 and R+A≤6 and C+A≤7 and Ans
:If T=[A](R+A,C+A
:Then
:1+{L1}(3→{L1}(3
:A+1→A
:Else
:0
:End
:End
:1→A
:While A<4 and R-A≥1 and C-A≥1 and Ans
:If T=[A](R-A,C-A
:Then
:1+{L1}(3→{L1}(3
:A+1→A
:Else
:0
:End
:End
:1→A
:While A<4 and R+A≤6 and C-A≥1 and Ans
:If T=[A](R+A,C-A
:Then
:1+{L1}(4→{L1}(4
:A+1→A
:Else
:0
:End
:End
:1→A
:While A<4 and R-A≥1 and C+A≤7 and Ans
:If T=[A](R-A,C+A
:Then
:1+{L1}(4→{L1}(4
:A+1→A
:Else
:0
:End
:End
:max(3<{L1}→W
:not(T-1→T
:End

GRAVITY
:DelVar  RR
:Repeat Ans=5 or [A](Ans+1,C
:Ans+1
:End
:Ans+(Ans=5 and not([A](6,C→R
:T+1→[A](Ans,C
:Output(R+1,2C,sub("XO",T+1,1

In particular, I'm wondering if there's a less ridiculous way of figuring out when a player wins (which is the section in MAINLOOP from the :{1,1,1,1→{L1} line to the :max(3<{L1}→W line). And I know I could already save a few bytes in that section by incrementing T for its duration. But what else? I've hit my limit already :(

EDIT: I did that T+1→T optimization and saved six bytes. And it also made me catch a bug I didn't even know was there. I've updated the attached file with this fix too.

71
The Axe Parser Project / Re: Axe Parser
« on: March 08, 2010, 11:32:09 am »
Wow, this language looks powerful! And also very different from the Basic that I remember. I see that it's still pretty early in development though, so how much is the syntax going to change over the coming months? Should I start learning how to use it now, or should I wait for it to stabilize a little more (or is it already fairly stable)?
Either way I can't wait to get my hands on this :D

72
Introduce Yourself! / Re: I'm not very good with introductions...
« on: March 08, 2010, 12:45:03 am »
I don't think I've ever updated my OS. I must have whatever it had when I first got it... Version 2.30. Is updating the OS worth it?
And thanks, I'll check out the download section here for games then.
And I'll check out this Axe Parser you mentioned.

73
Introduce Yourself! / Re: I'm not very good with introductions...
« on: March 08, 2010, 12:03:44 am »
Thanks for the warm welcome!
I only have a TI-84 Plus Silver Edition, and I started college this year so I can't afford any newer ones.
I do have some programming experience with it, so... what do I do now? What CAN I do now?
Oh, and what are some must-play games for my model? :P

74
Introduce Yourself! / I'm not very good with introductions...
« on: March 07, 2010, 11:03:12 pm »
Hi, I just found this place today, and uh... well that's it. I want to learn everything I can about making calculator games and all that fun stuff that seems to be happening here ;D

75
Music Showcase / Re: New song (very Stepmania/japaneese style)
« on: September 12, 2008, 08:48:37 pm »
That got me good! It took me a while to realize what it was, but when I did I liked it even more :P

Pages: 1 ... 3 4 [5] 6 7 ... 80