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.


Topics - dinosteven

Pages: [1] 2
1
TI Z80 / CSE BASIC Graph Screen Snake
« on: July 29, 2013, 10:25:05 am »
Hi. I noticed Hayleia's BASIC snake game on the homescreen, and I wondered how fast it could be on the graphscreen.
Made this today while seeking Weregoose's snake game code for help. (He posted code to it a while ago, and I've used it since, but idk how to contact him about it.)
It uses a trick called the pathfinding tail eater. So no lists! :D Anyhow, here's the code, at 351 bytes:
Spoiler For the code:
::"SNAKE
:ClrHome
:ClrDraw
:AxesOff
:BackgroundOn WHITE
:120→A
:84→B
:118→D
:84→E
:26→K
:132→Xmax
:Vertical Ans
:‾Ans→Xmin
:Vertical Ans
:82→Ymax
:Horizontal Ans
:‾Ans→Ymin
:Horizontal Ans
:For(C,0,E9
:2randInt(2,128→F
:2randInt(2,40→G
:0
:Repeat K=45 or pxl-Test(B,A
:If Ans
:Then
:E+2(pxl-Test(E+1,D)-pxl-Test(E-1,D→X
:D+2(pxl-Test(E,D+1)-pxl-Test(E,D-1
:Pt-Off(D-132,82-E
:Ans→D
:X→E
:End
:Pxl-On(B,A,ORANGE
:Pxl-On(B+(K=25)-(K=34),A+(K=24)-(K=26),ORANGE
:Pxl-On(G,F,GREEN
:getKey
:If max(Ans={24,25,26,34,45
:Ans→K
:A+2(K=26)-2(K=24→A
:B+2(K=34)-2(K=25→B
:End
:If A=F and B=G
:End
:ClrDraw
:ClrHome
:Disp "SCORE:",C
Unfortunately, the snake is quite skinny due to me using pixels (necessary point-pixel usage to the pathfinding tail eater):

2
Computer Programming / Ah! Help!
« on: January 16, 2013, 10:08:50 pm »
Our teacher has been giving us a program to do each day since the start of the year, and I can't quite finish them before the class period is done. I'm falling behind, each day finishing the previous day's program before starting the next. ARRGH - I'm behind 2 programs already after only 8 days! So I'm really sorry for asking for you to do my homework (not entirely, I know it's not right, I want to do it myself), but I need help fast tonight. I don't have a compiler on my computer - well, it's not working - so I can't test.
So the 2 problems are:
Spoiler For Problem1:
Read a text file of Lincoln's Gettysburg Address. Just output the total number of words in it, the total number of unique words ("the" 8 times counts as 1 word), and the top 30 words that occur most frequently.
Special cases are "sixty-three" is 1 word. "joyous - sparkling" as 2 words, " 'tis " as 1 word, "can't" as 1 word, and "The" and "the" are the same, capitals negligible.
So I just need to split the string on spaces, don't add the word if it's a hyphen, convert it to all lowercase, check if it's already in the String Arraylist, and then add it to the arraylist if it meets all the criteria. I can figure out the total number of words by taking the .size() of the Arraylist, and figure out the total number of words by taking the .size() of the array made by the split.
I dunno how to figure out the 30 most frequent, though. Output should be like:
103   the
97    of
59   to
etc.
# words used: 525
# of words: 1577

Spoiler For Problem2:
This one is even easier. I finished this one, but it wasn't working and I couldn't figure out why. Unfortunately, I don't have my code with me.
In a while loop until the user enters in a "?", determine if an input is a valid identifier or not. Criteria for a valid input:
Less than 256 characters; first character is a letter or an underscore, and then followed by numbers, underscores, and digits; no more than one underscore in a row.

This is Java, by the way. My main issue is syntax - I don't know what command does what or how to spell the commands. So I use trial/error until it doesn't give me compile errors. That's what is slowing me down.
Please - I need this soon...

3
Axe / Variable locations?
« on: December 26, 2012, 12:30:17 pm »
I have this:
{S}^5->C
{S}/5->D
{S+1}^5->E
{S+1}/5->F
{S+2}^5->G
{S+2}/5->H
{S+3}^5->I
{S+3}/5->J
.......on until {S+7}/5->R.
There's gotta be a way to optimize this; I know the variables are in some memory location... Can someone explain how to do this?

4
TI Z80 / Flow
« on: December 24, 2012, 10:06:45 am »
You might have played Flow, one of the most popular games on Android and idevices.
https://play.google.com/store/apps/details?id=com.bigduckgames.flow
I decided to make a port of it.  :)
Now, there's only 1 level in it now, hard coded. (The first 5x5 level on the Bonus Pack.) I'll make a level editor later and ask for people to help me make levels.
The game is for 5x5, and I used different sprite shapes for lack of color.

I can't make a screenshot now (haven't got tilp working yet). To anyone who has time to download this and compile it with Axe and make a screenshot of it, please do so and post a screenie! Please!
I only included the source, you'll have to compile it with Axe.

EDIT: Of course I forget about controls and additional details. That's just me.
Arrow keys to move around, [2nd] to select something, then you can move its line w/ arrow keys. You can't move outside, into another line, or into the base blocks. [Alpha] to release. You release either above, below, right, or left of the block to complete it. It autocompletes.

5
General Calculator Help / Kryolpto password
« on: December 10, 2012, 11:59:46 pm »
Someone I don't trust with my calculator was sitting next to me in class, so I naturally turned on Kryolpto's password on startup option.
My password is "3.14159" (original password...) - but now when I turn on my calculator, it doesn't work. It just turns back off like I entered the wrong password...
Since I've gotten my 84+SE, I've never used Krolypto, just had it installed so I could enable it at a whim.
Omnicalc, DoorsCS, and zStart have hooks running.
TI 84+SE w/ OS 2.43 - originally 2.55, boot code changed and OS downgraded.

I seriously doubt someone managed to figure out my password and change it in the time I wasn't looking.

??? What should I do? I don't mind RAM clears, but Krolypto has a way around them. I really don't wanna reset the OS... I've got backed up groups in the archive and my HD crashed so I don't have any computer backups.

6
Axe / Sprites and Greyscale
« on: November 09, 2012, 09:48:51 pm »
So... How do I do a Pt-On() where only the 'on' points are turned on?
How do I make it so it graphs that to both buffers?
Do I need to use two commands, or can I do it all in one command?
And the same questions for Pt-Off()

7
Axe / Path prediction
« on: November 03, 2012, 06:09:32 pm »
Here's my code:
Code: [Select]
:[00003C3C3C3C0000]?Pic1
:37?X
:53?Y
:5?D?C?F
:0?E?S?I?J?G?N
:Repeat (Y?56) or getKey(15) or (G=1)
:Pt-On(X,Y,Pic1)
:X+E?X
:Y-D?Y
:D--
:If (D>64) and pxl-Test(X+4,Y+7)
:C?D
:5?F
:4+X-B/2+E?E
:End
:If X<3
:4?X
:End
:If (X>64) and (X<99)
:63?X
:End
:If pxl-Test(X,Y+4) or pxl-Test(X+7,Y+4)
:?E?E
:End
:DispGraph
:End
I took off the stuff with the paddle movement and some more 'cause it doesn't affect the ball movement. But you can see all the code as attachment BOUNCSRC.8xp on the first post on this thread:
http://ourl.ca/17002
Anyways, the ball bounces around on a paddle 16 pxls long and the very left of it is B-8. I want to have a trail of dots like in the original game:
http://www.madebypixelate.com/games/mr-bounce
It'll describe how the ball will move until it gets to the bottom of the screen, and if the paddle is where the ball will end up, it'll describe how it'll move until it gets to the bottom again. It will also change dynamically with the paddle's movement.
Anyone have any idea how to do this?
I could make ball movement into its own loop and disp a pxl rather than the ball sprite and run it until the Y>56. But that would probably be pretty slow and take up lots of bytes.

8
General Calculator Help / Limiting calc abilities?
« on: October 30, 2012, 11:03:41 pm »
I ask this because my sister has to get a new, low leveled calculator for some math class she's taking; she can't use here 83+ 'cause it can graph! So what if there was a way to limit its functionality for a test?
Couldn't you just block every key except the numbers and the basic operators? Then it would be impossible to graph/use a program/use Solver etc.
Such a program would probably have to be in ASM and have some sort of password protected way of turning the block off... Could anyone do this?

Also, this is almost certainly in the wrong topic; :-\ I thought about putting it in the ASM or the Project Ideas topic but I wasn't sure...

9
TI-BASIC / Optimization failure led to me not understanding my own code
« on: October 29, 2012, 12:44:08 am »
A few months ago, I was making a program that made use of a mouse interface. I had thought that I had come up with some uber awesome optimization, but the code I came up with used more memory than if I had done it the standard way. *facepalm
I never changed it back, and now, months later, I can't understand it.
Basically, it checks the abs() of the distance the mouse is from the center of the button. Rather than a simple
If X<max and X>min and Y<max and Y>min
I came up with this:
Code: [Select]
If not(iPart((46-L₁(1))/19)) and not(iPart(43-L₁(2))/12*sigh
Can someone please fix this mess?

10
Axe / Grayscale Problems
« on: October 08, 2012, 09:22:52 am »
I can't get my grey timer to work!
Where T goes from 375 to 0, my code:
Code: [Select]
:RectI(76,12,8,50)^r
:Rect(76,62-(T*2/15),8,T*2/15)^r
It works, but it leaves behind some residue. ??? Why?

Also, in a totally separate problem, is there a way to display both buffers together without flashing between the two? I want to use the back buffer as something I can pxl-test() separately from the main buffer, but I don't want it to be grey.

11
TI Z80 / Bounce
« on: September 09, 2012, 07:16:48 pm »
This is my first real Axe game, Bounce! Inspired by Mr. Bounce by Pixelate - http://www.madebypixelate.com/games/mr-bounce - and now for the TI 83/84s! It's a basically Breakout with gravity, and a few twists added in. (I haven't got the twists yet, just the basic engine.)

Bounce the ball with your paddle and try to get it to hit the targets, but don't drop it. You only have 1 life! You have about a minute to get everything before the timer runs out - you won't die when it does, but you don't get the bonus points.
My highscore so far is 630, can you beat it? (the default is 0 with "BLACKSCREEN  INC", the name of a group of my friends and I made up when we sold games in school)

I've attached prgms A, AA, BOUNCE, and BOUNCSRC. They are the level editor, the level editor's source, my BOUNCE game, and its source, respectively. I was pretty lazy when making the level editor, so it's not very good. If you screw up, exit, then type 0:Asm(prgmA) - it'll delete and reset the map.

Here's a screenshot:


I hope you like Bounce!

12
General Calculator Help / Tilp isn't working!
« on: September 08, 2012, 12:42:58 pm »
I can't get Tilp to work!
The GUI looks fine, but upon searching for a calc, it says "Can't set cable". And since it can't connect to a calculator, it's entirely useless...
I can't upload or download any files unless I strart up my corrupted-beyond-repair Windows OS partition to use TI Connect...

Information:

Computer:
Spoiler For Computer:
Dell Inspiron 1545
Sometimes the touchpad mouse doesn't work...
Originally shipped with Windows Vista, then got dropped - causing a broken hard drive. Then a new hard drive was installed (idk what brand) with a pirated Windows 7. (Not my intention, those computer guys put it on the hard drive pirated w/out telling me it was pirated.)
Used Wubi to install Ubuntu 12.04, then Windoze thought it was corrupt and "repaired" the system, corrupting it.
Used USB stick to install Ubuntu 10.10
Later, uninstalled Ubuntu 12.04 and installed it again with Wubi
Since the "corruption repair", Windoze has wanted to keep repairing every time I start up - It'll probably mess up Ubuntu 12.04 again...
So it's hard to use Windoze...
Tilp info:
Spoiler For Tilp installation info:
Installed with command "sudo apt-get install tilp", launched with command "tilp" or by clicking button.
It's never worked since I installed it.
Calculator info:
Spoiler For Calculator:
TI 84+SE, bought around March
Linking with a black Male->Female USB cable...

Please help!

13
General Calculator Help / Weird equation variables
« on: August 09, 2012, 10:13:44 pm »
Weird equation variables keep appearing on my calc - a TI 84+SE, bought around March 2012. From the memory menu, here they are:
Spoiler For Spoiler:
Y1 29306
X1T 25438
Y1T 112
Y2T 16
r1 29306
r2 29307
u 25438
v 14960
Whenever I touch them in anyway - attempt to archive, use, delete, even press the Y= button or try to graph, my calc crashes. They're in the RAM, so they disappear, but eventually they come back and trouble me again. And even though they seem to take up all that space, the RAM left doesn't change when they appear. ???
Every time they appear, I have to group my important in-RAM stuff and reset/try to deal with them and clear RAM anyways, then go bring everything back and reset settings. It's annoying, especially having to check for them before graphing!
I have Axe, DCS, Krolypto, MirageOS, Noshell, Omnicalc, Symbolic (not installed), and zStart (not installed) on my calc with hooks. (I think.)
And again, I have a TI 84+SE, bought around March. What is this?

14
Axe / Check Calc ID
« on: August 06, 2012, 01:19:20 am »
Is there any way I can check the calc's ID number and store it to a variable?
School's starting soon, and that means that my classmates are going to steal my calc and try to steal my in development games. I need a way to stop them from using them, so only I can run it! I used to store a key value to a variables, but they've taken to stealing all my variables, too! So I need to find a way to check the calc's ID number, and I thought Axe might be able to do it.

15
Axe / Input
« on: July 25, 2012, 06:05:56 pm »
I tried looking at the source of a bunch of Axe games, but all I got was a bunch of stuff like :" YTOJEB"
??? It made no sense!
I've tried using the input command, but I couldn't get that to work, either.

So, how?

Pages: [1] 2