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

#1
GLBasic - en / Re: Mac IDE
2010-Jul-05
Probably this one will work, it is used with cocos2d, but i think it will work here as well.

http://slick.cokeandcode.com/demos/hiero.jnlp


Cheers,
Jespar.
#2
But as i mention last, wouldn't it be nice to if it is possible, to call/set properties of prototypes in the functions/methods with THIS.x = and THIS.y = etc...

So then you can write functions/methods within a prototype and set the properties of it with THIS. so no need to pass the whole prototype anymore. Only thing / problem probaly would be that you need  a pointer to an object, how are you gonna handle that gernot  :P

cheers,
Jespar
#3
Oke, i've tested some simple things with prototype, but cannot get what i need, probally there is a way :) 


First of all:

I Cannot create a new file, added to the project with a prototype definition and functions included, i get errors. Looks like the functions need to be beneath the mainloop. Putting both, PROTOTYPE and the according functions in a second file in the project, causes errors.


Second, most important:
The code be beneath does not work , because i cannot call the player.x and player.y  within the function ShowPlayer or is there a way to do so ???? It would be nice when we could make a call like this.x , this.y etc. (see code for example) the ShowPlayer is the most interesting!


Third:
Can't i return a TYPE from a function like newobject = functionname() <= then the function will create a global new object (prototype) and return this into a var as object, easier to handle :)



Code (glbasic) Select

// PROTOTYPE SOME FUNCTIONS AND PROPERTYS //

PROTOTYPE sInit: x, y, filename$
PROTOTYPE sShow:
TYPE TPlayer
   x
   y
   spriteid
   Init AS sInit = InitPlayer
   Show AS sShow = ShowPlayer
ENDTYPE


// INIT TPLAYER / GAME LOADING ETC //
GLOBAL player AS TPlayer
player.Init(0,0,"Media/grossini.png")


// MAIN LOOP //
WHILE TRUE
   player.x = 0
   player.y = 100
   player.Show()
   SHOWSCREEN
WEND
// END MAINLOOP //






// PROTOTYPE FUNCTIONS / METHODS //
FUNCTION InitPlayer: px, py, filename$
   sprnum% = GENSPRITE()
   LOADSPRITE filename$,sprnum%
   player.spriteid = sprnum%
ENDFUNCTION // INITPLAYER


FUNCTION ShowPlayer:
   DRAWSPRITE [ thisobject.spriteid],[thisobject.x],[thisobject.y]
ENDFUNCTION




Hope it's clear a bit, cheers.
#4
What you want to do is just creating your splash screen image in PNG format which have 320Ãâ€"480 resolution for portrait or 480Ãâ€"320 if your app is running on landscape orientation.

Then name it ââ,¬Å"Default.pngââ,¬Â, please note that you have to name it ââ,¬Å"Default.pngââ,¬Â not ââ,¬Å"default.pngââ,¬Â. Itââ,¬â,,¢s case sensitive.

Then just put the file into your project and itââ,¬â,,¢s DONE!
#5
Nice,

Bought it at the appstore! It shows a good representation of what GLB can do on the iphone, plays also great, controls are well listening to my fingerinput. Also nice graphics! Congratulations

2 thingy's :

1. Have you used a default.png, it takes a while to show up the first screen, default.png is instant
2. Nice to make the menuitems ontouchover or something, so it shows another color or something when you go over the button
3. The Musicnote doesn't turn of the soundeffects, only the playing music

Some questions:

- How did you do the particles behind the pumpkin
- How did you integrated Pause, does it also pause when you get a caller?
- Would you like to share any of your touch routines integrated in this game

Cheers and good luck with this game,
Freshworks
#6
i Use Little Snitch, really great software for blocking incoming and outgoing traffic.

Cheers and welcome to the Mac family ;)
#7
@diego,

no .exe would be build for the iphone, but an iPhone.xcodeproj file accomplished with a bunch of other files you'll need to open within the Iphone SDK (Xcode) and compile it in there to get the name.app to run on a iphone.

#8
In the help section 'Advanced' at the bottom, use search in the CHM file it says:

Hexadecimal Numbers
Hexadecimal numbers can also be used in addition to decimal numbers by prefixing it with '0x'.

Cheers,
Freshworks



#9
@diego,

To build an app for the iphone you need the following resources:

- licensed glbasic (69 euro or something or else 5 minutes game limit)
- Apple developers license upload it to the appstore (99 dollar)
- MAC and Windows

A Mac for compiling the source generated by Glbasic and a windows machine to build the GlBasic project for iphone.

You could also use a MAC alone and use parallels for the windows machine to run Glbasic on.

Cheers and good luck.
 
#10
Hey Backslider,

The irc.freenode.org  is oke, there are people now, and the BOT glbasic is also available, remakes is or was offline for a while!

Cheers,
Freshworks

#11
channel GLBASIC at irc.freenode.org  :)
#12
Hi,

I've created a bundle identifier like NL.FRESHWORKS.*. Now when i build for iphone there's default COM. in front of the bundle identifier name in the info.plist.

Could there be an option into the project options for iphone to set the extension like com, nl or whatever a developer uses. Or that i could place in the company field the whole bundle identifier like nl.freshworks, this wont work now.


Thanks,.
Freshworks
#13
Hi,

i've tried the example within the "All entries section", but seems that it won't compile. Is there an out of the box sample that works, so i could test this on the iphone ?

http://www.glbasic.com/showroom.php?site=games&game=box2dinterfaceinglbasic&lang=en

When i try to compile the above example it will start with the following missing files (errors):

*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.098 SN:479d16c7 - 3D, NET
"glbox2d.gbas"(35) warning : probably unassigned variable : screenWidth
"glbox2d.gbas"(35) warning : probably unassigned variable : screenHeight
"glbox2d.gbas"(43) warning : probably unassigned variable : mbr
Wordcount:68 commands
compiling:
X:\Iphone\Box2D\sim_box2d.cpp:1:19: stdio.h: No such file or directory
X:\Iphone\Box2D\sim_box2d.cpp:2:20: stdlib.h: No such file or directory
In file included from X:\Iphone\Box2D\Box2D/Include/Box2D.h:34,
                 from X:\Iphone\Box2D\sim_box2d.cpp:4:
X:\Iphone\Box2D\Box2D/Include/../Source/Common/b2Settings.h:22:20: assert.h: No such file or directory
X:\Iphone\Box2D\Box2D/Include/../Source/Common/b2Settings.h:23:18: math.h: No such file or directory
In file included from X:\Iphone\Box2D\Box2D/Include/Box2D.h:34,
                 from X:\Iphone\Box2D\sim_box2d.cpp:4:
X:\Iphone\Box2D\Box2D/Include/../Source/Common/b2Settings.h: In function `float32 b2MixFriction(float32, float32)':
X:\Iphone\Box2D\Box2D/Include/../Source/Common/b2Settings.h:167: error: `sqrtf' was not declared in this scope
In file included from X:\Iphone\Box2D\Box2D/Include/../Source/Collision/Shapes/b2Shape.h:22,
                 from X:\Iphone\Box2D\Box2D/Include/../Source/Collision/Shapes/b2CircleShape.h:22,
                 from X:\Iphone\Box2D\Box2D/Include/Box2D.h:36,



Ettccc...........




#14
@trucisdare,

Could you probaly share the objective-c code for IMPORT "C" int GetPressState(const char* button); i would love to use functions of the iphone SDK itself within glbasic.

I could probaly also port a lot of the cocos2d framework.

How is the speed compared to for example mousestate functions within glbasic etc... ?

Thanks and cheers,
Jespar
#15
By the way where is this ==>> REQUIRE "network.mm"

so the network.mm file, can't find it in xcode or somewhere, i'd like to know how it's accomplished.

Can anyone hand me this network.mm ?

Cheers,
Jespar.