The standard byte in java has a range from -128..127. Can this cause any issues and is there anyway to deal with this?
In memory 255 looks the same as -1, and 128 looks like -128. It all depends on how the value is interpreted. As long as you are aware of this you can deal with any issues that might arise.
Also I would like to know how an Image deals with RGB values for every pixel. maybe they are short or int values but that takes up too much space, (of course we can always use colour pallettes) so if we want to use a byte for each value and the max range is only 128 we will have some problems... what is the actual implementation?
This is device specific. It depends on the actual hardware and the decisions the implementors of the KVM took. The most common approach is having RGB values stored in the smallest amount of memory that can handle all the available colors. The maximum value of 128 is a non-issue since this stuff is implemented natively and not in Java.
unless of course we convert the negative numbers to their positive counterparts using some bit operations...
byte b = (byte)255;
System.out.println("b=" + b);
int i = (int)b & 0xff;
System.out.println("i=" + i);
any thoughts / suggestions / solutions are most welcome. Also is this actually a problem you may have come accross in developing your games or is it really not a cause for concern?
If you understand what's going on behind the scenes (ie, in the memory), then no issue that this arises will become a showstopper. I hope this response helps you achieve that understanding.