Page 1 of 1

Saving Canvas Actors/Loading Canvas actors

PostPosted: Mon Sep 26, 2005 8:31 pm
by willg101
I know asked this before, but I really need this feature for my game.
Maybe we could make a new variable type, "Canvas Variable",
or maybe we could save kind-of like a .dat file is saved, or maybe just save it straight to a .bmp?

Is this going to be too hard, Makslane?

TIA!

PostPosted: Mon Sep 26, 2005 9:48 pm
by Fuzzy
The easiest formats to write to disk are PAM/PGM formats, and for a more mainline, and smaller file, TGA(uncompressed). Tgas can be loaded by GE, so thats the way to go.

If you are not making too large of canvases, just make a array and write to it at the same time as writing to the canvas.

PostPosted: Tue Sep 27, 2005 8:37 pm
by willg101
How do you do that?

Thanks for your time!

PostPosted: Wed Sep 28, 2005 10:27 pm
by willg101
Also though, how would you load the picture during game play?

PostPosted: Sat Oct 01, 2005 2:05 am
by willg101
Any ideas?

PostPosted: Sat Oct 01, 2005 10:47 pm
by Fuzzy
Sorry. I have been away. As it currently stands, you cannot put a path into an actor that points to a graphics file. What you need to do is design a loading function that reads a tga and draws it out onto a canvas actor.

That will allow the player to create his own sprites. likewise, you can write a function that creates a graphics file, but as it stands, there is no readpixel() function in GE. Any graphics drawn within GE should also store its data in an array. From this array you would write to disk.

If this is beyond you, and it shouldnt be, as it is not hard, let me know.

PostPosted: Sun Oct 02, 2005 1:13 am
by willg101
Sorry, It's quite beyond me! If you are going to make a demo, do it when you have free time-I don't want a newbie like myself to shew up your time!

TIA

PostPosted: Thu Oct 06, 2005 11:03 pm
by Game A Gogo
willg101 wrote:don't want a newbie like myself

your not a newbie :wink:

PostPosted: Fri Oct 07, 2005 12:52 am
by willg101
Hahaha Thanks!! 8)

I am quite a newbie, though. I only know what I've seen done before, that's why I usually ask for examples. I'd definately say that you are farther along than me :!:

PostPosted: Fri Oct 07, 2005 11:24 pm
by Game A Gogo
Not in script :wink:

lol :lol:

PostPosted: Sat Oct 08, 2005 3:05 am
by willg101
LOL!

I do believe you were the one who knew it was if(myvar==number), not if(myvar=number)!!!