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

Topics - spicypixel

OK so I've compiled for OSX_uni and it happily creates the ".app" within the "distribute" "MacOSX" structure. The build is created in my private dropbox folder which is synced with my mini Mac. However... When I now go to the Mac and double click my the icon expands as if it's about to run then does nothing. Is there more I should do?

Makes me seem such a noob ^
I want to present a percentage of stars collected from stars totalled as a rating out of 5. This code works perfectly with 5 stars showing when you collect all stars but 0 when you collect anything else. The maths is fine is must be some integer float weirdness. I really can't see what I'm doing wrong lol. Any help is greatly appreciated :)

Code (glbasic) Select

LOCAL starscaught
starscaught = (GE_StarsCollected%/GE_StarsTotal%)*5

FOR starx = 0 TO starscaught-1
DRAWANIM GE_Stars%, 1, (starx*32) + 160 , 234

Am I going insane? :)
FontStruct lets you quickly and easily create fonts constructed out of geometrical shapes, which are arranged in a grid pattern, like tiles or bricks. You create 'FontStructions' using the 'FontStructor' font editor. Once you're done building, FontStruct generates high-quality TrueType fonts, ready to use in any Mac or Windows application.

Visit FontStruct Website
Does anyone know if there's a wrapper or anyway of listening to a shoutcast stream from an iOS GLB app? I have used Bass.dll before in Blitz but was hoping there was a way for iOS.

Thanks in advance for any advice.
I have noticed that when I type CONSTANT for my variables that as soon as I have typed "const" it's highlighted in green as if it's a command although it doesn't get made into CAPS like a normal command. Is this a spurious bit of highlighting code from when CONSTANT was CONST possibly?

Doesn't matter just curious :)
I have version v10.179 of GLB and I have tried setting AUTOPAUSE to TRUE and then have a flag Pause% which is set within the GLB_ON_PAUSE sub-routine to be TRUE and within GLB_ON_RESUME I set Pause% to be FALSE.

From within my game loop if Pause% is set by pressing an Icon on-screen it does indeed pause the game and displays PAUSED on-screen. However if I lose focus of the window I presumed it would do the same thing. In-fact it does nothing at all the game happily carries on playing music and animating the sprites. I have also tried setting AUTOPAUSE to FALSE in-case my understanding of how it worked was wrong. Again it makes no difference and simply continues to play music and animate sprites.

I tried commenting out the AUTOPAUSE command completely as I know before when I lost focus of the window it displayed <paused> in the title of the window. Now it doesn't do that either.

Please advise, thanks in advance.
I not only want to check Sprite Collisions but also a quick way to know what edge of the object I'm colliding with. Is there any command to do this presently?
104 SUBTYPE ARM CPU  deprecated errors :(
Any idea what I can do to sort this out, other than revert to the previous SDK that did work? I'm surprised no-one else is having trouble with using XCode 4 because last time I moved over I had the same problems. I think Trucidare mentioned the gcc Compiler but that means nothing to me, I should write code, build it, and then compile for iOS without problem. :(
Is there a way I can use ALPHAMODE - to have my existing graphics darkened on-screen and then illuminated with ALPHAMODE +. I don't want the opacity of 0 to -1 I just want darker gfx :( I could create a big sprite to fill the screen in black with a circle cut out of the middle (with alpha gradient) for viewing area but it's a lot of gfx to blit each frame. Any other ideas that won't be CPU intensive?

Ideally a darkened screen (not totally black) and then an area illuminated around the main sprite.
I have decided to create an iPad game and presently I have a texture atlas of 2048x2048 with a fixed sprite size of 128x128 drawn using poly vectors. The resolution is 1024x768 for the game. I am using XCode 3.2.5 with iOS SDK 4.2 and have deployment for iPhone/iPad.

The game draws 8 tile rows and 6 tile columns (48 tiles). With additional tiles being drawn offscreen for edge update when scrolling totalling 76 tiles. My draw loop also checks the collision of the drawn tile within the loop against the player animation frame and this is done in a solid 40fps. However I consider 76 polyvectors very poor to drop below 60fps. I haven't commented out the collision yet but even so I feel 40fps is low.

I have two StartPoly and EndPoly commands with the whole draw loop to allow ALPHAMODE 1 (explosions) and ALPHAMODE -1 (game stuff) although I am using the same texture atlas and not swapping for another.

I am presuming the 2048x2048 texture atlas is the bottleneck but once in memory I would have thought would be ok. Can anyone shed any light on what their results are on the iPad or post code that they have working well in 60fps with a decent amount of PolyVectors.  <-- This would be ideal as I can confirm my iPad FPS against what they have.

Thanks in advance guys if you can help :)
This code fails miserably (not sure why)
Code (glbasic) Select
READUBYTE 1, TileMap[x][y]

However this is basically the same but works flawlessly.
Code (glbasic) Select
LOCAL MapData%
TileMap[x][y] = MapData%
Code (glbasic) Select

// .-------------------------------.
// | Check Cursor Keys             |
// '-------------------------------'
dx = KEY(205)-KEY(203)
dy = KEY(208)-KEY(200)
INC x,dx ; INC y,dy
Plebz is a variant of the "match3" style game whereby the player has to drag the rows and columns of the grid play area with the mouse to make 3 or more combinations of characters until the level is clear. There are 8 stages and 4 levels to each stage. These need to be completed before progressing to further stages and unlocking new characters.

This is the final Windows version. Any ideas or features you have will certainly be welcome for Plebz II :) The game is intended for the iPhone/iPad platform with the Windows version being available freely from the SpicyPixel website.

I Hope you enjoy it guys!

Download PlebZ FINAL

Updated link ^

I have an MP3 that loops perfectly with PLAYMUSIC "music.mp3", TRUE however I have another that doesn't loop properly at all. I did notice the one that looped properly was CBR whereas the one that didn't was a VBR mp3. Just thought I'd mention it incase anyone had any issues and wondered what was going on ;)
1) Go to
2) Click "+ Create New App" in the top right
3) Name the App accordingly, tick the terms and click "Continue"
4) Fill in the captcha
5) Enter a relevant name in the Canvas Page (
6) Enter your canvas url (
7) Click "Save Changes"
8) Click "Web" on the left navigation
9) For site url use ""
10) For site domain use ""
11) Copy your App ID and App Secret
12) Click "Save Changes"

Now it's simply a matter of editing the config.php file with the appid and appsecret and then uploading the contents of the zip archive to the folder defined in step 6. Accessing will now do it's stuff.

It's very basic but it does work. Hope you can dabble and expand upon it :)

** Note **
To get your access token for your created app visit again and click on your app from the left-hand side. You will now see the full details of your app and a code will be displayed in the Access Token field. If there is no access token there click the given link to grant permissions, a code will now be shown. This access token is needed in the new updated code attached.

[attachment deleted by admin]
Everyone likes a freebie :)

Download Jewel Quest by AvanQuest Software

Just got it 5 minutes ago in my inbox, thought I'd share with my fellow gaming colleagues :D
Press and hold the Sleep/Wake button and tap the Home key to take screenshots. The screen flashes white and/or the camera sound is played to let you know that the shot has been added to your DCIM folder.
Can someone tell me how I can loop properly through the second array type. I'ts gonna be an obvious syntax error but I just can't see it lol.

Code (glbasic) Select

// Type declaration
TYPE Sprite
GLOBAL working_sprite[] AS Sprite
GLOBAL failing_sprite[] AS Sprite

// tile array data storage
DIM tiles[8][8]

// sprite type data storage
DIM working_sprite[64]
DIM failing_sprite[8][8]

// Build the Array and Sprites for the Type
spritecount = 0
FOR y = 0 TO 7
FOR x = 0 TO 7

tiles[x][y] = RND(7)

working_sprite[spritecount].SpriteX = (x * 10)
working_sprite[spritecount].SpriteY = (y * 10)
working_sprite[spritecount].SpriteFrame = tiles[x][y]
spritecount = spritecount + 1

failing_sprite[x][y].SpriteX = (x * 10)
failing_sprite[x][y].SpriteY = (y * 10)
failing_sprite[x][y].SpriteFrame = tiles[x][y]


// Display Tile Info
FOREACH spr IN working_sprite[]
PRINT spr.SpriteFrame, spr.SpriteX , spr.SpriteY

FOREACH spr IN failing_sprite[]
PRINT spr.SpriteFrame, spr.SpriteX + 100, spr.SpriteY


Just curious to know if PRINT is clipped for what is displayed onscreen. Similarly if I have a Wide sprite are the edges clipped when offscreen.

I am presently using PRINT for a long text to scroll. I have written code for the PRINT to display only what can be displayed using MID$ and updating a pointer for the scroll and incrementing the MID$ start point but this won't work unless the font is fixed width and as my font is using kerning I decided to simply use LEN(Scrolltext$,TRUE) to find the max pixel length of the scrolltext and then use this as a pointer to wrap. So ideally it'd be nice to know if things are offscreen they're not using CPU and are clipped.

I also wondered is Viewport clipped, and if so I could use that to assist in speed if the PRINT isn't clipped.

Thanks in advance ;)
I was curious if there's a way to grab a snippet of code from the forum or for example if you're working on a project within the IDE and you just  want to test some other code without having to create a NEW project every time. I have always found it handy in Blitz and other Basic derivatives to be able to simply run some test code or copy code from my existing project to a new tab for debugging without having to create a new project with its own folder.

Is this something others have thought about before or are they happy with how they code already within the IDE?

Whilst I think about it is there anyway to block comment code out rather than repeat // every line?