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 - Hayleia

Pages: 1 ... 61 62 [63] 64 65 ... 239
931
Axe / Re: Lights Out help?
« on: December 03, 2013, 02:16:42 pm »
I wonder if you could optimize it
Just ask and you shall get.
The version I gave you is 496 bytes.

Optimizing the two For loops, we can get down to 477 bytes
Code: [Select]
[0007C000003FFC0000F81F0001F70F8007CF8BC00FCF89C01E6709E03C2000707810183070003C3860003C38E0001818E03C0018E07E001CF07E001CD83C039CCC00079CC200031C6000081870000338708001B839C000F039E000F01CC801E00E0803C00738078001F00E0000E01800003FF00000078000]->Pic1
[0007C000003FFC0000FFFF0001FF1F8007FF9FC00FEF8FC01FE79FE03FF319F07C783C70781C7E7870027E38E0383C18E07C0018F07E001CFC7E031CFC7E079CFC1C07BCE300433C7080193870208FF879D083F839E903F03DEB03F01ECE03E00FF807C007FC1F8001FEFE0000FFF800003FF00000078000]->Pic2
ClrDraw^^r^^r
0
For(4)
 ->X
 ~1->Y
 For(30)
  {Y+1->Y*4+X->r1+Pic1}->{Y*12+X->r2+L6}
  {r1+Pic2}->{r2+L3}
 End
 X+1
End
While 1
DispGraph^^r
EndIf getKey(15)

Then, changing the algorithm a bit, we can get down to  467 bytes
Code: [Select]
[0007C000003FFC0000F81F0001F70F8007CF8BC00FCF89C01E6709E03C2000707810183070003C3860003C38E0001818E03C0018E07E001CF07E001CD83C039CCC00079CC200031C6000081870000338708001B839C000F039E000F01CC801E00E0803C00738078001F00E0000E01800003FF00000078000]->Pic1
[0007C000003FFC0000FFFF0001FF1F8007FF9FC00FEF8FC01FE79FE03FF319F07C783C70781C7E7870027E38E0383C18E07C0018F07E001CFC7E031CFC7E079CFC1C07BCE300433C7080193870208FF879D083F839E903F03DEB03F01ECE03E00FF807C007FC1F8001FEFE0000FFF800003FF00000078000]->Pic2
ClrDraw^^r^^r
~1->r1
~9->r2
For(120)
 {Select(r1+1,->r1 and 3??r2+8->r2)+Pic1}->{r2+1->r2+L6}
 {r1+Pic2}->{r2+L3}
End
While 1
DispGraph^^r
EndIf getKey(15)

Now ask Runer112 and you'll get down to 5 bytes.

edit
I am so stupid, this can be done in 457 bytes
Code: [Select]
[0007C000003FFC0000F81F0001F70F8007CF8BC00FCF89C01E6709E03C2000707810183070003C3860003C38E0001818E03C0018E07E001CF07E001CD83C039CCC00079CC200031C6000081870000338708001B839C000F039E000F01CC801E00E0803C00738078001F00E0000E01800003FF00000078000]->Pic1
[0007C000003FFC0000FFFF0001FF1F8007FF9FC00FEF8FC01FE79FE03FF319F07C783C70781C7E7870027E38E0383C18E07C0018F07E001CFC7E031CFC7E079CFC1C07BCE300433C7080193870208FF879D083F839E903F03DEB03F01ECE03E00FF807C007FC1F8001FEFE0000FFF800003FF00000078000]->Pic2
ClrDraw^^r^^r
~4->r1
~12->r2
For(30)
 Copy(r1+4->r1+Pic1,r2+12->r2+L6,4)
 Copy(r1+Pic2,r2+L3,4)
End
While 1
DispGraph^^r
EndIf getKey(15)



For the code with Bitmaps commands, I don't see a lot to optimize except the two Clrdraws to put in a ClrDraw^^r^^r and the "0,0," to transorm into "0,,".

932
TI Z80 / Re: VVVVVV
« on: December 03, 2013, 02:13:48 am »
What's the problem with the menu ? If you know how to move a character on the screen, you know how to move an arrow on the screen that would indicate the current choice ;)

933
Axe / Re: Lights Out help?
« on: December 03, 2013, 01:49:59 am »
See why I said "if I made no errors this time" ? :P
Just tested my code, and there are some things to change, but you get the idea.
Here's the full working (unoptimized) code to display that cookie:
Code: [Select]
[0007C000003FFC0000F81F0001F70F8007CF8BC00FCF89C01E6709E03C2000707810183070003C3860003C38E0001818E03C0018E07E001CF07E001CD83C039CCC00079CC200031C6000081870000338708001B839C000F039E000F01CC801E00E0803C00738078001F00E0000E01800003FF00000078000]->Pic1
[0007C000003FFC0000FFFF0001FF1F8007FF9FC00FEF8FC01FE79FE03FF319F07C783C70781C7E7870027E38E0383C18E07C0018F07E001CFC7E031CFC7E079CFC1C07BCE300433C7080193870208FF879D083F839E903F03DEB03F01ECE03E00FF807C007FC1F8001FEFE0000FFF800003FF00000078000]->Pic2
ClrDraw(L6)
ClrDraw(L3)
For(X,0,3)
 For(Y,0,29)
  {Y*4+X->r1+Pic1}->{Y*12+X->r2+L6}
  {r1+Pic2}->{r2+L3}
 End
End
While 1
DispGraph^^r
EndIf getKey(15)

edit just thought of an easier way to put it lol (but I like playing with bytes, I made my own sprite routine in Omniblade so that the player sprite loops :P)
Code: [Select]
[201D]->Pic1
[0007C000003FFC0000F81F0001F70F8007CF8BC00FCF89C01E6709E03C2000707810183070003C3860003C38E0001818E03C0018E07E001CF07E001CD83C039CCC00079CC200031C6000081870000338708001B839C000F039E000F01CC801E00E0803C00738078001F00E0000E01800003FF00000078000]
[201D]->Pic2
[0007C000003FFC0000FFFF0001FF1F8007FF9FC00FEF8FC01FE79FE03FF319F07C783C70781C7E7870027E38E0383C18E07C0018F07E001CFC7E031CFC7E079CFC1C07BCE300433C7080193870208FF879D083F839E903F03DEB03F01ECE03E00FF807C007FC1F8001FEFE0000FFF800003FF00000078000]
ClrDraw(L6)
ClrDraw(L3)
Bitmap(0,0,Pic1,L6)
Bitmap(0,0,Pic2,L3)
While 1
DispGraph^^r
EndIf getKey(15)

934
Axe / Re: Help Request - ERROR INVALID TOKEN
« on: December 02, 2013, 05:09:32 pm »
You are missing a +1 in the Y-X, otherwise, randInt(0,1) would be rand^1+0 which always returns 0 ;)
Also, while yours gives the general solution, the particular solution was given in ben_g's first post.

935
Gaming Discussion / Re: 3DS Friend Codes
« on: December 02, 2013, 12:35:22 pm »
Why not use nicknames then ? ???
This is just my thought, but maybe children want their names as nickname but the net can't support an infinite number of Arthur and Kimia :P
So either the children have to accept to be called Arthur89 and Kimia57 or let them be called the way they want but differentiate them with those friend codes.

936
Axe / Re: Lights Out help?
« on: December 02, 2013, 12:13:46 pm »
But...L1, according to the documentation, is "free RAM", which doesn't take up any RAM. The earlier method is fine.
It is only free RAM as long as you don't use it ;)
Yes it is free RAM and you can use it whenever you want, but my point is that you might need it somewhere else so if you can save it, save it but if you don't need to, don't save it.

For the cookie image, are you sure it is divided in sprites like that and not just divided in plain bytes ?
If it's plain bytes, something like this should work (if I made no errors this time :P):

.unoptimized
For(X,0,3)
 For(Y,0,29)
  {Y*4+X->r1+Pic1}->{r1+L6}
  {r1+Pic2}->{r1+L3}
 End
End

(Sorry, can't test right now)

937
Axe / Re: Lights Out help?
« on: December 02, 2013, 12:48:22 am »
The problem with your code (and I guess with my code) is that the 0->{L1+2} puts the 0 a bit too far, so you have a random byte (that correspond to the L) between the character you are trying to display and the end of the string. Try the same with a L1+1, it should work.
The reason why ClrDraw's code works is because he doesn't place a zero, he places a whole bunch of them :P
But his code only works for strings shorter than 20 characters while mine (once fixed) would work for any.

Also, I thought about another code that doesn't waste RAM.

"Imma Absol again"->°String
Text(0,6)
°String+2-1->r1
For(4)
 Text {r1+1->r1}>Char
End

938
Gaming Discussion / Re: 3DS Friend Codes
« on: December 02, 2013, 12:36:24 am »
Now the stupid question, coming from someone who doesn't have a 3DS (yet). What are those friend codes for ? Play multiplayer games ? Exchange things ? I am really curious.

939
TI Z80 / Re: Does a appvar editor exist for the Ti-83/84?
« on: December 02, 2013, 12:34:41 am »
For example, I played Donkey Kong (DK5ION) that saved highscores to an appvar. I unarchived it, opened Calcsys, figured out the format of the highscore list, and edited it.
Did you mean you cheated ?
* Hayleia runs
:P

But yeah, an "editor" that changes bytes is easy to do, what's not so easy is to change those bytes in a smart way. For example, in KoFiX, you first have a string that says that this appvar is for KoFiX, and if you don't know that, you'll just think "What are those random bytes ? They don't look like notes at all".

940
TI Z80 / Re: Tipover - the crate game <<contest 2013>>
« on: December 01, 2013, 05:02:22 pm »
Which shell is it compiled for and which version of Axe is it compiled with ?

941
Axe / Re: Lights Out help?
« on: December 01, 2013, 04:47:02 pm »
Is there an equivalent of sub( in BASIC for use in Axe?
Try this code.

"Imma Absol"[00]->°String
Text(0,0,°String)
Text(0,6,°String+1)
Text(0126,°String+2)

This will be the output (if I didn't make a typo):

Imma Absol
mma Absol
ma Absol

Why ? Because pointers.
So if you want to display part of a string, just copy the part of the string you like somewhere, add a zero behind and you're ok. Try this code for example,

"Imma Absol"[00]->°String
Copy(°String+2,L1,4)
0->{L1+5}
Text(0,,L1)

And can you store a string to a Pic (sprite)?
"Pic" is a pointer, not an object, you can't store anything inside ;)
But what do you mean with "store a string to a Pic" ? Like doing "Imma Absol"[00]->Pic1 ? Well, that would work since Pic1 is a pointer like any other one.

942
TI Z80 / Re: Jumper for the +C
« on: December 01, 2013, 06:53:12 am »
It looks great and smooth :D
Will you implement "realistic" movement ? I mean continuous velocity and not 0 to 1 in 0 seconds ?
(I am talking about horizontal movement)

943
Miscellaneous / Re: Best Quotes
« on: December 01, 2013, 04:58:13 am »
"I'll never gonna give you up, never gonna let you down"
 - Rick Astley
I agree that this was funny :P
But let's not get this board spammy, it can be interesting to see which quotes people like to know them better. For example, reading the quote I like, you now know that I am pessimistic.

944
Miscellaneous / Re: Best Quotes
« on: December 01, 2013, 04:53:47 am »
"Who never tries never fails"
- Forgot his name, in Robots (a movie)

I actually say it everytime I don't know an answer, and at a test, one of my classmates actually wrote this as an answer to a question between quotes with my name beneath. The teacher liked it too XD

945
Axe / Re: Lights Out help?
« on: December 01, 2013, 03:19:33 am »
The graphics look a lot like the ones used by leafy in LightsOff. If you used those sprites, be sure to add him in the credits ;)


LightsOff by leafy

Pages: 1 ... 61 62 [63] 64 65 ... 239