Author Topic: Correlation: A New Project Aimed at Ti-Basic Programmers  (Read 61896 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #120 on: December 30, 2010, 03:14:45 am »
Ah ok. Well I was kinda worried what you did was just alternate automatically between two tiles, which would have been a bit hard in BASIC, not to mention the user may want to have the freedom to manually change. 4 frames might be enough, I think. 8 might be good too, if you have scrolling water, although it's not very common in BASIC.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #121 on: December 30, 2010, 10:31:34 am »
Ah ok. Well I was kinda worried what you did was just alternate automatically between two tiles, which would have been a bit hard in BASIC, not to mention the user may want to have the freedom to manually change. 4 frames might be enough, I think. 8 might be good too, if you have scrolling water, although it's not very common in BASIC.

I'm thinking 8 for people who want something such as radar screens, clocks and sensors ;)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #122 on: December 30, 2010, 11:31:24 pm »
Yeah true, that would be nice :D

The only worry I have is that it would take a lot of space O.O (and even waste some if some maps have several tiles that aren't animated like buildings)
« Last Edit: December 30, 2010, 11:32:16 pm by DJ Omnimaga »
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #123 on: December 31, 2010, 12:53:02 am »
Yeah true, that would be nice :D

The only worry I have is that it would take a lot of space O.O (and even waste some if some maps have several tiles that aren't animated like buildings)

Ah, but you only need space for the tiles that are animated. ;D  If you have 50 tiles that are not animated and 2 that are, you can have 1 font 52 tiles big and 7 fonts only 2 tiles big.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #124 on: December 31, 2010, 04:49:03 pm »
Oh but how would that work? How would the tile data and maps look like? ??? How would it detect which tile has to be animated and which one doesn't?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #125 on: December 31, 2010, 04:54:51 pm »
Oh but how would that work? How would the tile data and maps look like? ??? How would it detect which tile has to be animated and which one doesn't?

Let's say that you have two tiles for the characters "A" and "B."  Let's say that "A" displays a tree, and "B" displays water.  You only want the water to move (an animation of 2 frames), not the tree.

So your main font will contain graphical data for both "A" and "B".  Your second font will ONLY contain graphical data for "B."  Correlation will detect this kind of thing automatically.  Does that make sense?

Ln(1,1,"AABBBBAA"  = Tree, Tree, 2-Frame Water, 2-Frame Water, 2-Frame Water, 2-Frame Water, Tree, Tree

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #126 on: December 31, 2010, 06:23:45 pm »
So does separate fonts mean separate files?

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #127 on: December 31, 2010, 06:47:18 pm »
So does separate fonts mean separate files?

Pretty much. You can use different fonts to display different "pictures".  One font might display a tree for the letter "A", and another might display a rock for the letter "A."  You can have up to 8 open for Correlation to draw animated tiles, but you can display text with only one font at a time.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #128 on: December 31, 2010, 07:20:10 pm »
Oh but how would that work? How would the tile data and maps look like? ??? How would it detect which tile has to be animated and which one doesn't?

Let's say that you have two tiles for the characters "A" and "B."  Let's say that "A" displays a tree, and "B" displays water.  You only want the water to move (an animation of 2 frames), not the tree.

So your main font will contain graphical data for both "A" and "B".  Your second font will ONLY contain graphical data for "B."  Correlation will detect this kind of thing automatically.  Does that make sense?

Ln(1,1,"AABBBBAA"  = Tree, Tree, 2-Frame Water, 2-Frame Water, 2-Frame Water, 2-Frame Water, Tree, Tree
But how will it detect it? Will the second string look like "  BBBB  "? Because in that case it wouldn't even save a single byte of space.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #129 on: January 01, 2011, 01:11:39 am »
Oh but how would that work? How would the tile data and maps look like? ??? How would it detect which tile has to be animated and which one doesn't?

Let's say that you have two tiles for the characters "A" and "B."  Let's say that "A" displays a tree, and "B" displays water.  You only want the water to move (an animation of 2 frames), not the tree.

So your main font will contain graphical data for both "A" and "B".  Your second font will ONLY contain graphical data for "B."  Correlation will detect this kind of thing automatically.  Does that make sense?

Ln(1,1,"AABBBBAA"  = Tree, Tree, 2-Frame Water, 2-Frame Water, 2-Frame Water, 2-Frame Water, Tree, Tree
But how will it detect it? Will the second string look like "  BBBB  "? Because in that case it wouldn't even save a single byte of space.

Oh man, I am not doing well ;D

I hope this helps explain: you won't need a second string.  If you turn on animated tiles and select your fonts in the order you want tiles animated, you only need "AABBBBAA."  Correlation will see the "B", and draw a different frame of the "B" tile everytime the string is drawn.  One string.  So if your single string is drawn 10 FPS, you will see ten frames of animation every second.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #130 on: January 01, 2011, 04:25:29 pm »
Oh, I get it. So you define B as a tree in the wind by defining B1 as one frame of the tree, and then B2 as the other frame.  But Correlation doesn't use B1 and B2, it only uses B and handles the change in sprites every time you redraw the string.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #131 on: January 01, 2011, 06:04:14 pm »
Oh, I get it. So you define B as a tree in the wind by defining B1 as one frame of the tree, and then B2 as the other frame.  But Correlation doesn't use B1 and B2, it only uses B and handles the change in sprites every time you redraw the string.

I think you've got it.  Let's say FONT1000.8xp contains characters for the letters "A" and "B", so "B" will contain one frame of the tree in the wind.  "A" is defined as a rock.  FONT2000.8xp contains the OTHER character for the letter "B", the other frame of the tree.  Notice there's no "A" in FONT2000.8xp.

real(FONT10001  means that FONT1000.8xp is your first font for your animations. real(FONT20002 means FONT2000.8xp is your second font.  Like you said, Correlation uses only "B" and automatically handles the changes in sprites.  Since there's no "A" in FONT2000.8xp, the rock won't move a muscle.


I've decided to describe creating animated tiles in its own chapter.  It's certainly a confusing topic, and I know that now  :angel:

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #132 on: January 01, 2011, 06:25:37 pm »
Oh, I get it. So you define B as a tree in the wind by defining B1 as one frame of the tree, and then B2 as the other frame.  But Correlation doesn't use B1 and B2, it only uses B and handles the change in sprites every time you redraw the string.

I think you've got it.  Let's say FONT1000.8xp contains characters for the letters "A" and "B", so "B" will contain one frame of the tree in the wind.  "A" is defined as a rock.  FONT2000.8xp contains the OTHER character for the letter "B", the other frame of the tree.  Notice there's no "A" in FONT2000.8xp.

real(FONT10001  means that FONT1000.8xp is your first font for your animations. real(FONT20002 means FONT2000.8xp is your second font.  Like you said, Correlation uses only "B" and automatically handles the changes in sprites.  Since there's no "A" in FONT2000.8xp, the rock won't move a muscle.


I've decided to describe creating animated tiles in its own chapter.  It's certainly a confusing topic, and I know that now  :angel:
Yeah. One feature request, though, is changing tiles.  If you've got a building that's standing in one scene, but gets blown up or something, you could use the same map (text) but different tiles.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #133 on: January 01, 2011, 06:29:05 pm »
Yeah. One feature request, though, is changing tiles.  If you've got a building that's standing in one scene, but gets blown up or something, you could use the same map (text) but different tiles.

I'll add that!  The only restriction is that you'll need to have both your original tile and the one you want to change in the same font.  Correlation will simply swap their positions so that you don't lose either one.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #134 on: January 01, 2011, 07:56:15 pm »
I see I think, but I would probably understand even better if I knew how the data looked like in both font files.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)