Compiling Android version with a .pak

O Ilusionista

Captain 100K
Its possible to complie the Android version with a .pak inside, so the user doesn't needs to copy the file to the specific folder?

Plus, can I change the default icon?
 
I am sorry for all the posts I am just really excited about getting commercial games on android and now it is so close I can taste it. Here is a update report:
  • I have successfully modified the source code to accept a custom directory.
  • I have found out how to rename your mod (from default openbor)
  • [font=verdana, arial, helvetica, sans-serif]pak files load from the custom directory.[/font]
  • [font=verdana, arial, helvetica, sans-serif]all output files write to custom directory (saves, cfg, log, script log and screenshots)[/font]
[font=verdana, arial, helvetica, sans-serif]This sounds like simple stuff but I cant really code C/SDL had to do a bit of reading up to figure out what I was doing wrong.  My mission is not finished here is my to do list:[/font]
  • [font=verdana, arial, helvetica, sans-serif]get code to modify all directory strings based on once source but still keep source code working the way it should.[/font]
  • [font=verdana, arial, helvetica, sans-serif]get mod copy code to work from assets folder[/font]
[font=verdana, arial, helvetica, sans-serif]I hope to report back soon ![/font]

[font=verdana, arial, helvetica, sans-serif]on a side note I think rocket viper 2 no longer works on android 7.0 but the latest openbor does so take that volcanic![/font]
 
Just as a update after countless hours of staring at the source code hoping it would pop out of the screen and tell me what it is doing.  I have tried several methods described on the internet as ways to copy files from the apk to internal storage.  I am sad to report all methods are not working maybe I need to import certain libraries that are not documented or the code is not right.  I feel like I am smacking my head against a brick wall but I refuse to give up I will get this working and we will be making commercial games on Android . . . some time this year . . . I hope . . . maybe.


If anyone finds any good detailed tutorials on how to copy assets from the res/raw directory to external storage please post up links for me. Until then I will keep trying and testing (oh my eyes hurt)!
 
what your goal is exactly? Installing on sd card or ? Isnt it better to create totally separate installer for PAK files ?
Even simplest one would be good, place pak file in paks directory or browse to directory when installing to choose where to install.You shouldnt just install every mod with openbor apk itself.
 
My goal is to have a single apk that will install to a custom directory and copy the pak file so the game is ready to play (like rocket viper 2).

This means multiple openbor mods can be installed on one android device and they will each have their own app name and icons.  Right now each time you install openbor it overwrites the last version and all paks are in 1 folder.

This is a huge step for the engine.  To be able to make apps on google play made with openbor.  Why am I the only one hyped about this ?


Edit: for now the internal sd card is the target location.
 
This means multiple openbor mods can be installed on one android device and they will each have their own app name and icons.  Right now each time you install openbor it overwrites the last version and all paks are in 1 folder.

This is a huge step for the engine.  To be able to make apps on google play made with openbor.  Why am I the only one hyped about this ?

Now that you have explained, I am hyped too. :)
 
I am hyped for this too , what would be even greater is having ability to include ads in games , but im not sure how it would go with openbor license, technically making $ off games with original content made with openbor is OK ?
I think we should ask WDragon about this, im sure it would be very easy for him to do with his skillset.
 
WD is mostly about improving the core engine.  I am sure he could do a better job then me but I have wanted to develope for openbor and if nothing else i hope I can fix this.


Update: I can now compile a apk that installs itself openbor+pak file and it can have a custom folder.


Last thing to do is clean up the code so all the user has to do is set their package name add a pak file then compile.  But to do this I have to find out how export a string from java to c. I am also looking into a method that may allow pak files to be moved to external sd cards.
 
Well, so the only thing i wish would be possible is to embed ad when application runs and keep the game free on playstore,Maybe this would motivate people to make original games , even simple ones.
 
I play offline if they bother me, what i learned is android games are so pirated its better for devs to have free game with small not irritating ads if you want to make profit and well, it would be dream come true to have our original games pay off so we can grow bigger,Nothing to lose here.
O Ilu you sure it works like this with engines ? OpenBor is a bit different from other game engines,  thats something i would be very interested to explore.
 
Vou mean the developer thing?
Yes, OpenBor is a normal Android app, like any other. To publish it on Google Store,, you need an license (way less expensive then a IOS one).

https://developer.android.com/google/play/licensing/index.html

https://stackoverflow.com/questions/14070239/what-are-the-fees-to-develop-on-ios-android-and-wp
 
H i have it for over 2 years  ;D thats why im interested with custom installator and builtin ads , is it something youre into as well? I work as animator now but would love to create own project using openbor that could be like any other android games.
 
Considering your pak file would be exposed and anyone can copy it. Openbor games would be easy to pirated so a small price tag or free with adverts sounds like a safer option.

Just tested with a 150MB pak file and it installed worked just fine but you were stuck on a plain black screen while the copy took place I will add a message to advise "please wait for first time setup" or something like that and I need to add a if statement to only copy if the pak file is not already in the destination folder.  I have chequed and 100MB is the current limit with optimisation all mods should be within that limit.


apk size information: https://developer.android.com/google/play/expansion-files.html

During compile the setup checks if there is a key to sign the apk I will try to find how this can be done during compilation process.

Future note: once this is all up and running we need a new video mode to display in portrait mode.  I have a idea of multiple touch modes that can be changed within openbor so basically moving the touchscreen buttons via script so you could have real touchscreen menus and touch screen games.
 
nope pak file is still read from internal storage but they are automatically copied over when you first run your app.

update: notification pops up now to advise users to wait for initial setup and file will only copy if there is no pak file in destination folder.
 
Back
Top Bottom