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

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
richtige PND erstellen mit GLBasic?
« on: 2015-Mar-24 »
Hallo,

ich bin kurz davor den ersten Beta Test von Reggie World zu starten,
habe leider keine Ahnung wie ich eine fertige PND erstelle.

Im Momment läufts nur, wenn ich die PandoraEXE.pnd zusammen mit dem Media Verzeichniss zusammen
in zB. den Desktop Ordner der Pandora verschiebe.

Es ist ja auch noch eine PND mit dem Projektnamen in einem vorgelagerten Ordner vorhanden, kann man die irgendwie verwenden?

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #1 on: 2015-Mar-24 »
Mir ist auch noch was eingefallen, dass ich brauchen könnte,

kann man Systemspezifische Kommandos in GLBasic schreiben,
zB. Platform = Pandora -> loadKeyCnfg("PandoraDefault")
Platform = PC ->  loadKeyCnfg("PCDefault")?

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4141
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: richtige PND erstellen mit GLBasic?
« Reply #2 on: 2015-Mar-25 »
The .PND that GLB creates is not a standard Pandora .PND. The full .PND is like a zip folder containing the executable file, screenshots, a runnable script, a PXML file (which needs valid information, including file name, version, etc. etc. The file also contains a ReadMe and an icon.

I can create a proper working .PND for you if you like. Or provide the tools for you to do it yourself.I'm at work now, so it will have to wait until tomorrow, but PM me and I can provide you with PNDTools and/or an empty .PND "shell" for you to populate (I'll provide instructions). It's easy once you know how, but still takes a couple of minutes.

As for format specifics, yes you can. At the start of your code use PLATFORMINFO$("DEVICE") to identify the current format and use this information to configure keys etc.
I came. I saw. I played.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3587
    • View Profile
    • Space Fractal
Re: richtige PND erstellen mit GLBasic?
« Reply #3 on: 2015-Mar-25 »
Ian, can you give the tools and instructions how compiling them currently?
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline D2O

  • Prof. Inline
  • *****
  • Posts: 1061
    • View Profile
    • http://www.deuteriumoxid.com
Re: richtige PND erstellen mit GLBasic?
« Reply #4 on: 2015-Mar-25 »
Hi nabz32,

Code: GLBasic [Select]
PLATFORMINFO$()
sollte Dir eigentlich weiterhelfen.
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #5 on: 2015-Mar-25 »
@D2O

Danke, das war genau das was ich gesucht habe.
Nun muss ich nicht mehr Pandora bzw. PC spezifisches auskommentieren.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4168
    • View Profile
    • Portfolio
Re: richtige PND erstellen mit GLBasic?
« Reply #6 on: 2015-Mar-25 »
Mir ist auch noch was eingefallen, dass ich brauchen könnte,

kann man Systemspezifische Kommandos in GLBasic schreiben,
zB. Platform = Pandora -> loadKeyCnfg("PandoraDefault")
Platform = PC ->  loadKeyCnfg("PCDefault")?

In my case, I don´t need the code to autodetect platform, I just create a variable and set it up on program start before compiling, like:
comp=0 (caanoo)
comp=1 (pc/mac)
comp=2 (pandora)
etc.

My code make changes to the game according to the target computer, like touch controls, screen borders, object limits and fade effects.

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #7 on: 2015-Mar-25 »
that is also a good solution erico. ( Why didn´t I think of that before? )
But Platforminfo$ just fits perfectly for my purpose,
ie. the save / load keys function just takes the Platforminfo$ string and adds ".kcnfg" to it to write or read the
configuration.
Of course you could set a platform$ string according to the comp variable also.

I still wonder why the fully packed PND GLBasic generates won´t work on the Pandora,
all the informations seem to be in the XML already and it seems everything is packed in it allready ( size wise ).

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: richtige PND erstellen mit GLBasic?
« Reply #8 on: 2015-Mar-25 »
Nun muss ich nicht mehr Pandora bzw. PC spezifisches auskommentieren.
Müsstest du auch ohne PLATFORMINFO$ nicht, für Plattform-spezifischen Code gibt es den Präcompiler, bspw. ?IFDEF WINDOWS etc. Das hat übrigens den Vorteil, dass die Unterscheidung bereits zur Kompilierzeit abläuft und nicht benötigter Code erst gar nicht in die Executable integriert wird (=schneller), während die Verwendung von PLATFORMINFO$ zur Laufzeit erfolgen würde.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4141
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: richtige PND erstellen mit GLBasic?
« Reply #9 on: 2015-Mar-25 »
Quote
Danke, das war genau das was ich gesucht habe.
Nun muss ich nicht mehr Pandora bzw. PC spezifisches auskommentieren.

Quote
I still wonder why the fully packed PND GLBasic generates won´t work on the Pandora,
all the informations seem to be in the XML already and it seems everything is packed in it allready ( size wise ).

Did you not read my post AT ALL? I answered both of those questions.   ::)  :x
I came. I saw. I played.

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: richtige PND erstellen mit GLBasic?
« Reply #10 on: 2015-Mar-25 »
sorry, I missed your post while reading enricos.
PMed you

@ Kanonet:
Wäre wohl besser das im Präcompiler zu machen, danke

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4141
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: richtige PND erstellen mit GLBasic?
« Reply #11 on: 2015-Mar-25 »
Here are both files that you will need -

YOUR_GAME_NAME is the "shell" of everything that your .PND will require. Make sure you read all of the ReadMe's in each folder and follow them exactly, as not doing so could cause you issues.

PNDTools is the drag & drop .PND creation system. It needs ALL the files that I have produced in the YOUR_GAME_NAME to ensure your game is created in a proper .PND format.


When the instructions ask you ro replace things, use the exact and actual name of your game (and your details) - don't use "YOUR_GAME_NAME" - and don't leave my email address in there either - I'm not going to give support to someone else's game! :p

If you have any issues, then let me know.
I came. I saw. I played.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3587
    • View Profile
    • Space Fractal
Re: richtige PND erstellen mit GLBasic?
« Reply #12 on: 2015-Mar-25 »
Im cant unzip PNDTools and that tool should have been include in glbasic really (if possible due the license its may uses?)

But im have im have quick looked about "YOUR GAME NAME".

Im thinks the prepare thing can been dore more easier by a little blitzmax tool (in same maner im did with xCode and Android, im perfer BlitzMax here) and replacing "makeapp.exe", but rename that to "Makeapp2.exe", so its can launch that first from the blitzmax app, but then its ran perfere the required bits after that (etc telling how to do directly in output).

But im dont thinks its really that hard at all when first understand it.


« Last Edit: 2015-Mar-26 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4168
    • View Profile
    • Portfolio
Re: richtige PND erstellen mit GLBasic?
« Reply #13 on: 2015-Mar-26 »
I´m interested in that too Ian, thanks for the tools+instructions, will check it out.
But in my case I believe virtual screen is broken on pandora?
It will be a while till I can give it a go again. :(

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4141
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: richtige PND erstellen mit GLBasic?
« Reply #14 on: 2015-Mar-26 »
Quote
But in my case I believe virtual screen is broken on pandora?
Virtual screen works perfectly well in v10.XX of GLBasic, so use that to compile the required .PND file (as mentioned GLB creates two .PND files - the only one we need to use is the pandora.pnd.exe (or whatever it's called - I can't check right now)). It definitely works, as my Christmas Advent Calendar puzzle game used it successfully on Pandora. 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.

SpaceFractal - there might have been a problem with my upload of the PNDTools.zip. I'm at work now, but will upload it again tomorrow. Or you can grab a much more recent version from the Pandora site. The old one works perfectly for me, so I didn't bother updating.

With everything I've included in the YOUR_GAME_NAME folder, there really isn't much work required - it's just a simple cut & paste of text in a few areas. Nothing complex. Once you've got it working once, it's a doddle really.
I came. I saw. I played.