Author Topic: Lights Out help?  (Read 12456 times)

0 Members and 3 Guests are viewing this topic.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Lights Out help?
« Reply #15 on: December 01, 2013, 01:57:13 am »
You have some pretty nice graphics here. :) I'm waiting for the final release though. I guess instead of packing levels with it you should just randomize the board.
« Last Edit: December 01, 2013, 01:57:56 am by Streetwalker »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Lights Out help?
« Reply #16 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
« Last Edit: December 01, 2013, 04:55:45 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Lights Out help?
« Reply #17 on: December 01, 2013, 04:13:53 am »


This is pretty cool! +1

Here's one thing you can optimize: instead of A+1->A use A++
wha, i love those graphics, great job JWinslow!

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Lights Out help?
« Reply #18 on: December 01, 2013, 10:56:16 am »
Wow that is  :o
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Lights Out help?
« Reply #19 on: December 01, 2013, 12:21:34 pm »
Sorunome and Streetwalker, thanks for the compliments! Final version in a few days, hopefully.

Hayleia, I actually DID base my graphics off of his, and I will be sure to credit him for the graphics.

Xeda has also optimized it to 1,400 bytes compiled. Now to add a win message...and code coming sooner today!

EDIT: The source is attached, and I have a screenie. (Sorry the graphics look weird in the win message, I used Wabbitemu. They look fine on a TI-83+, so I don't know what was wrong there.)

If you don't have Axe Parser, I'm releasing the no-shell compiled result too! The Axe source is ASHUTDN.8xp, and the compiled result is SHUTDOWN.8xp.
« Last Edit: December 01, 2013, 02:09:19 pm by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Lights Out help?
« Reply #20 on: December 01, 2013, 03:47:44 pm »
Sounds fun I'm downloading now  :)
« Last Edit: December 01, 2013, 03:48:48 pm by ClrDraw »
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Lights Out help?
« Reply #21 on: December 01, 2013, 04:26:40 pm »
Is there an equivalent of sub( in BASIC for use in Axe? And can you store a string to a Pic (sprite)?
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Lights Out help?
« Reply #22 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.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Lights Out help?
« Reply #23 on: December 01, 2013, 05:06:15 pm »
I have not tested this, but it should work.

Code: [Select]
:.TEST
:"TEST STRING"->String1
:Fill(L1,20,0)
:Copy(String1+4,L1,5)
:ClrHome
:Output(0,0,L1)

This should take "TEST STRING" and output "STRING".
« Last Edit: December 01, 2013, 05:07:35 pm by ClrDraw »
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Lights Out help?
« Reply #24 on: December 01, 2013, 05:14:14 pm »
The following code displayed "SLHLULTLDLOLWLNL", but there seems to be no mention of an L. Help?

Code: [Select]
.EXAMPLE
"SHUTDOWN"->Str1
For(X,0,7
Copy(Str1+X,L1,1
0->{L1+2}
Disp L1
End

EDIT: Never mind, ClrDraw fixed it.

I'll incorporate it into a title screen. I'll post code in 1 - 2 days.
« Last Edit: December 01, 2013, 05:41:43 pm by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Lights Out help?
« Reply #25 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
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Lights Out help?
« Reply #26 on: December 02, 2013, 01:39:02 am »
But...L1, according to the documentation, is "free RAM", which doesn't take up any RAM. The earlier method is fine.

EDIT: Also, I decided I won't need it for this project. Maybe Cookie Clicker.

BTW, can someone make some code to draw a 3 level grayscale cookie?
« Last Edit: December 02, 2013, 01:40:39 am by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline XiiDraco

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 513
  • Rating: +32/-5
  • Forget the numbers, just call me, Recreation.
    • View Profile
    • Black-Lark Games
Re: Lights Out help?
« Reply #27 on: December 02, 2013, 02:14:23 am »
Weird I thought I saw someone mention a cookie clicker before on the forum, but when I searched this page was the ONLY result. Huh.

Also. I love floating point math.   >:D

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: Lights Out help?
« Reply #28 on: December 02, 2013, 07:21:44 am »

Code :
Code: [Select]
[0007C000003FFC0000F81F0001F70F8007CF8BC00FCF89C01E6709E03C2000707810183070003C3860003C38E0001818E03C0018E07E001CF07E001CD83C039CCC00079CC200031C6000081870000338708001B839C000F039E000F01CC801E00E0803C00738078001F00E0000E01800003FF00000078000]->Pic1
[0007C000003FFC0000FFFF0001FF1F8007FF9FC00FEF8FC01FE79FE03FF319F07C783C70781C7E7870027E38E0383C18E07C0018F07E001CFC7E031CFC7E079CFC1C07BCE300433C7080193870208FF879D083F839E903F03DEB03F01ECE03E00FF807C007FC1F8001FEFE0000FFF800003FF00000078000]->Pic2
But I don't remember how to use sprites from cemetech. This cokkie is 30*30 sized, and uses 4*4sprites. I think theyr are aligned like this
Code: [Select]
0|1|2|3
--------
4|5|6|7
--------
8|9|A|B
--------
C|D|E|F
Code: [Select]
For(F,0,3
For(E,0,3
Pt-On(E*8,F*8,F*4+E*8+Pic1)
Pt-On(E*8,F*8,F*4+E*8+Pic2)^^r
End:End

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Lights Out help?
« Reply #29 on: December 02, 2013, 11:32:38 am »
The cookie looks good! But the image on the calculator...not so much.  :-\

Sorry, but the code doesn't work. And not just because you didn't add a ClrDraw at the beginning and Repeat getKey(15):DispGraph r:End at the end, but because it doesn't display a cookie. It looks like MissingNo.

The cookie is an image I will consider, though!  ;D

EDIT:
Weird I thought I saw someone mention a cookie clicker before on the forum, but when I searched this page was the ONLY result. Huh.

That was me. Seriously, it would look GREAT in Assembly!

Also. I love floating point math.   >:D

How to do that, how to do that...

I don't know, this Cookie Clicker talk should be a bigger project for us. Maybe I can partner with some of the Coders of Tomorrow for the floating point math, as well as formatting.  :D
« Last Edit: December 02, 2013, 11:36:22 am by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?