Author Topic: richtige PND erstellen mit GLBasic?  (Read 5502 times)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4207
    • View Profile
    • Portfolio
Re: richtige PND erstellen mit GLBasic?
« Reply #15 on: 2015-Mar-26 »
... I doubt your game uses anything that's only available in later versions of GLB, so there's no drawback. You can have two versions of GLB on the go without any obvious issues - I do...

Exactly, and in fact, that is another GLB feature.  ;)
I should look into it very soon me hopes.
Thanks for sharing!
 

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #16 on: 2015-Apr-02 »
Thx for the PND Creation Folder dummy Ian!

I have trouble with the PND creation though.
It seems as soon the PND tries to write data it crashes back to the desktop.

Also which folder should the info src point to?
/mnt/utmp/ReggieWorld/readme.txt is not found when trying to open the documentation on the Pandora.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4147
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: richtige PND erstellen mit GLBasic?
« Reply #17 on: 2015-Apr-02 »
Quote
It seems as soon the PND tries to write data it crashes back to the desktop.
That's probably because you've not set the save/load directory properly.

At the start of your program, ensure you use -
Code: GLBasic [Select]
GLOBAL fileinfo$=PLATFORMINFO$("DOCUMENTS")
 

Then in your save function use something like this -

Code: GLBasic [Select]

LOCAL file$=fileinfo$+"/Reggie.sav"

OPENFILE (1,file$,FALSE)

 ...
 ...
 
CLOSEFILE 1
 


Info source?

If you just mean the "ReadMe" to see instructions from the Pandora menus, then the dummy folder should have that in already - just change my ReadMe for yours.
I came. I saw. I played.

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #18 on: 2015-Apr-02 »
I am a bit confused here,

the GLBasic pandora exe pnd automatically created files in the appdata/companyname/gamename.
It autodetected, wether the file is in the appdata folder or in its media folder.
Does that mean I have to check for each file that can be updated by the game when loading, If its in the pnds media folder or in the Directory given by PLATFORMINFO$("DOCUMENTS")?

Is it possible that the PND, at first startUp, extracts a copy of the Media folder inside and places it in the appdata/gamename folder?
I also want people to replace graphics etc. in the game, that would make it much easier.


« Last Edit: 2015-Apr-02 by nabz32 »

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4147
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: richtige PND erstellen mit GLBasic?
« Reply #19 on: 2015-Apr-02 »
The game automatically creates a folder to save data in - this is what the PLATFORMINFO$ is referring to.

In-Game data is loaded from within the .PND and NOT from the save directory.

You can allow people to replace gfx etc, but you'd have to tell the game to look in the appdata folder, rather than the .PND Media folder.

Copying over the Media folder shouldn't be too problematic, but it's not something I've ever tried to do.
I came. I saw. I played.

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #20 on: 2015-Apr-02 »
Thx for the clarification Ian.

I am worried how to switch back to the PND directory after switching to the "Documents" folder.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4147
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: richtige PND erstellen mit GLBasic?
« Reply #21 on: 2015-Apr-02 »
Why do you need to switch?

In any case what you can do is use something like this at the start of your code-

Code: GLBasic [Select]
SETCURRENTDIR("Media") // go to media files

GLOBAL dir$=GETCURRENTDIR$()
 

This gets the path for the Media folder.

If you switch to another folder you can switch back by using-
Code: GLBasic [Select]
SETCURRENTDIR(dir$)
 


:)
I came. I saw. I played.

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #22 on: 2015-Apr-02 »
wow what an incredible nice solution to this.
Thank you very much Ian, i will update my code accordingly
and post my results.