Can Care v1.5

Community Forums/Showcase/Can Care v1.5

Zster(Posted 2003) [#1]
Hi All

The fifth version of my spectrum remake. lots of little enhancements like the ability to shoot wall guns and crush floor guns. A B+ and B2D version included (I'de like to make it just one but B+ has maskimage bugs on some graphics cards hint hint)

Feedback welecome

Get it at

http://blitz.idigicon.com/Project_Detail.asp?ProjectName=Can_Care

(I hope it's still alright to link there)


Beaker(Posted 2003) [#2]
Are you sure they are MaskImage bugs and not just differences that you need to work with? I've worked a lot with MaskImage and I've not found any bugs.


Zster(Posted 2003) [#3]
Hi MasterBeaker

Nope it's something to do with B+ as even a simple drawimage example works fine on my 16mb ATI(W2000) and 32mb Geforce(Win98) but fails to work on my 8mb Ati(W95). The same example will work on all three computers in B2D. It even works with B+ 1.11 and earlier so it was something intoduced in B1.35.

By basic I mean

Graphics 320,240,32,1
image1=loadimage("myimage.bmp")
mask image1,255,0,255
drawimage image1,0,0
flip
waitkey()

Example holds true for all resolutions and bit depths and for all image memory flags.

Thanks


Beaker(Posted 2003) [#4]
Is Mark aware of this? Can you post an image to test with that code?


Zster(Posted 2003) [#5]
I have posted something similar on the Blitsplus bug forum but here we go this will generate the image internally. On my 32mb and 16mb card this shows a white square moving across the screen. On my 8mb I get a white square on a pink square. I also have to add the RECT line before the flip or I'll get a blank screen (see post http://www.blitzbasic.com/bbs/posts.php?topic=23802)

[code/]
Graphics 640,480,32,2
image1=CreateImage(100,100)
SetBuffer ImageBuffer(image1)
ClsColor 255,0,255
Cls
Color 255,255,255
Rect 25,25,50,50,1
SetBuffer BackBuffer()

MaskImage image1,255,0,255

state=1
x=100
y=100

Repeat

Cls
x=x+state
If x=541
x=539
state=-1
End If
If x=-1
x=1
state=1
EndIf

DrawImage image1,x,y
rect 0,0,0,1,1
Flip

Until KeyHit(1)
[code/]


Yappy(Posted 2003) [#6]
try getting the true mask color before using the maskimage command..ie

Function TrueCol(r,g,b)
img=Createimage(1,1)
Setbuffer Imagebuffer(img)
Color r,g,b
Rect 0,0,1,1
ret=Readpixel(0,0,Imagebuffer(img)) And $ffffff
FreeImage img

Return ret

End Function

Mask_col=TrueCol(255,0,255)

Maskimage image1,(Mask_col shr 16) and $ff, (Mask_col shr 8) and $ff, Mask_col and $ff

might work - might not ;)


Zster(Posted 2003) [#7]
Sorry didn't work. Besides why would setting a mask colour in true color suddenly need changing in 1.35 when it worked in 1.11 and B2D? I did notice it worked in 16 bit mode (thought it didn't) but I still need the rect 0,0,0,1,1 command or I get nothing but a blank screen and it works just fine with OpenGL and native draw. I think it's a DX bug thats crept in and may be specific to W95 and DX7.

Thanks for the responses though:)

Now has anyone tried my game?


keyboard(Posted 2003) [#8]
hey Zster

got an error when activating the B+ exe and chose the option to use "Bliz native drivers"


error message: "createDIBsection failed:11"

left all the data unpacked at that point too.

worked fine in other modes, and was fun.


mrpectate(Posted 2014) [#9]
I was perusing remakes on the web and recalled this one. It really was fun, especially with that alien creep heckling me along as I ran out of time. I never got to the end. I was just wondering if there was still a place to grab a copy of it. If not, that's OK and many thanks to Zster for the fun I had.