Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - PJBonoVox

#1
Quote from: Ruidesco on 2011-Dec-24
State SMOOTHSHADING FALSE before doing anything graphical, or just after your SHOWSCREEN since both SHOWSCREEN and XMAKE_2D reset it to TRUE.

I need SMOOTHSHADING for these particular sprites. Are you asking me to test it? It's certainly not a permanent solution.
#2
Quote from: MrTAToad on 2011-Dec-24
You could also try settransparency before grabbing the graphic - you usually needed to use it, but I can't remember when...

That failed too, but I've found a way round it.

Either way, if you have to use SETTRANSPARENCY then it's a bug. The manual states that default transparent for both LOADSPRITE and GRABSPRITE is RGB(255,0,128).
#3
Quote from: MrTAToad on 2011-Dec-24
Might need to use SETTRANSPARENCY just before pasting back/

Thanks for the suggestion. I tried that and no change.

I found a much easier way to do it, which was to set the viewport to the drawing area, draw the sprite and then return it to it's original size.

But this is still an issue I think. Should I log it as bug report Gernot?
#4
Hi all,

I'm using GRABSPRITE in my program to do clipping of sprites that are behind hills and suchlike. I draw the sprite off the edge of the screen onto an RGB(255,0,128) rectangle, grab back the part I need and then draw it back into the game.

The problem is the transparency for these sprites isn't working. It's drawing back onto the screen with the RGB(255,0,128) pixels included.

Any ideas why this would be? The sprites that are drawn directly to the screen respect the transparent colour with no issues.

[ screenshot attached ]

[attachment deleted by admin]
#5
Good point, well made. I think I'm going to have to just create a shedload of samples, one for each engine note :(
#6
Hi all,

I'm working on a racing game (old style), and want to use a single sample for the engine sound and just play it at different samplerates depending on the speed of the engine. Is there anyway I could do this?

I realise GLBasic doesn't have this functionality built in but I wonder if anyone could assist me with some kind of inline C++ hack or something to make it happen? Just to clarify, I'm not looking for a 'pitch-up' that keeps the length the same, I just need to play it at a different rate.

Any help much appreciated, this is pretty critical to my project :)

Thanks!
#7
Quote from: MrTAToad on 2011-Nov-17
Sure its not on SHOWSCREEN ?

Positive. Unless I use SMOOTHSHADING = FALSE after each call to the VIEWPORT command, subsequent scaling is done with anti-aliasing on.
#8
That seems to work, thanks!

Any idea why the 'VIEWPORT' command sets this back to 'TRUE' again each time it's called? This behaviour isn't documented in the manual and I can't see any reason why it would need to do this.
#9
Hi there,

I'm currently working on a game that uses the 320 x 240 resolution as it's base. I want to be able to grab the 320 x 240 screen as a sprite and resize it to a factor of 2, 3 or 4 to cater for larger resolutions.

Only problem is that GLBasic seems to add some anti-aliasing or blurriness to the sprite once it's resized and when I stretch to an integer factor I just want a straight pixel resize so as not to spoil the integrity of the pixelart :)

Is this possible? Any help much appreciated.