Menu

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

Messages - Gary

#271
Thanks for the info, been through the showroom but cant see it, is it still available?

Cheers
Gary
#272
Does GLBasic allow any read and writes to an RS232 port? All I can see is stuff for TCP and sockets but nothing for basic RS232 send and receive

Thanks
Gary
#273
Is there a simple way of rotating and resizing a screen before the showscreen command? What I am try to do is port my iphone app to the gp2x quickly and obviously the main difference is the screen size. Rather than redo all my graphics I want to just use the standard iphone graphics and then before displaying I rotate and resize for the gp2x.

Thanks in advance

Gary
#274
I would pay extra for open feint support. Looking to add some sort of achievments to my app and was going to do it locally but OF support would be great. Any time scale to release?
#275
Ah ok, I understand

Thanks for the info
#276
I have checked the manual, searched for forums but cannot see where I am going wrong when I try to use ?DEFINE

I am porting some C code and it has heavy use of #DEFINE which I assumed I could just swap for ?DEFINE but it seems im doing something wrong

This is some example code

Code (glbasic) Select
?DEFINE SPIN_TO_WIN 1
PRINT SPIN_TO_WIN,0,0
SHOWSCREEN
KEYWAIT


and this displays 0 instead of the 1 I expected.

Thanks for your help

Gary
#277
I did it the obvious way

Code (glbasic) Select
SETCURRENTDIR(PLATFORMINFO$("DOCUMENTS"))
INIOPEN "numberofruns.ini"


#278
Quote from: Kitty Hello on 2010-Jan-14
For writing to iPhone, you must use the directory: PLATFORMINFO$("DOCUMENTS"), though. The rest is read only.

So with my example would I need to have the file name as something like
INIOPEN PLATFORMINFO$("DOCUMENTS")+"numberofruns.ini"
or do I need a / before the ini file name?
#279
thanks matchy, that was the way I was planning of doing having worked a fair bit with php. But always nice to know I'm heading down the simplest route before I start on the complex stuff :)

Once again the versitility of GLBasic shows no limits. It really is the simplest way I have found of producing games on the iPhone and probably the best set of forums I have seen on any site
#280
indeed it seems to convert automatically

Just to share back incase someone else is looking for the info here is my quick test code

Code (glbasic) Select
INIOPEN "numberofruns.ini"
runs=INIGET$("data","val1")
name$=INIGET$("name","myname")
IF(name$="NO_DATA") THEN name$="Gary"
runs=runs+1
INIPUT "data","val1",runs
INIPUT "name","myname",name$
PRINT runs,0,0
PRINT name$,0,10
SHOWSCREEN
INIOPEN ""


this will open a file called "numberofruns.ini" and if it doesnt exist it creates it for you (hence the reason you dont need to check it exists I guess)
It then reads in 2 values, first is number of times the program has been run and second is a name string. If the file has just been created then run will contain 0 and name$ will contain the string "NO_DATA"
It then adds 1 to runs and sets the name to "Gary" if it isnt already
then it updates the 2 stored values
prints the output and then shuts the file down

Its so simple, much easier than trying to use a file and pulling the data from inside the file

Now just to work on the NETWEBGET$ bit :)
#281
Thanks for the replies so far, they all make sense and an ini file does look to be the best way to go. One other quick question, all the examples for iniput and iniget$ refer to strings rather than numerical values, can I use numerical values or will I have to convert the string back to a number (no great problem if I do, just an extra routine)
#282
Im having a stupid moment and cannot get my head around how the best way to read and write a file using GLbasic for an iPhone app

Basically on start up I want to read a file in that contains things like high score and game stats. Also I want to generate a random string the first time the app is run to identify the users iPhone for an online high score chart.

What I would like to know is whats the best way to check if a file exists, create the file if it doesnt exist (this would be done on first run only), read in the file, copy the variables to the game at run time and to write the variables back out at the end of each game.

Some of the data will be stored in an array, other will just be standard variables and strings

If anybody has any example code to do this and you can share it then it would be much appreciated

Thanks
Gary
#283
I use a macmini for my development which is used for nothing else but GLbasic and programming and its fine.

When I come to reset up my mac I would personally advise against going the bootcamp method of running windows and go for the Parallels option, simply because unless you are running anything other than GLBasic and maybe a few other "simple" programs, the loss in speed you get running via "emulation" far outweighs the hassles of booting in windows, compiling the code, copying it to a drive both the PC and mac can read and write to, shutting down, booting to mac, compiling, uploading to the iPhone, finding out you missed something out and having to boot back to Windows again. Bootcamp is fast and it does run exactly like Windows should (some might say slow, buggy and crashes a lot lol). But unless you have software that needs every CPU cycle then go for Parallels. You cant really run cpu intensive 3d windows games on the mac mini anyway

I havent tried it but I would imagine that Parallels can run GLBasic fine and be totally useable. Also it removes the need to partition the drive and suddenly realise that 30gb was not really enough for windows and all the graphics, sounds, code and other programs
#284
Title / Link: Random  Gold
Genre : Casino / Arcade
Cost : Ã,£0.59 / $0.99

Description :

Random Gold is the first UK fruit machine that you can actually find in your local arcade.  The look and sound of the machine is identical to the real thing. The only difference is you cant lose money (or win any!)

Ã,£70 jackpot is available along with all the normal features of the fruit machine with holds, nudges and more.

See if you can beat your high score with your 50 credits.

Screenshot :



[attachment deleted by admin]
#285
And I would imagine this is the first screen the crackers find that they edit to put their logo on :(

Still, its a handy tip, thanks