
-----------------------------------
Atma Weapon
Mon Sep 20, 2004 1:39 am

WhatDotColour/Draw.Dot Trouble
-----------------------------------
For a game that is currently under development, I have written code that will allow me to effectively double the screen size (by user command), by reading each pixel, storing it, then creating a new window twice the size, and spitting them back out. The problem is, there must be an issue with the maximum amount of colours that Turing will recognize, for the second window displays an extremely low colour count. My question then is, why is the 256 colour cap for Turing coming up with WhatDotColour, and what can I do to get around it? 

http://atma.tfogame.com/Turing/Dev/FN/256colourbleh.gif
This is what I'm talking about.

Any help would be greatly appreciated.

-----------------------------------
Tony
Mon Sep 20, 2004 7:25 am


-----------------------------------
Because turing can recognize just 256 colors. For more, you have to use RGB. module

-----------------------------------
Delos
Mon Sep 20, 2004 10:46 am


-----------------------------------
Hehehe, nice try Tony.

Now you see, using the RGB. module is fine and good, but the problem arises in the WhatDotColour part of his question.  WhatDotColour returns a value closeset to the base 256 colours Turing incorporates, so in effect even using RGB. will not work all that well.

The alternative is to store a list of all the RGB. values you need and dynamically create a new colour scale each time you load the game/screen/etc...don't forget the 1024 colour limit Turing imposes!  Yes!  That's right!  You can only have up to 1024 colours (created using RGB.) at any given time...so you'd obviously have to overwrite these time and again to achieve any sort of high quality screens...[sigh]

-----------------------------------
Mazer
Mon Sep 20, 2004 10:54 am


-----------------------------------
Atma: It's nice knowing how to do these things, but in this case (especially with turing's limited colours) I think it would be better just to use Pic to do it. I can't remember the exact commands, but it's something like Pic.Take to make a picture from a rectangular area of the screen specified in the parameters. Then you can use Pic.Scale to double the size.

-----------------------------------
Delos
Mon Sep 20, 2004 2:25 pm


-----------------------------------
Here's your function:

Pic.New (x1, y1, x2, y2) : int

And Mazer is right, Pic.Scale would be a lot faster than a pixel by pixel redrawing...

-----------------------------------
Paul
Mon Sep 20, 2004 4:06 pm


-----------------------------------
or if ur not a perfectionist... keep it the way it is (because that pic looks good to me :P)

-----------------------------------
Dan
Mon Sep 20, 2004 5:14 pm


-----------------------------------
Ya i was going to say this was a realy cool idea. I never thougth about reszing things in turing quite like that. Some of the problmy could be in the way u are reszing things rather then the color as well. When u make things big they lose deatal. There are many difrent methods of rezing things witch try to aviode this as much as posable tho and could help a bit.

-----------------------------------
rizzix
Mon Sep 20, 2004 5:32 pm


-----------------------------------
about the colour problem.. i know a way to get around it.. sigh but i need to look into my "newer" imglib.. and thats a heck of a problem at the moment.. cuz i'm not even close to my pc (yea right like ur gonna belive that. well just in case, try this excuse: i'm lazy).. so you'll have to wait a while, i'll show it to u.

-----------------------------------
Atma Weapon
Tue Sep 21, 2004 2:50 pm


-----------------------------------
Atma: It's nice knowing how to do these things, but in this case (especially with turing's limited colours) I think it would be better just to use Pic to do it. I can't remember the exact commands, but it's something like Pic.Take to make a picture from a rectangular area of the screen specified in the parameters. Then you can use Pic.Scale to double the size.

Here's your function:

Pic.New (x1, y1, x2, y2) : int

And Mazer is right, Pic.Scale would be a lot faster than a pixel by pixel redrawing...

*laughs* If I had known it was that easy, I would have implemented that particular command in the first place. Thanks, the both of you.

Here is what it looks like now:

http://atma.tfogame.com/Turing/Dev/FN/doublescreenyay.gif

Thank you to everyone for their prompt attention.
