Edit the Canvas Width and Height
 Posted: Wed Aug 19, 2009 4:36 am
Posted: Wed Aug 19, 2009 4:36 amEdit the Width and Height of the canvas like this
			Game Editor discussion board
http://game-editor.com/forum/
 Posted: Wed Aug 19, 2009 4:36 am
Posted: Wed Aug 19, 2009 4:36 am Posted: Wed Aug 19, 2009 10:14 pm
Posted: Wed Aug 19, 2009 10:14 pm 
  Posted: Thu Aug 20, 2009 6:48 am
Posted: Thu Aug 20, 2009 6:48 am Posted: Thu Aug 20, 2009 5:31 pm
Posted: Thu Aug 20, 2009 5:31 pmFuzzy wrote:It is important when designing a game to decide on resource (CPU/RAM) limits for the player. One should not leave things open to unlimited growth like that. Decide on the maximum canvas size you will use, and if you need a smaller area, just use part of it.
You are the programmer. You must have tight control and constraints on your game if you wish to avoid all sorts of nasty trouble. Both for you and the player. That goes for things like player levels and equipment too.
Resizing canvas means resizing arrays, which is both an intensive use of ram and CPU, and can also run into problems of not enough ram, or not enough contiguous ram. It doesnt matter how fast your CPU is, nor how much ram you own. Resizing an array is slow and prone to failure.
To put it simple, resizing arrays is messy and buggy. Real game makers do not do this.
 Posted: Thu Aug 20, 2009 9:42 pm
Posted: Thu Aug 20, 2009 9:42 pm
 Posted: Thu Aug 20, 2009 10:19 pm
Posted: Thu Aug 20, 2009 10:19 pm4erv' wrote:Well, I often do not understang these kind of texts (long, and requiring better english understanding), so i will just ask in a simple way:
If i would make a Paint in GE, is there any way to "fill" the canvas with white color? or show the white sprite sized the same as canvas?
 Posted: Thu Aug 20, 2009 11:45 pm
Posted: Thu Aug 20, 2009 11:45 pmHblade wrote:Fuzzy wrote:It is important when designing a game to decide on resource (CPU/RAM) limits for the player. One should not leave things open to unlimited growth like that. Decide on the maximum canvas size you will use, and if you need a smaller area, just use part of it.
You are the programmer. You must have tight control and constraints on your game if you wish to avoid all sorts of nasty trouble. Both for you and the player. That goes for things like player levels and equipment too.
Resizing canvas means resizing arrays, which is both an intensive use of ram and CPU, and can also run into problems of not enough ram, or not enough contiguous ram. It doesnt matter how fast your CPU is, nor how much ram you own. Resizing an array is slow and prone to failure.
To put it simple, resizing arrays is messy and buggy. Real game makers do not do this.
Hey fuzzy, it dosnt actually resize anything, when using the lineto function, all it does it go the the set area that you placed, meaning, say... widht, the width is actually a canvas variable I created hehe... in other words, yeah the canvas IS the max width and height >.>

 Posted: Fri Aug 21, 2009 7:05 am
Posted: Fri Aug 21, 2009 7:05 am Posted: Fri Aug 21, 2009 8:45 am
Posted: Fri Aug 21, 2009 8:45 amHblade wrote:Yep, if you use this fucntion erase(255, 255, 255, 0);
 Posted: Fri Aug 21, 2009 4:21 pm
Posted: Fri Aug 21, 2009 4:21 pm4erv' wrote:Hblade wrote:Yep, if you use this fucntion erase(255, 255, 255, 0);
But how to fill only the resized square, not the all "Main window" canvas?
 Posted: Fri Aug 21, 2009 9:39 pm
Posted: Fri Aug 21, 2009 9:39 pm
 Posted: Fri Aug 21, 2009 9:56 pm
Posted: Fri Aug 21, 2009 9:56 pm Posted: Fri Aug 21, 2009 10:10 pm
Posted: Fri Aug 21, 2009 10:10 pm 
  Posted: Sat Aug 22, 2009 2:00 am
Posted: Sat Aug 22, 2009 2:00 am
 Posted: Sat Aug 22, 2009 9:15 am
Posted: Sat Aug 22, 2009 9:15 am