Help drawing in 16 bit ... PLEASE HELP

Started by Chicky, Thu 05/06/2003 19:55:50

Previous topic - Next topic

Chicky

Hi everyone
On my game when i put a background in, it looks fine on preview background  but when it shows in the game some of the lines look really thick ???

P.S   i am running my game on 320x240 resaloution in high-colour.

thanks in advance ;D

Mr Jake

if you added shaded layer then that mucks it up.. as well as saving in Jpeg can :)

scotch

The whole image is scaled up at low resolution so that's why the lines, and everything else is bigger.. unless you mean something else.

Mr Jake

try letter box res. (Gen settings)

Chicky

Hi every one,
cheers for the replys but...

overnight i have been working on my LEC GUI and now ive finished it, yey!     but when i try to test it it says 'runtime error: function still missing }' or something like that.

heres my global script, any one know whats wrong?

function game_start() {
 // called when the game starts, before the first room is loaded
}

function repeatedly_execute() {
 // put anything you want to happen every game cycle here
}

function on_key_press(int keycode) {
 // called when a key is pressed. keycode holds the key's ASCII code
 if (IsGamePaused() == 1) keycode=0;  // game paused, so don't react to keypresses
 if (keycode==17)  QuitGame(1);   // Ctrl-Q
 if (keycode==363) SaveGameDialog();   // F5
 if (keycode==365) RestoreGameDialog();  // F7
 if (keycode==367) RestartGame();  // F9
 if (keycode==434) SaveScreenShot("scrnshot.bmp");  // F12
 if (keycode==9)   InventoryScreen();  // Tab, show inventory
 if (keycode==19)  Debug(0,0);  // Ctrl-S, give all inventory
 if (keycode==22)  Debug(1,0);  // Ctrl-V, version
 if (keycode==1)   Debug(2,0);  // Ctrl-A, show walkable areas
 if (keycode==24)  Debug(3,0);  // Ctrl-X, teleport to room
}

function on_mouse_click(int button) {
 // called when a mouse button is clicked. button is either LEFT or RIGHT
 if (IsGamePaused() == 1) {
   // Game is paused, so do nothing (ie. don't allow mouse click)
 }
 else if (button==LEFT) {
   ProcessClick(mouse.x, mouse.y, GetCursorMode() );
 }
 else {   // right-click, so cycle cursor
   SetNextCursorMode();
 }
}

function interface_click(int interface, int button) {
if (interface == 2) { //The LEC interface

   
   if (button == 5) {   // push
     SetCursorMode(8);
     SetGlobalInt(80,2);
     }
   if (button == 7) {   // eat
     SetCursorMode(8);
     SetGlobalInt(80,4);
     }
   if (button == 4) {   // pull
     SetCursorMode(8);
     SetGlobalInt(80,5);
     }
   if (button == 6) {   // pick up
     SetCursorMode(8);
     SetGlobalInt(80,6);
     }
   if (button == 0) {   // use
     SetCursorMode(2);
     SetGlobalInt(80,7);
     }
   if (button == 1) {   // look
     SetCursorMode(1);
     SetGlobalInt(80,8);
     }
   if (button == 2) {   // talk
     SetCursorMode(3);
     SetGlobalInt(80,9);
     }
    if ((button == 9) & (game.top_inv_item < game.num_inv_items - 8))
     game.top_inv_item = game.top_inv_item + 4;
   if ((button == 10) & (game.top_inv_item > 0))
     game.top_inv_item = game.top_inv_item - 4;
}


After this is sorted i will try the letterbox method

thanks

SSH

You're missing the "}" that ends your last function: there is one closing the if interface but noit the function...
12

Timosity

#6
Yeah, Your missing the end "}"

but also youmight need to fix this bit so it looks like this:

if ((button == 9) & (game.top_inv_item < game.num_inv_items - 8 )) {
game.top_inv_item = game.top_inv_item + 4;
}
if ((button == 10) & (game.top_inv_item > 0)) {
game.top_inv_item = game.top_inv_item - 4;
}
}
}


just remember every time you open "{" you also need to close it with "}"

The extra ones might not be necessary but sometimes in some script that I've done it doesn't work properly if you don't add them in even if it saves with no errors

Chicky


SSH

I'm not sure that that's quite right, either Timosity, becoz you're including two ifs in the braces.

In general it's a good idea to increase indentation on every "{" so that you can see if you've closed all of them. Also, some external editors will show you matching bracket pairs again so you can see if you've matched them.

Is this in the AGS editor wish-list?
12

Timosity

I edited my post after you checked so just try it with what superscottishhero, and if you have any other problems look at my last post

Chicky


;D ive sorted the script

but the images still look lame :'(

you see the images look fine on full screen preview, but when i test the game some of the lines get thicker?

i dont know whats wrong because its the kinda diagonal lines, some bits jost get thicker on test game.

ive been working with paint for a long time now (used to do animation shop) and ive never had this problem before.

is it just AGS that does it or am i doin summit wrong?

Also it happens to the characters too >:(

ayn help please

SSH

Quote from: oversizedchicken on Fri 06/06/2003 12:08:21
you see the images look fine on full screen preview, but when i test the game some of the lines get thicker?

Remember that AGS uses 16-bit colour and your paint program is maybe 24-bit colour. So your anti-aliased lines are maybe getting quantised into less colours, so the lines end up looking thicker? Try reducing the colour depth in your editor and see if that helps, or at least gives you the same thickness as you get in AGS.
12

Chicky

I tried what you said s.s.h but obviosly it changes all the colours of my pic and i really cant be bothered to re draw all the backgrounds :(

Ahh well maybe ill just change character's colours :-[

i think im guna cry :-[          :'(
is there any other alternative :-\ ..... any one

please

Chicky

ARRRRRRRG!!!!!!!!! >:(

i tried re-drawing my background in 526 or whatever colour it is and it looks PANTS!
i also tried redrawing it in 16 bit but its just as hard :(
its impossible to get any kind of varietion in colour.

Someone PLEASE help  :'( :'( :'(

SSH

What editor are you using? Photoshop and PSP both have functions to take a 24-bit colour pic and convert it to 16-bit (e.g. 32768 colours). They might do a better job than AGS does.  

Can you post your pictures and a screen  shot from your game? Don't use a lossy format like JPG, btw!
12

Chicky

cheers for the reply
ill post them give me 5

Chicky

Sorry i cant get a bmp on the site ahh wel if you look at the shooting range there is a kind of grid of grey lines, these are what some of them get bigger?

http://www.freewebs.com/oversizedchicken/page1.htm

i tried what you said s.s.h but it still happened. the strange thing is that when i took a print screen the pic the pasted pic was normal ???

this must mean that it is a problem with AGS?

ahh i dont know, any help please
;D

scotch

By the way, if you want small filesize images but at the original quality save them as png.  It doesn't produce artifacts like jpg.

Are you sure you're not just confusing the scaling up with making your image different?  Antialiased lines automatically look thicker in low res anyway.  If the screen from AGS is the same then there's probably no problem.. are you saying this is a different effect to when you zoom in to about 300% in your paint program?

Chicky

yeh its totally different , in pain if you zoom in like x 300 all the lines get bigger x3 but when your pic is zoomed in test game the lines enlarge but some more than others.

trust me i'm not STUPID i know what im on about.

It tends to be only the one pixle lines that are close together that go REALLY this, its strange. NE way ive decided to redo my backs so that they are simple with not too much detail, like Permanant Daylight (the best AGS game ever).

I have also noticed this in other games such as purity ots and even PD?

so i thought it was summit to do with my screen (im working on a laptop) but im not sure.

ahh well it ooks like im going to have to change my style. :(

Proskrito

#19
Can you test it in another computer?? because many people (like me) works also in 16-bit 320x240, and i never heard or experienced anything similar. So, i dont think it would be a problem of neither AGS nor your style. (well, im sure about it) Before redoing all the artwork, i would try it in another comp.
I´ve noticed that the problem you said is also in the walking animation that is in your webpage, and, if you were working on 320x240, a line thicker than other would be twice thicker at least, and you said that they were just a bit differen. So... having these 2 things in mind, i think of 2 possible causes: 1: your comp/display/drivers dont manage 320x240 well; or 2: you are working in 640x400 and the program you draw things with make that effect to the pics, as your walking animation...
EDIT:
QuoteI have also noticed this in other games such as purity ots and even PD?
Oh, then i would say it is the possible cause #1 ;)

SMF spam blocked by CleanTalk