Quote: "Sounds like you guys need to agree on a standard methodology."
And thats why i wrote our own auto image load id.
Wherever the command is called so does all images get ids in sequence.
1-1000
Agks own auto id starts at 10000-
And all subimages also grabb a id when created.
We have alot of subimage calls where we replace subimages on 3d objects.
sometimes did i only neaded to simply replace an image with the same id or get a new one.
This is because we sometimes change a parent object or clone Another object.
While using agks auto id so whas we forced to keep an track off the image ids with globals to delete them manually or use the delete all image command.
And agk delete all even deletes all images used by virtual buttons and such.
And if you would replace an image id that agk use internally by mistake so will your app crash when agk wants to use an virtual button or Another agk command that uses images etc.
Or simply display them with no image and crash later.
The image commands are good for smaller Projects and our Project is not small.
And untill all agk issues are solved so have i bin Writing my own workarounds.
There is no sader thing then spending 2-4 Days trying to solve a bug and find that its an agk bug and not your code.
Here is how we now load all images and the sample is for subimages.
IMG_Door = SK_SUBIMAGE__LOAD_( MainTexture , "door1.png" )
As you see do i mimic agks own command but get auto ids starting with 1.
and i can keep simple imag usage checks by simply print(SK_IMAGE__COUNT)
And now when i have replaced all agk image load commands so did we both use auto ids and agk still crashed after that,so probably a good thing i wrote my own temporary auto image id.
The problem with large Projects is that you get alot of media and the simpliest way would be that all starts from 1 for when deleting them.
The app crashes where probably simply that we used an id used by agk itself that made it crash?
Quote: "I can't see why anyone would want to manually control object IDs when the system can handle it for you already."
Or your own function
Ps...
the SK in the command starts is for our Engine name
SpaceKitten.
And here is how simple i Clean all our own media without deleting agk internall media to avoid crashes.
REM // Used to make a clean image media cleanup //////////
Function SK_IMAGE__DELETE_ALL_()
img=0
while doThis=0
inc img
if GetImageExists(img) then DeleteImage(img)
if SK_IMAGE__COUNT=<img
SK_IMAGE__COUNT=0
exit
endif
endwhile
Endfunction
Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz