a Simple Iphone App Code?

Previous topic - Next topic

Apidya

hiya there,

I am new to the forum. I would like to see a simple iphone app code to know what look like and how easy it is to code...

If I get the GL Basic then add on would be Iphone SDK or should I get the GLBasic SDK premium ?
What so good about the GLBasic 3D addon?

I am sure the  GLBasic SDK auf CD is important in case if my hard drive bugged up (touch woods that it doesnt happen :) )


Kitty Hello

The CD is not really required. You can download the setup again w/o troubles.
The 3D addon is required for INLINE stuff (you need premium for that) and 3D objects. On the iPhone, usually 2D and NET_addon suffice.

Apidya

can you show me  Simple GL Basic of Iphone App code pls before I make my mind up of buying it?
please.

cheers

Moru

There is no real difference in iPhone app code... just about anything written for the PC you just compile for the iPhone and transfer to your mac-computer and compile for the iPhone (You do have a mac, right? :-)

Apidya

Quote
You do have a mac, right? :-)

no I dont have mac :(  but it is important to have mac? if yes then which mac computer should i get?

erico

this is only my opinion not advice since macs are expensive and I personally don't like them much....
...you could go for a mini-mac, but check what the people on the forum has to say, specially those that are already producing for the i-phone.

cheers

Kitty Hello

yes. Just get the cheapest x86 Mac you can get.

MrTAToad

The Mac mini would be fine - although if you dont have a monitor, that would have to be brought separately.

My sprite testing code for the iPhone looks like :

Code (glbasic) Select
// --------------------------------- //
// Project: TestSpriteSpeed
// Start: Sunday, August 16, 2009
// IDE Version: 7.082

TYPE tSprite
x
y
dirX
dirY
scale
scaleDir
angle
image%
ENDTYPE

LOCAL sprites[] AS tSprite
LOCAL spr AS tSprite
LOCAL loop%
LOCAL currentTimer
LOCAL nextTimer
LOCAL speed

SETSCREEN 640,480,0
SEEDRND GETTIMERALL()
LIMITFPS -1
SETTRANSPARENCY 0
LOADFONT "smalfont.png",0
SETFONT 0

SETTRANSPARENCY RGB(255,0,255)
LOADSPRITE "Media/plasma.bmp",1
LOADSPRITE "Media/plasma2.bmp",2
LOADSPRITE "Media/plasma3.bmp",3
SEEDRND GETTIMERALL()

FOR loop%=1 TO 1000
spr.image%=RND(2)+1
spr.x=RND(640)
spr.y=RND(480)
spr.dirX=RND(6.0)-3.0
spr.dirY=RND(6.0)-3.0
spr.scale=RND(3)-1.5
spr.scaleDir=RND(2)-1.0
spr.angle=RND(359.0)

DIMPUSH sprites[],spr
NEXT

initAppTime()
speed=updateAppTime()
WHILE TRUE
FOREACH spr IN sprites[]
ROTOZOOMSPRITE spr.image%,spr.x,spr.y,spr.angle,spr.scale
INC spr.x,spr.dirX*speed*0.25
IF spr.x<=0.0
spr.x=0.0
spr.dirX=0.0-spr.dirX
ELSE
IF spr.x>=640.0
spr.x=640.0
spr.dirX=0.0-spr.dirX
ENDIF
ENDIF

INC spr.y,spr.dirY*speed*0.25
IF spr.y<=0.0
spr.y=0.0
spr.dirY=0.0-spr.dirY
ELSE
IF spr.y>=480.0
spr.y=480.0
spr.dirY=0.0-spr.dirY
ENDIF
ENDIF

INC spr.angle,0.08*speed
IF spr.angle>=360.0
DEC spr.angle,360.0
ENDIF

INC spr.scale,spr.scaleDir*0.075*speed
IF spr.scale>=4.0
spr.scale=4.0
spr.scaleDir=0.0-spr.scaleDir
ELSE
IF spr.scale<=0.25
spr.scale=0.25
spr.scaleDir=0.0-spr.scaleDir
ENDIF
ENDIF

NEXT

PRINT AppTime_UPS,0,0
SHOWSCREEN
speed=updateAppTime()
WEND


and doesn't really require any modification for Windows, Linux, Mac etc.

codegit

If you have the budget, then a MacBook is cool as well. As stated before make sure its an "intel/x86" mac. You will also have to become an Apple iphone developer and this will cost you $99.00.
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

Apidya

thank you for all the reply.

How much is the mac computer?

Is Apple Imac Combi Computer worth getting?

Apidya


MikeHart

Look at http://www.apple.com for the prices. OR for used ones on EBay or other places.

If the IMac is worth it? It depends on what you want to use it for. I love mine and it is my work machine but if you are mainly a windows user and just want to compile IPhone apps, then get a small MiniMac .

kamakazieturtle

Just out of curiosity, is it required to have a mac to compile for the iphone? Or do you just need one for testing?

codegit

Quote from: kamakazieturtle on 2010-Jan-08
Just out of curiosity, is it required to have a mac to compile for the iphone? Or do you just need one for testing?

You will need a MAC to compile for iPhone.  :good:
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

Hatonastick

#14
Hmm does the license for the SDK state that you need Apple hardware, or just the software (OS)?  I might see if I can dig up Gernots post with the quote from the iPod SDK license.

If the license just requires the OS, has anyone got details on what to buy (hardware, software) to get it all running for development purposes?

Edit: Never mind.  According to the post by Gernot the license says something like: "You agree not to install parts of the SDK on non Apple branded hardware".  That rules me out...