Author Topic: Question regarding EGSL w/ Haiku R1A4.1...  (Read 6221 times)

Luposian

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Question regarding EGSL w/ Haiku R1A4.1...
« on: 31. May 2013, 21:03:52 »
I am playing Brickmaster and Astrorocks on Haiku R1A4.1 (latest official Alpha release).  There are pink squares behind the ship and asteroids, in Astrorocks. and the brick area of Brickmaster is a pink rectangle behind the bricks.  Any idea what is causing this?

If I were to hazard a guess, based on my limited understanding of graphics, I'd say the area around these objects is supposed to be invisible (like a green-screen in movies), but is being misinterpreted, and therefore showing up.  But as to why pink?  I have no clue.

Were these games written to work in Alpha 4, but the .1 revision changed some graphic aspects?  Hoping someone has some answers.

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • Home of EGSL
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #1 on: 31. May 2013, 21:30:54 »
Yes, that's always the issue with Haiku. I think Brickmaster is source code only, so try to change the very first scirpt line from
Code: [Select]
screen (800,600,0 ...to
Code: [Select]
screen (800,600,32, ...If this doesn't work try to change the 32 to 24. I can't remember the correct value right now and haven't a Haiku installation nearby. (But it also depends on your desktop resolution).
Best regards,
Cybermonkey

Luposian

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #2 on: 31. May 2013, 21:40:31 »
Yes, that's always the issue with Haiku. I think Brickmaster is source code only, so try to change the very first scirpt line from
Code: [Select]
screen (800,600,0 ...to
Code: [Select]
screen (800,600,32, ...If this doesn't work try to change the 32 to 24. I can't remember the correct value right now and haven't a Haiku installation nearby. (But it also depends on your desktop resolution).

Is there source code for Astrorocks?  If not, there is no way to "fix" it.  I downloaded the binary of Brickmaster, off of Haikuware, but I know I can get the source code for Brickmaster here.

Thanks for the tip.  I will try it out, provided EGSL works as expected, in A4.1.  I know it no longer works in the most recent Haiku nightlies of gcc2hybrid.  :'(

Luposian

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #3 on: 31. May 2013, 22:43:17 »
Ok, this is interesting... upon running one of the sample programs in EGSL ("AnimationTest"), everything looks/moves fine, EXCEPT the mouse pointer!  The mouse pointer has a pink square behind it!  I changed the last number on the line you told me to change, from 0 to 32, and then to 24, all with no difference!  The only thing I could otherwise look into, is the mouse pointer .png file, but I can't figure out where that is!  Where is /data/bluepointer.png?  This is strange... so very strange.

Hey, wait a second... upon looking at the bricks.png file in the source code for Brickmaster... the background is pink!  This is the actual color in the .png file!  Is this a mistranslation of the .png file by Haiku R1A4.1 or was this the intended "background" that was supposed to be rendered invisible?  I know .png is supposed to support an "alpha channel" (or something like that, as I recall)... is that pink area supposed to be that?  Something weird is going on.

"Curiouser and curiouser"... as Alice would say.

Luposian

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #4 on: 01. June 2013, 00:16:23 »
Ok, I just zipped and sent the entire Brickmaster /data folder to myself and viewed the .png files with Windows 8's Paint.  The selected area around the images are all PINK!  So, it definitely isn't a .png mistranslation or something.  But, then, what is causing the game to display this "extra" information that, obviously, shouldn't be shown?  I'm going to look at Astrorocks for Windows and see what it's data images look like... if THEY are pink, then I know some code is not working in Haiku.

Just downloaded it (Windows version of Astrorocks) and the sections behind the rock and ship .png ARE pink!  But the game plays perfectly, with no pink (and vastly faster, too, but I'm running Haiku R1A4.1 on a Pentium 4 Celeron (single core)).  So... now we have to figure out what is causing the difference... is the source code identical or is the source code for the Windows version different, because the images are the same.

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • Home of EGSL
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #5 on: 01. June 2013, 09:10:42 »
The pink is called a colourkey. In EGSL you can use any colour as this. So normally it doesn't matter if it's pink, blue or black or anything else. A colour set with colourkey() should be transparent. I'll look at home into the Haiku version. I only had that issue using a wrong colour depth.
Oh, and please, no double posts for the same question ...
Best regards,
Cybermonkey

lelldorin

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
    • BeSly - Knowledge base
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #6 on: 01. June 2013, 12:20:09 »
Brickmaster is running on Haiku alpha 3 correctly.

the pink color is good, because you need to use a color for transparency that are not used in any other way into the game, because you can get something more to be tranparency as you wish.

So use a color that are not used in any other place is the correct color :-)... yes and it is like the blueblox (green whatever) into the movie-world.

I will try on Haiku alpha 4 too, i know that i have this problem with the "pick the stick" example of cvirus too.

Greetings Lelldorin

lelldorin

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
    • BeSly - Knowledge base
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #7 on: 01. June 2013, 12:41:50 »
Hmmm, this is interesting, i have tried Brickmaster and some other Examples on Haiku Alpha 4.1 and now they are running without any graphic failure.

And now tried the binaries from Haikuware: Brickmaster went fine, but Astrorocks has some problems, because then you move the spaceship the sound is broken and the transparency is sometimes not in function (pink screen).

@Luposian: Do you use the Alpha 4 or the Alpha 4.1 of Haiku? it can be a problem with the png librarie of Haiku.
« Last Edit: 01. June 2013, 12:47:45 by lelldorin »

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • Home of EGSL
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #8 on: 01. June 2013, 16:48:56 »
With my installations of Haiku I can not duplicate the error. Look at my attached screenshots, everything works fine.
« Last Edit: 01. June 2013, 16:51:54 by Cybermonkey »
Best regards,
Cybermonkey

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • Home of EGSL
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #9 on: 01. June 2013, 16:57:37 »
Now try the following code and post a screenshot, please:
Code: [Select]
screen (640,480,32,"Colorkeytest on Haiku")
cls()
colourkey (102,49,113)
test1 = createimage (64,64)
startimagedraw (test1)
colour (102,49,113)
fillbox (0,0,64,64)
colour (255,255,0)
fillcircle (32,32,20)
stopimagedraw()
colourkey (202,49,113)
test2 = createimage (64,64)
startimagedraw (test2)
colour (202,49,113)
fillbox (0,0,64,64)
colour (255,255,0)
fillcircle (32,32,20)
stopimagedraw()

putimage (200,200,test1)
putimage (100,100,test2)
sync()
key=inkey()
closewindow()
(Actually you should only see two yellow circles on a black background ...)
Best regards,
Cybermonkey

Luposian

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #10 on: 01. June 2013, 17:17:12 »
Brickmaster is running on Haiku alpha 3 correctly.

the pink color is good, because you need to use a color for transparency that are not used in any other way into the game, because you can get something more to be tranparency as you wish.

So use a color that are not used in any other place is the correct color :-)... yes and it is like the blueblox (green whatever) into the movie-world.

I will try on Haiku alpha 4 too, i know that i have this problem with the "pick the stick" example of cvirus too.

Greetings Lelldorin

Note I said I am running Haiku R1A4.1, not R1A3.  A lot can change 1.1 versions later.  But thanks for the clarification on the pink in the graphics.  Something isn't hiding it correctly...

Luposian

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #11 on: 01. June 2013, 17:20:32 »
With my installations of Haiku I can not duplicate the error. Look at my attached screenshots, everything works fine.

Are you running R1A4.1 (the latest official Alpha release)?  This is the exact version I am running.

Luposian

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #12 on: 01. June 2013, 18:41:32 »
Now try the following code and post a screenshot, please:
Code: [Select]
screen (640,480,32,"Colorkeytest on Haiku")
cls()
colourkey (102,49,113)
test1 = createimage (64,64)
startimagedraw (test1)
colour (102,49,113)
fillbox (0,0,64,64)
colour (255,255,0)
fillcircle (32,32,20)
stopimagedraw()
colourkey (202,49,113)
test2 = createimage (64,64)
startimagedraw (test2)
colour (202,49,113)
fillbox (0,0,64,64)
colour (255,255,0)
fillcircle (32,32,20)
stopimagedraw()

putimage (200,200,test1)
putimage (100,100,test2)
sync()
key=inkey()
closewindow()
(Actually you should only see two yellow circles on a black background ...)

It worked.  Don't have time right now to post an image, but I tested this code and it worked.  Took out the colorkey lines and the squares show up.  Now, the question is... why isn't it working in Brickmaster or Astrorocks?  Have you examined every line of code?  Is the Alpha (number) set correctly?  Is the colorkey (x, y, z) set correctly?  There must be a logical explanation.

The only difference is that you're dealing with graphic primitives and not graphic images.  Try using one of the graphic images (with pink) from Brickmaster and see what happens.

Cybermonkey

  • Administrator
  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • Home of EGSL
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #13 on: 01. June 2013, 18:50:25 »
Well, it happened what I posted before: no pink. BTW, I am using the latest release of Haiku Alpha 4.1. Have you donwloaded the games from egsl site or haikuware? If the later on, please try the version from here: http://www.egsl.retrogamecoding.org//pages/showcase.php
Best regards,
Cybermonkey

lelldorin

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
    • BeSly - Knowledge base
Re: Question regarding EGSL w/ Haiku R1A4.1...
« Reply #14 on: 02. June 2013, 00:03:26 »
Here a screenshot of the astrorocks version from EGSl Website:

Haiku alpha 3

« Last Edit: 02. June 2013, 00:05:53 by lelldorin »