Author Topic: Few simple questions  (Read 18511 times)

0 Members and 3 Guests are viewing this topic.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Few simple questions
« on: May 24, 2012, 04:20:35 pm »
I have some basic questions

1) is it possible that if you have a string, "00000" to only change one of the 0's with a code? It's if i press for example f1 it should adjust the first, f2 should chane the 2nd, ..,

2) the easyest way to make a time delay for a blinking pixel would be a for loop? Cause if i do:
Code: [Select]
Starttmr->T
Lbl1
If chektmr(T)>= 3
Then
...
End
Goto1
 
It doesn't work
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Few simple questions
« Reply #1 on: May 24, 2012, 04:34:26 pm »
1.
Code: [Select]
"."+Str1"+".→Str1
Repeat 2≥abs(Ans-3
getKey-10
End
sub(sub(Str1,1,Ans)+"1"+sub(Str,Ans+2,6-Ans),2,5→Str1

2. If it's a small delay, then rand(#) is better.
« Last Edit: May 24, 2012, 05:15:33 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Few simple questions
« Reply #2 on: May 24, 2012, 04:41:20 pm »
Could you give a little explaination of the code you wrote? Maybe with a little example? And i don't know if this matters but te 0's could only become a 1

And the delays would be from .5->5 sec
« Last Edit: May 24, 2012, 04:44:09 pm by stevon8ter »
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Few simple questions
« Reply #3 on: May 24, 2012, 05:17:28 pm »
The first line adds delimiters so Line 5 will work. Line 2-4 waits for a key F1-F5 to be pressed. (Why?) Line 5 concatenates three substrings: the one before the character to be changed, one being the new character, and the one after, and then clips it to the appropriate range.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Few simple questions
« Reply #4 on: May 24, 2012, 05:22:44 pm »
Ok, thanks, but i decided to make it with lists, it's much easyer for what i'm doing, and the rand(#) works perfect
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Few simple questions
« Reply #5 on: May 25, 2012, 05:34:54 pm »
Ok, i'm making this my official help ask topic, i'll ask here questions for basic

Ok, i know there are much posts about this one but i just don't feel like reading them all

What's the best way to make sprites? And what's the best movement methode?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

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: Few simple questions
« Reply #6 on: May 25, 2012, 05:39:19 pm »
Making sprites will only work good with some library, for example xlib, and with moving, just make that the sprite possition depends on X and Y.

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

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Few simple questions
« Reply #7 on: May 25, 2012, 05:40:41 pm »
Ok, so of i'dd have xlib, how would it work?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

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: Few simple questions
« Reply #8 on: May 25, 2012, 06:22:06 pm »
you'd have to have all your sprites in pics, then you call it with real(), sprite is real(1, then you give x and y possition on the screen, e.g. real(1,X,Y then you need width and height, width is in bytes, so you get now real(1,X,Y,1,8 now you need the pic number and the coordinates where the sprite is saved there, so if you have it now in pix 1 and the sprite is at 0,0 you have this: real(1,X,Y,1,8,1,0,0 Now you need the sprite logic, and then if you want to flip it and then if you want to update the LCD, so for displaying it is now real(1,X,Y,1,8,1,0,0,0,0,1
To read more stuff about xLib: http://www.ticalc.org/cgi-bin/zipview?83plus/asm/libs/xlib.zip;ReadMe.txt

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

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Few simple questions
« Reply #9 on: May 25, 2012, 06:25:09 pm »
Ok thanks, but what is the sprite logic?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

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: Few simple questions
« Reply #10 on: May 25, 2012, 06:28:18 pm »
It is how the sprite is copied to the screen.
0 is overwrite, that means that all pixels that are white in the sprite will be white on the screen and all black ones will be black.
1 is and, that means that all pixels that are on the sprite black AND on the screen black will be black
2 is or, that means that all pixels that are black in the sprite will be black on the screen, but not with white pixels
3 is xor, it is like or, just that if the pixels are black in the sprite AND the screen they will end up white, so it inverts all the black places in the sprite.

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

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Few simple questions
« Reply #11 on: May 25, 2012, 06:31:45 pm »
Ah ok, thx, euhm, i had an other question but i forgot

Allready know it again

The users should also need to have xlib and the pic?
« Last Edit: May 25, 2012, 06:34:23 pm by stevon8ter »
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

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: Few simple questions
« Reply #12 on: May 25, 2012, 06:32:27 pm »
Haha xD
Just ask it if you remember it.
Another good thing with xLib is that you can store up to 255 pics! :D

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

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Few simple questions
« Reply #13 on: May 26, 2012, 06:44:38 am »
255 full 62*94 pics? Wow, amazing

And the user also needs the pic and xlib...
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

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: Few simple questions
« Reply #14 on: May 26, 2012, 08:42:09 am »
Nope, full pics are 64*96 pixels :P
And you could make that when you start the program it creates the pics what the user doesn't see (by just using the backup buffer) and by exiting delete them so that the user has more RAM.
And yes, they'd need xLib (or DoorsCS which also has xLib included and is A LOT more awesome), but everyone should have DoorsCS anyways xD

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