Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / That can't be happening!!! Where are the corners?

Author
Message
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 4th Aug 2003 01:03
Hi everybody... I couldn't be so upset with DBPro... Some days ago I noticed that every image I try to load has its corners cut, even if I put the ,1 at the end of the command.
It seems that the last vertical line of pixels disappear and the image goes 1 pixel foward.
I tried to use make image from memblock, but its useless...
How am I going to make a game without pixel perfect images? Does anybody know a way of making a 16x16 image without this problem that doesn't involve getting a bigger image? Thank you.
998 hit combo 520% damage
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th Aug 2003 01:42 Edited at: 4th Aug 2003 01:43
Works for me, try following code



The programmer formerly known as sonic
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 4th Aug 2003 03:41
spooky your making a 16 pixel box and grabbing a 17 pixel image?
CTP
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th Aug 2003 04:11
Eh, no, get image command is weird in that you specify an extra pixel on the 'right' and 'bottom' parameters, so in fact it IS only grabbing a 16X16 image.

Same is if you do BOX 0,0,5,5 (draws a box 5 * 5 pixels from 0,0 to 4,4).

Most of the 2d commands treat the 'bottom' and 'right' parameters as a 'fence' and draw UPTO the fence.

I personally think it's stupid. If I want a line to go from 10,10 to 20,20 I want to say LINE 10,10,20,20. Instead you have to say LINE 10,10,21,21

The programmer formerly known as sonic
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 4th Aug 2003 04:44 Edited at: 4th Aug 2003 04:45
ok spooky, after slamming my head on the desk a few times it's clearer to me now.



MK1, I loaded a 16,16 image made in paint using load image filename, image number, 1 and it's doesn't cut any thing off of it for me. How about posting some code?



CTP
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th Aug 2003 13:54
MK1: A possibilty is that you are running in the wrong mode. If you have your project 'settings' set to full screen windowed mode and thae window size set to, say, 640X480 but your actual desktop is set to 1024*768, it will stretch your little image and blur the edges.

Either set windows size to same as desktop or even better, use full screen exclusive mode.

The programmer formerly known as sonic
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 10th Aug 2003 03:22
I'm not using windowed mode, I'm sure... If you don't believe me give a look at This code. For me the first white pixels of the image will be duplicated. All the other pixels will be 1x1 in size but these are 2x1! No matter what I do, nothing works. Changing the size of the image doesn't make any difference:

998 hit combo 520% damage
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 10th Aug 2003 03:25
The code didn't appear... let's try again:

998 hit combo 520% damage
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 10th Aug 2003 03:26
Hey what's happening?
I'll put it here:

rem look, i'll set to full screen mode
set display mode 320,240,16
set window off

hide mouse
sync on

ink rgb(255,255,255),0

rem that makes a 16x16 pixels box
for gx=0 to 15 step 2
for gy=0 to 15 step 2
dot gx,gy
next gy
next gx
for gx=1 to 15 step 2
for gy=1 to 15 step 2
dot gx,gy
next gy
next gx

get image 1,0,0,16,16

do

cls 0

sprite 1,mousex(),mousey(),1

sync
loop

998 hit combo 520% damage
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 10th Aug 2003 06:33 Edited at: 10th Aug 2003 06:39
this is the image I get when running your code/ I see nothing wrong here? Is this not what your getting? a 16x16 image checkered white/black?

the code you post in the code section show up in the source.

CTP


MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 10th Aug 2003 06:53
NO! That's not what I get!!! It may have got something to do with the trial version (I can't install patch 4). I don't understand! Why do I get strange images every time I load a image? Do you know why it happens only for me? ... that's not fair!

998 hit combo 520% damage
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 10th Aug 2003 07:42
...By the way this is how I see the image (I'll put the code because I don't know how to put a image here)

998 hit combo 520% damage
Jonny_S
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 10th Aug 2003 16:15
You've got a trial version, its not the latest patch its probably a DB bug buy DBpro and get the latest patch

The man with no sig
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 10th Aug 2003 16:35
Well, I can tell you this, The trial version sucks, it patch at version 2 ,I belive, and I can remember when I had it examples people would give me wouldn't work, and to just top it off when I got the full version most of the stuff I wrote using the trial version didn't work.

but for not a simple fix for what you want would be to put the image I made or make one of your own with paint, in the directory of your program and use LOAD IMAGE

CTP
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 11th Aug 2003 03:41
I've already tried, load image doesn't work too. No matter the way I get the image, it seems to be a problem with the images themselves. Anyway, thank you for helping me, at least DBPro is not so buggy as I thought, only trial must have this bug... well, let's buy the full version.

998 hit combo 520% damage

Login to post a reply

Server time is: 2024-04-25 00:47:06
Your offset time is: 2024-04-25 00:47:06