I might do an Indian holiday, in ICE... This is just to plant my flag Razz I have no ideas yet, so we'll see how things go.

***the subcontinent of India, /not/ native Indians, just saying

ARCHIVES LINK: https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/games/SM84CECC21Diwali.zip
Yeah, well I'm doing Diwali, which is a festival of lights. I haven't yet decided on what exactly, but it will revolve around a Lights-Out theme...

A cross-post from the main CC21 thread:
SM84CE wrote:
So could I just have a program that switches on and off an array of 9 (3x3) 'lamps', based on a keypress? I'll elaborate more in my thread, after I get screenshot links up...
Try making it as related to Diwali as possible, adding decorations/graphics when possible.
Because of the magical machine that some people seem to be unable to use [size=1](Google, for those unfamiliar)[/i] I am now informed as to what Diwali is, and remember it from n-th grade social studies class.

I'm actually quite excited to see how you manage to pull off the program. You should create a Github repo with a download and source, so that others can help you! Don’t forget to create an IRC integration, and link the bot with #CC21
This list code is acting up, when it hits the Disp L1(0 block, it spits out the indicated values (in the code), when it should spit out 0 0 0. What am I doing wrong?


Code:
[i]CC21SRC
...
Pause
Data(3,0,0,0->AA->BB->CC
Copy(AA,L1,9
Copy(BB,L2,9
Copy(CC,L3,9
ClrHome
//                VV indicates what is being displayed on-screen
Disp L1(0 //13740101
Disp L1(3 //11219
Disp L1(6 //10134
Pause
ClrHome
Disp L2(0 //0 -normal
Disp L2(3 //0
Disp L2(6 //0
Pause
ClrHome
Disp L3(0 //0
Disp L3(3 //0
Disp L3(6 //0
Pause
Swap the first 2 arguments of all the Copy's.
lemme work on that, here's a GIF link to what I have so far:

https://drive.google.com/open?id=1OZIbuAqLXZE2pm3fmXyVtecydW57dVw_

the 'lamps' are turned on by pressing 0-9, 7=top left. Turning off will either be controlled by the same numbers, or the 3x3 keys above the # pad (apps, prgm, vars, sin, cos, tan, ...)
That looks really cool! Nice progress!
I've made more progress, the lamps are now controlled by the same 1-9 keys. ON and OFF -> use the corresponding key. I'm fairly done with a controls screen, just need to make 'authentic' gfx. That, I don't know if I can do, but I'll try and see what I can do. Suggestions for the lamp control stuff? Currently, it's 1 switch to a lamp, so 1 switch can not control 2 or more lamps. I might just leave that as is...
Since everybody is posting progress reports, I will too Razz

Nothing much has been added, except for a rudimentary 'controls' screen. Now, I'm split between adding save/load features next, or adding a random lamp to be turned on/off when another is switched. Any ideas? Also, when I tried a Read( function in ICE, I just got some weird accented chars and the like. Should I have deleted the string before reading data to it? If that's not it, what should I have done? I looked up 'Diwali' on Google, and the lamps looked a lot like what I have, so...

jcgter777 wrote:
Try making it as related to Diwali as possible, adding decorations/graphics when possible.

↑↑ Done!


Code:
[i]APPV2
CloseAll
If not(Open("SM84CE","r+"
   Open("SM84CE","w+
End
CloseAll
Open("SM84CE","r+"->A

Write("SM84CE is the best",27,1,A
Pause
Read(Str1,27,1,A
Pause
Disp Str1


Pause
Since you told me to post, alright! Razz

Things to add could be a fancy menu, a sprite background, and maybe make it more graphical. Otherwise, it's already quite good.
A few fixes/ stuffs:

SM84CE wrote:
when I tried a Read( function in ICE, I just got some weird accented chars and the like. Should I have deleted the string before reading data to it? If that's not it, what should I have done?


Code:
[i]APPV2
CloseAll
If not(Open("SM84CE","r+"
   Open("SM84CE","w+
End
CloseAll
Open("SM84CE","r+"->A

Write("SM84CE is the best",27,1,A
Pause

Rewind(A

Read(Str1,27,1,A
Pause
Disp Str1


Pause

^^ the Write( [or was it the Read( ?] messes with the file offset, so I need to use either a Rewind(SLOT, or a Seek(...) before the Read( is used.

Also: can I do

Code:

OpenVar("SLTEST","w+"->A
Data(3,0,0,0->DATA
Write(DATA,9,1,A
SM84CE wrote:
Also: can I do

Code:

OpenVar("SLTEST","w+"->A
Data(3,0,0,0->DATA
Write(DATA,9,1,A

Sure, that would work.
Likewise, if I were to read the data to Str1, what would it display? Or should I read the data to, for example, SAVEFILE, then do ***{SAVEFILE} (is that syntax right, it doesn't look right...} to display/ store/ manipulate the data?
Copy(L1,DATA,3 \ Copy(L2,DATA+3,3 \ Copy(L3,DATA+6,3
Easy Smile
some more clipped IRC logs:
**I clipped out the irrelevant stuff to make the log slightly smaller
As for why I used the code tag, it was for the scrolling...


Code:

IRC Logs:
[2018-03-05 15:47:51] <SM84CE> no, to combine 3 lists into 1?
[2018-03-05 15:48:05] <P_T> Copy(L1+0,L2+0,3
...
[2018-03-05 15:48:26] <P_T> Data( takes only numbers as arguments
[2018-03-05 15:48:32] <SM84CE> oh...
[2018-03-05 15:49:19] <SM84CE> so I'd use Copy(L1+0,L2+0,3) to get...
[2018-03-05 15:50:02] <P_T> Magic
[2018-03-05 15:50:04] — P_T runs
[2018-03-05 15:50:34] <SM84CE> The end result has to be {L1(0),L1(3),L1(6),L2(0),L2(3),L3(0),L3(3),L3(6)} in DATA
[2018-03-05 15:52:21] <SM84CE> how the heck do I do that in ICE?
...
[2018-03-05 15:54:30] <saxjax> [john35588] freeze it.
[2018-03-05 15:55:25] <SM84CE> hehehe
[2018-03-05 15:56:00] <SM84CE> no, really... P_T?
[2018-03-05 15:57:23] <jcgter777> hey people
[2018-03-05 15:57:30] <jcgter777> SM84CE on irc, eh?
[2018-03-05 15:57:33] <P_T> Lol wat
[2018-03-05 15:57:36] <P_T> Ehm let me see
...
[2018-03-05 16:00:04] <P_T> No, then you would need this:
[2018-03-05 16:00:40] <P_T> Alloc(27->DATA \ Copy(DATA,L1,9 \ Copy(DATA+9,L2,9 \ Copy(DATA+18,L3,9
...
[2018-03-05 16:00:54] <P_T> Or omit the first store if you already know DATA
[2018-03-05 16:01:48] <SM84CE> you mean the Alloc()?
[2018-03-05 16:01:52] <P_T> Yes
[2018-03-05 16:02:20] <SM84CE> so after reading to 3 lists before starting, I would omit the Alloc when saving?
[2018-03-05 16:02:48] <P_T> I think so, because you used DATA already?
[2018-03-05 16:03:11] <SM84CE> DATA in the beginning was what would be split into the 3 lists
[2018-03-05 16:03:16] <SM84CE> so, yes?
[2018-03-05 16:03:20] <P_T> Yes
[2018-03-05 16:04:48] <SM84CE> ok, lemme post these IRC logs for reference...
Progress update!

I got random light control working, I'm going to make the objective to turn ON all the lights.
I'm working on saving and loading right now.
Should I have the random light control turn on/off a light everytime a number key (1-9) is pressed, or have a random number control that?


Code:
[i]DIW
...
If randInt(0,2)>0
    //do random control stuff
End
//normal key stuff
Cool! I don't know about the light controlling yet, but I was wondering if the lights ever turn off by themselves? It'd make it more fun to spam the keyboard trying to do that, but that might not be your plan. Maybe some surprises could be good, I don't know. Smile
Oh, there's a little surprise in there, it's small, but nobody will know until the final release! Razz
I'll (try) to make a cool menu, though!
You made a nice menu for me, and it's pretty good. I'd just add some cool graphics to it, a cursor, and some more glory.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement