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

Given the quality of talent here it would be a sin and a shame not to pool a team(s) to develop cross platform games. If anyone is interested and believe they have the skills to create high quality titles then please comment on the idea here and your thoughts.

My key skill is 2D pixel art. I'm skilled in logo design, hud creation, font creation and background tilesets. I also have skills in animating sprites too although I do prefer mechanical stuff (ie shoot em up) or platformer type graphics. This is not to say I cannot create others but this tends to be my strength. Also happy doing incidental animations, explosions, pickups etc..

As a part-time programmer it does give me the added bonus of preparing artwork that is coder-friendly shall we say lol :)

Anyone else interested?
I've tried to look at the varied posts regarding which is best to use and some people seem to say there's no difference, others are saying Sprites are slower. Is there a definitive answer here, and if indeed the answer is different can anyone give an example of when to use each for optimum speed usage. One thing also concerns me is that if PolyVectors are the way to go then we have no collision commands for them do we?

Thanks for your enlightenment =)
I was just curious to know if we can access the pictures or camera pics for the iPhone from within GLB. This would be handy for photo manipulation apps especially if we can save back to the MEDIA directory.
This is a little function that I wrote to pre validate POSTED data in PHP. Check the submitted data with the function prior to POSTING or updating your SQL dB.
Code (glbasic) Select

// .----------------------------------------.
// | Prevent XSS Hacks & SQL Injection      |
// '----------------------------------------'
function scrub($EXPLOIT,$SQL) {

// Ensure we're using UTF-8
$EXPLOIT iconv("UTF-8""ISO-8859-1"$EXPLOIT);

// Pre-Scrub with HTMLENTITIES

// Change TEXTAREA "\r\n" to keep line breaks from being escaped
$EXPLOIT str_replace("\r\n","#KEEP_LINE_BREAK#",$EXPLOIT);

// Exploit Prevention Code
if ($SQL == true) {
$scrubbed mysql_real_escape_string($EXPLOIT);
$scrubbed ereg_replace("[\'\")(;|`,?<>]","",$scrubbed);
             } else {
$scrubbed ereg_replace("[\'\")(;|`,?<>]","",$EXPLOIT);

// Change TEXTAREA "#KEEP_LINE_BREAK#" to safe "<br />"
$scrubbed str_replace("#KEEP_LINE_BREAK#","<br />",$scrubbed);

// Mail Check for exploit
$scrubbed preg_replace("(\n|\r)""<br />"$scrubbed);

// Return Value
return $scrubbed;

Happy PHP'ing ;)
In my project settings I have the developer profile selected and I'm getting code signing errors however I didn't before using Build and Archive, validating successfully and then submitting my app to iTunes connect as a distribution build. When I check on iTunes connect the app status is Waiting for review which is fine.

However now I'm back in Xcode if I build and run I now get a code signing error even though in project settings the developer provisioning profile is selected which worked fine 2 minutes ago before I uploaded to iTunes connect.

Anyone know what this freaky business is?
I clean all targets use Build and Analyze then I try to validate my app and get this...

Code (glbasic) Select
To submit or validate an application, you must first log in to iTunes Connect and provide information about the application you will be adding.

I have added an app to iTunes connect but can only presume the Bundle suffix is wrong, or something else??? I'm using GLB 10 Beta and when the Xcode project is imported its called iPhone blah... I renamed the Product Name to APCO and presumed this would be my bundle suffix but obviously not.

Anyone got a clear guide to what's wrong, this apple stuff is really starting to bug me.
It seems Mark Sibly of Blitz fame has been a busy bee.
Just wondering if anyone else has this command as it doesn't seem to appear in my version or the manual, however it is in the online manual?
According to the Apple development documents there's no landscape Default.png for 480 x 320, so I'm presuming you need to create a 480 x 320 screen and then rotate it clockwise by 90 degrees to display pseudo correctly if you wish for a landscape splash screen?
I'm presuming this won't matter but would an app be rejected as the only warning I ever get is...
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'iPhone-Info.plist'.

If it's a problem can it be changed? I know this may seem trivial and a foolish question but I just wanna make a text file of all necessities to check before I upload to the AppStore.

Thank you all for bearing with me and my numerous questions after joining this forum and purchasing GLB.
The reason I'm asking this is I can only test on my iPhone 3GS so if anyone can give a simple trouble free answer to allow me to add the relevant iPhone 4, iPad and iTunes icons to my app without worrying about it not working or my application being rejected that would be cool...
I have written a PC app which is my server (configured port forwarding etc..) and an iPhone app which when testing in GLB works perfectly for both local LAN IP and Remote IP (handled by port forwarding). Both of these work and messages can be sent successfully to the PC server.


Now that I have the GLB app running on my iPhone neither on Wifi or 3GS can I get it to work. In fact on Wifi it doesn't connect but on 3G regardless of both IP and PORT entered it always connects (when in fact it isn't it just says it has??).

Anyone have any ideas? This was hoping to be my first commercial app so I'm happy to privately post source and the Win exe server to show it working and if they can give some indication as to why it won't work on the device I'd be most grateful. It does seem I'm asking for loads of help but I'm new to GLB and given that the app and server work on the PC I'm a little befuddled.

This is a nice little function to use if you wish to print scores, timers, highscores etc. but require to use a fixed number of characters so the numbers don't jump about as they increase and decrease in value.

Code (glbasic) Select

// .------------------------------------.
// |  Pad INTEGER with leading zeros    |
// `------------------------------------'
FUNCTION PrintPaddedNumber: num, zeros, numx, numy
text$ = FORMAT$(zeros, 0, num)
text$ = REPLACE$(text$," ","0")
PRINT text$, numx, numy

Code (glbasic) Select
PrintPaddedNumber(20000, 6, 5, 5)

This will print the number 020000 in the top left of the screen at co-ordinates 5,5. Obviously using 6 for the zeros parameter only gives a range of 000000...999999, alternatively if the zeros parameter was 3 we have a range of 000...999 handy for a timer :)

Again I hope you guys find it useful =)
I'd written a simple map editor in BlitzPlus which writes out my mapdata as Bytes and when I read it into GLB the values are in the range -127...+127 and I needed them in the range 0...255. Here is a quick and easy way to do that which although not rocket science does help keep your code looking cleaner.

Function Code
Code (glbasic) Select

// .------------------------------------.
// |  Unsign READBYTE value to 0...255  |
// `------------------------------------'
FUNCTION UnsignByte: value%
IF value% < 0 THEN value% = 256 + value%
RETURN value%

Code (glbasic) Select
signed_byte% = UnsignByte(signed_byte%)

Hope you find it useful =)

I'm going to sign up today to the Apple Developer programme for iPhone development. Just asking others if they needed to update their firmware to the latest one (effectively killing the jailbreak) or is it still possible to use Xcode without worrying about the Jailbroken iPhone. In addition I've never really used XCode and although have it already on my Mac I was also wondering if it's ok to use the existing Xcode on there or is it best to download Xcode 4 when I pay my $99 after signing up?

I saw that Ian Price (I think?) had a guide for simplifying the setup keychains etc.. which at this moment means nothing to me as I haven't used Xcode. If anyone can shine a light or offer a guide I would be most grateful. It's about time I started testing on the device itself methinks =)
This tileset is availble freely for commercial use for GLB users with a valid GLB license, it is released under the creative commons license shown below. If you use these tiles in a project  please credit Marc Russell and display a link to Thank you.

Creative Commons License

640x480 Screenshot taken from a PNG map (also included with the tileset) to show off how the tiles are pieced together

Download Link
I thought some of you might find this quite pretty given the small amount of coding taken for such a nice effect. Enjoy!

Files and Source

I have just started writing a mini platform engine and am building a framework. Presently the game works (although code needs tidying) however when your lives run out and I use GOTO to restart the level, GOTO menu or GOTO load level again it restarts but then kinda hangs. Please find attached the project, source and external files so that you can look and help in anyway possible.

Thank in advance for taking the time to assist however possible.

Source and Files

Game Screenshot

Use the left and right mouse buttons to rotate and move the bouncing ball.
This is where I load my animation file which has 8 frames
Code (glbasic) Select
nme  = GENSPRITE() ; LOADANIM "gold_coin.png", nme, 16, 16

This is where I setup my generic Spritetype
Code (glbasic) Select
TYPE Sprite

GLOBAL Alien[] AS Sprite
DIM Alien[64]
FOR enemy = 0 TO 63
Alien[enemy].SprX = RND (800)
Alien[enemy].SprY = RND (288)
Alien[enemy].SprSpd = RND(2)
Alien[enemy].SprFrame = RND(7)
Alien[enemy].MaxSprFrame = 7

This is my collision checking in the Update Logic subroutine (LevelX is a scroll offset pointer so the sprites are fixed to my background)
Code (glbasic) Select
// Check Player Enemy Collision
FOREACH enemy IN Alien[]
col = SPRCOLL(nme, enemy.SprX + LevelX, enemy.SprY, ball, PlayerX, PlayerY)
IF col = TRUE
DELETE enemy
col = FALSE

Here's my draw sprites subroutine
Code (glbasic) Select
// Display Enemies
FOREACH enemy IN Alien[]
DRAWANIM nme, enemy.SprFrame, enemy.SprX + LevelX, enemy.SprY
enemy.SprFrame = enemy.SprFrame + 1
IF enemy.SprFrame > enemy.MaxSprFrame THEN enemy.SprFrame = 0

Now the Sprites get deleted when you collide with them but sprites on the left get deleted too??? However when I use exactly the same code but with DRAWSPRITE instead of DRAWANIM the collision is perfect and only the collided object gets deleted.

I'm really stumped, help please lol.
I thought it'd be nice to offer something to the GLBasic community before I start asking allsorts of questions about compiling to the iPhone lol. My name's Marc Russell and I'm a professional games industry graphic artist specialising in pixel art. I do love my programming also and it'll be good to dabble with GLB. For now I hope you find these sprites, level tiles and fonts useful.

Sprites & Tilesets