BASIC

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.


Messages - Ozden79

Pages: 1 ... 6 7 [8] 9
106
Moru,

I'm not sure whether this is %100 correct as I use ALPHAMODE to have a translucent look of some of the PNG images I use in the menu, to give a tapped effect and they work fine, with the alphachannel they have. I sense a bit of a bug in here unless someone from the creator team can enlighten this situation.

Özden

107
Another update, magically solved by putting ALPHAMODE -1 just before I draw the level data on each frame. Pretty weird but I think I can live with this for now...

Thanks

Özden

108
Yes, only once at start to load the font data properly. I'm not sure this affects it as I've drawn the anim in splash and menu screens which are after the  SETTRANSPARENCY  call and at those screens, it's drawing fine, only in my ingame screen makes this weird behavior.

109
Ok, one update, this behavior only occurs in my ingame screen. When I draw in Splash and Menu screens, it seems fine. I'm playing with ALPHAMODE to create fade in/out effects till the ingame and I tried to set the ALPHAMODE to 0,1 and -1 when the ingame screen comes, nothing changed?

What could be wrong?

Özden

110
Hello There,

I see a weird behavior in loadanim. I've a 40x40 sprite sheet which contains a few blocks and it's a png file. When I draw each block from this anim, I see the alpha channel is completely drawn as white. I've another png sprite sheet and this seems to be drawn fine, though those objects doesn't have any glow effect as these ones. What might be wrong?

The png is created on Photoshop.

Thanks,

Özden

[attachment deleted by admin]

111
Yes,  I use SETTRANSPARENCY already and that's fine until you use an Anti-Aliased Font. In this case, the only fix in here is to be able to have a transparent background.

112
Hmm, this shouldn't be hard to do, I already coded transfering font data to some other devices before, all that needs to be done is not to draw a backcolor on a 32 bit surface as png output support is already there...

Anyway, might probably end up writing mine...

Özden

113
Hello There,

Using the Font creator which comes along with GLBasic, is it possible to set the background color to transparent? I'm asking this as I want to use AntiAlias for smooth drawing of the fonts and in that case the backcolor cannot be removed from the created font correctly.

Thanks,

Özden

114
GLBasic - en / Re: Clipping a drawing!
« on: 2010-Jan-22 »
This seems to be what I'm looking for...

Thank you very much...

115
GLBasic - en / Clipping a drawing!
« on: 2010-Jan-22 »
Hi There,

I'm working on the next blockbuster title for IPhone  =D and have a requirement that I need to clip the drawing within a rectangle. This will be required for a scrolling text where I need to draw it under a logo so it shouldn't overlap the logo, is there any way to do this?

Özden

116
Hi,

Moru : I use a laptop which has a 60hz screen refresh rate, so this shouldn't be the problem.

Hemlos : It'll be run on IPhone but I do my tests on Windows 7 for now and the screen res is 480x320 like in IPhone. As you said, I'll replace my framecount logic with a time based one, this was an old habbit like counting scanlines on C64  :).

Anyway, I wont't bother further with this for now as I'm sure it's something simple and can be checked later. Thanks to everybody who has spent time and answered my question...

Özden

117
Hello There,

Thanks for both of your answers :

Hemlos : I'm loading the level data, which is blocks consisting of 16x16 images into an array. The first level of the array is simply the rows and the second level is a simple string which contains the whole row. I actually see one improvement in here that to loop only visible area of the level instead of whole data but other than that, I don't think I can constraint the loops further.

MrTAToad : If I set the FPS to -1, all my timing (which depends on passed frames), becomes corrupt. For example, even in the splash screen, I wait for 60 frames in order to fade out the image. I think that's a bad practice and I should always use passed time instead? Also about the if block, doesn't it check each comparison starting from the first and if any of it is not correct, it skips the rest? This was the habit in C# that I use daily and if it's not the same, I should split the checks as you suggested.

Thanks for both of your anwers, I'll check further to see what I can do about this...

Actually, I just did increase the FPS to 120 and it works quite well in this refresh rate as well. This is clearly not something that my code delays the screen refresh. Maybe "jerky" does not express what I mean very well (Excuse me, I'm not a native English person) and maybe this will explain things better, I see rare skips on scrolling, which means it's smooth most of the time and rarely I see a skip on scrolling. This might something normal as well or I might be a bit sceptical  =D so I just wanted to be sure that whether this is normal or not.

Thanks again...

Özden

118
Hello There,

I'm prototyping a new game with GLBasic which I'm new as well  =D. I saw an interesting behavior and would like to ask whether I'm doing anything wrong.

In my sample, I'm simply scrolling a screen which is constructed by 16x16 pixel blocks. The whole screen size is 480x320. I call a routine inside the main while-wend loop and the FPS is limited to 60. I only draw the blocks which are inside the view. While scrolling, I sometimes see a loss in the smoothness of the scroll. The actual routine which does the drawing is this :

Code: GLBasic [Select]
SUB Draw_Level:
LOCAL Block$
LOCAL Block
LOCAL DrawX
LOCAL DrawY

        FOR i=0 TO LEN(LevelData$) -1
                FOR j=0 TO LEN(LevelData$[i]) -1
                        Block$ = MID$(LevelData$[i],j,1)
                        Block = ASC(Block$)
                        Block = Block -65

                        DrawX = j*16 - IG_CurrentX
                        DrawY = i*16 - IG_CurrentY
                       
                        IF Block > 0 AND DrawX >=-16 AND DrawY >=-16 AND DrawX < Screen_X AND DrawY < Screen_Y
                                DRAWANIM 0,Block,DrawX,DrawY
                        ENDIF
                                                       
                NEXT
        NEXT
       
        SHOWSCREEN
       
       
ENDSUB
 

Is there anything I'm not aware of about the timing of redrawing? I though "SHOWSCREEN" is handling everything for having a steady 60 FPS as I specified (I also think my routine shouldn't take that much time that will cause a skip on a frame).

By the way, I test it on a windows 7 machine which has 256 mb GPU and core duo cpu...

Thanks in advance...

Özden
 

119
Thanks a lot for all the answers...

Cheers...

120
Hi There,

Thanks for taking time and answering my questions. Just one addition to the landscape mode, I had already defined the screen resolution as 480x320, does it mean that my app will run in landscape mode automatically on IPhone/IPhoneTouch?

Thanks again...

Pages: 1 ... 6 7 [8] 9