News:

*NEW* Current Version on STEAM16.793

Webchat:
Visit the chat



V7

Previous topic - Next topic

Kitty Hello

GEN is generate like the OpenGL commands: glGenTexture...

Hemlos

I code based on identities indexed sequentially with sprites id's

So


Campfire=Emitter_Create()
EntityPlayerID=1
loadsprite "Player.png",EntityPlayerID

Much easier to remember than a number obviously.
This is what is neccesary for creating an entity infrastructure.
Bing ChatGpt is pretty smart :O

Moru

I've been using something like this:

Code (glbasic) Select

ball_id = LoadSprite("ball.png")
DRAWSPRITE ball_id, 50, 50

FUNCTION LoadSprite: File$
    STATIC id%

    INC id, 1
    LOADSPRITE File$, id
    RETURN id
ENDFUNCTION


This new command will make it a lot smoother since sprites and anims share the index number.

Hemlos

#18
Quote from: Moru on 2009-Jul-22

This new command will make it a lot smoother since sprites and anims share the index number.

I like it, i will use it with my PS for sure...it works the same exact way...calling an emitter auto indexes the next image for a new emitter...using the loadsprite index, and a name stores the index.

hence, ball=Emitter_CreateSystem("ball.png")

So, using it will compliment the SpriteZ API im working on.

Revamped to work with the IDE naming conventions:

Code (Tested and Working, Auto Index images) Select

FUNCTION LOADIMAGE: File$
    STATIC id%

    INC id, 1
    LOADSPRITE File$, id
    RETURN id
ENDFUNCTION


Edit: Im probably going to alter it to be global, instead of static, in order to pass the identity to the emitter, and visa versa.
Bing ChatGpt is pretty smart :O

Hatonastick

Question about v7 and iPhone: Do we need a Mac to compile?

codegit

Quote from: Hatonastick on 2009-Jul-23
Question about v7 and iPhone: Do we need a Mac to compile?

I believe that you do have to have a Mac to compile for iPhone.
------------------------------------------
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

Kitty Hello

Yes, unfortunately. Someone told me it's possible to install OSX on an EEE-PC or an Acer Asprite One, though, which are very cheap.

I think about a software distribution service for iPhone as well, so you don't need one.

Hatonastick

#22
That's unfortunate.  A pity Apple wouldn't play ball.  Oh well, have to wait and see what the future holds.

Interesting idea Gernot, my only concern is it could be a lot of added work for you.  Especially if (and I can't see why it wont) the iPhone side of GLB takes off.  I'm continually impressed with the work you do on GLB mate.

Ian Price

Silly question, where is the V7 download? Is it the download on the front page? It states "Current version" but does that mean current stable version or bang upto date version?
I came. I saw. I played.

Ian Price

Cheers. I don't bother reading the shoutbox, so I missed it. You'd think something as important as that would hit the NEWS first ;)
I came. I saw. I played.

johngood

Hi,
This code works in 6.248

Dim grid%[24][24]
Local handle%, one%
Local mx, my, x, y




handle=OPENFILE(1,"GLBNew2.bdt",TRUE)
FOR y = 0 TO 21
  FOR x = 0 TO 21
  READBYTE handle,one
     IF CHR$(one) = 6
     mx = x
     my = y
     ENDIF
  NEXT
NEXT

But gives the following Error in 7.057

CALLBYNAME "GLB_ON_QUIT" *** failed ***
Error:
No file

Regards,
johngood.
Dell Dimension 9200: Core 2 Duo 2.40GHz, 2GB Ram, ATI Radeon X1300Pro, Windows XP Pro SP3
Intel Mac SnowLeopard 10.6.4 Core 2 Duo 2.4GHz 2GB Ram
iPod Touch 2G 4.0 16 GB, iPod Touch 4G 4.1 32 GB

Moru

The error is only a warning and you need to read the help-file about the .app dir that is created when compiling. All datafiles, images, sound and other files you are using in your program needs to move into that directory, then your code should work.

johngood

Sorry!  ;/

My understanding was that the .App directory was only for Mac related projects.

Regards,
johngood.
Dell Dimension 9200: Core 2 Duo 2.40GHz, 2GB Ram, ATI Radeon X1300Pro, Windows XP Pro SP3
Intel Mac SnowLeopard 10.6.4 Core 2 Duo 2.4GHz 2GB Ram
iPod Touch 2G 4.0 16 GB, iPod Touch 4G 4.1 32 GB

Hemlos

Quote from: Kitty Hello on 2009-Jul-22
GEN is generate like the OpenGL commands: glGenTexture...



Ahh i missed that new command set, I will rewrite my api using this GENSPRITE() structure....  :good:
Bing ChatGpt is pretty smart :O