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 - ampos

FAQ / New to Mac...
I have just bought my very first Mac, with the sole idea of using it to compile for iPhone, a MacBook with Os 10.6.4

My Mac has come with... nothing. A plain Mac.

So I think it would be a very good idea to use my experience as a guide for users with the same situation.

I plan to ask you about what to do, and write a FAQ/Guide with my experiences.

So, the very first.

What should I download or do first?

PD: I just configurated it for accesing a remote directory, and Remote Desktop, to manage it from the PC, so not to have both computers at the same time on the desk. Dont know if this will be ok to be included...


-Visit and register as "Apple Developer". It is free.

-Download "Xcode 3.2.4 and iOS SDK 4.1"

-Join the iOS developer programl. The thing that cost $99 per year. Yeah.
Is there a way to get the full online manual... offline?

I want to read it on my iPhone.
I am making my game, and set LIMITFPS 60.

Now I have tested on iPaq, and it shows slow. It runs at the same speed as in PC if I set LIMITFPS 30.

What is the max fps on iPhone? 30 also?

Should I set LIMITFPS 30 to all versions?
As I tracked the error, here is the correct bug report:

In my prog I have a main loop and 3 SUBs.

sub paint
sub init
sub mouse

If all the subs are unfolded, the game compiles and run fine. Sub Mouse doesnt affect compiler error

PAINT sub FOLDED & INIT sub unfold
"Krakout.gbas"(88) error : IF without ENDIF / THEN

PAINT sub UNFOLD and INIT sub fold
Wordcount:125 commands
C:\Users\AMpos\AppData\Local\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::inicia()':
C:\Users\AMpos\AppData\Local\Temp\glbasic\gpc_temp0.cpp:573: error: a function-definition is not allowed here before '{' token
C:\Users\AMpos\AppData\Local\Temp\glbasic\gpc_temp0.cpp:594: error: a function-definition is not allowed here before '{' token
C:\Users\AMpos\AppData\Local\Temp\glbasic\gpc_temp0.cpp:601: error: a function-definition is not allowed here before '{' token
C:\Users\AMpos\AppData\Local\Temp\glbasic\gpc_temp0.cpp: At global scope:
C:\Users\AMpos\AppData\Local\Temp\glbasic\gpc_temp0.cpp:614: error: expected `}' at end of input
*** FATAL ERROR - Please post this output in the forum

Just to show a bit of my work

UPDATE 16-09-2010

This is a very early alpha stage of my KRAKOUT clon. You will be able to play original C=64 graphics and PLUS enhaced ones.

Currently you can press 'C' to change between original C=64 graphics and enhaced ones (in WinCE should be CALENDAR key, and in GP should be "B" key)

Paddle can be moved with mouse (+left button), joystick, cursor keys and touchscreens. Next step YOUR MIND!!! :D

Game will be avaiable on iOS (for iPhone 3G/4G/Ipad) with HD graphics, Windows, Macintosh, Linux, Windows CE (640x480 & 320x240) and GP32x.

Stay tuned.

UPDATE 26-09-2010

UPDATE 13-09-2010

Paddle shadow and new border (taking from a Star Wars sword!)


The tiled background is created using polyvector, and scrolls. The inner border shadows are also created using polyvector and alphamode.
You know I am new at GLB...

I have read alot about placing sprites, with and without polyvector, but frankly, I dont know what is all this hype about polyvector.

I know it has to be something, as most of you claim "it is awesome", "its faster",... but I dont see really why.

Can someone explain me more about polyvector that the "little" explanation on the online guide?

Is there a way to use gradual alpha channel?

Currently, as far as I see, alpha channel is just YES or NO (255,0). Can a gradual alpha channel be used?

I want to cast a gradient shadow.
My game has a border, so I loaded it with "loadbmp".

But inside the border, there is a moving background, made with a 24x24 pixels pattern.

What is better, draw/move around 100 24x24 sprites, or create a 600x400 (zone inside the border) background with the pattern on photoshop an move just one big sprite?

DO I explain myself? :)

whatch this video, the background when playing to get the idea...

Bug Reports / IF...THEN bug
The folowing code

Code (glbasic) Select
IF a=0 THEN PRINT "1",10,10; PRINT "2",10,50
PRINT "3",10,100


When it should be only "3"

Maybe it is not a bug, but the way GLB is, but as old as I know, all basics I have learned, only prints "3"
I am planing to make my game for 2 resolutions

480x320 (Iphone 3)
960x640 (Iphone 4, Retina Display)

I also was planning to sent Retina resolution to IPad, as I see a waste of time/resources to make gfxs for so little gain in quality (1024x768), as it is just 64 pixels.

Can it be done?

I have seen that Retina Resolution is not available... can it be done?
I have been always a guy of one source per project.

On BlitzBasic, if I make a game and needs a level editor, I can have both programs on the IDE, saved on the same directory, and just running the one I want just pressing F5.

Now, GLB is over me. It seems that if I created a new window/program on IDE, it is not an independent one; everytime I press F5, the first/main program is executed.

Sure I am missing something.

Can I have independent programs on the same dir/project, and run the one I want just pressing F5?
Correct me if I am wrong.

On iPhone, touching the screen is the same as on PC moving the mouse AND clicking left.

If you do not touch the screen, mousex and y return the last known mouse position. Of course, on PC, mousex&y are updated even if no LMB is pressed.

Can we have a menu on IDE or a metacomand in GLB, called "TOUCHSCREEN ON", so only mousex&y are updated if LMB is pressed?

This way, we will not make this mistakes when programming for iPhone.

Just an idea, maybe I am wrong...
What about a general spanish forum?

It seems we are legion here  :enc:

A ver si nos ponen un foro en español, que estamos aquí como tontos hablándonos entre nosotros en inglés!
I am making a ARKANOID clone for iPhone, and I dont mind to make it vertical (320x480) or horizontal (480x320).

I imagine that the iPhone has somekind of native resolution, and the other one is rotated 90º, I dont know if internally by iPhone hardware or GLBasic.

If I make it in native resolution, it should be faster, as no one has to rotate my screen.

Is this true?

Also, I have noted that "useasbmp" and "blendscreen" only works in portrait (horizontal) mode, so I imagine that "native" resolution on iphone is 480x320... is this true?

If so, the "correct" orientation (I mean, not rotated) is with HOME button on the right or in the left? I presume again that HOME on right is "native" and with HOME on left is rotated 180º...
I just installed GLB.

I load a demo, hit F5 and OK. Fine.

Load another demo. Press F5, and it runs the previous demo.

No matter with demo I load, F5 or F8 just run the very first app I loaded.

It should be stupid, but I got no clue how to.
First, thank you for this great language, and the multiplattform support.

I come from Blitz3D, and I am planning to make the jump to GLB, so I can code something to iPhone.

My question comes from the fact that I have no Mac, and I (really) dont want to buy or install it on my PC.

Can I make games on GLB and make them "iPhone ready" without a PC?

I know I have to sign with Apple to be able to sell them, but first, I have to have a game.ipa!