Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Could someone help with atlas images for a skybox?

Author
Message
Karna
14
Years of Service
User Offline
Joined: 22nd Jan 2010
Location: American Left Coast
Posted: 28th Feb 2018 21:57
I'm using AGK2 to write a nautical 3D simulation. I coded with GDK Tier 2 in the past, and love things like integrated physics and gravity!

I'm struggling a bit with atlas indexes for my skybox. I got a skybox image that I am using as an atlas image. I whenever I try to load a subimage, the code runs but I get the whole atlas image instead.

Here is my subimages.txt:



I load the atlas image with:

and I try to set a subimage with:


The code woks well with individual image files, but goes wrong when I try to change to an index image. I'm fine with cutting the index up manually, but I'd like to know what I'm doing wrong for the future.

Does anyone see how I can make this work?

Thanks!
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 2nd Mar 2018 21:47
I believe you need to give each loaded subimage its own id. So you need to write:


501 is the id of the sub-image
500 is the id of the parent image

Or you can go with:



Hope this helps.
Hover Car Race Challenge! - available now on Google Play
Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB
Karna
14
Years of Service
User Offline
Joined: 22nd Jan 2010
Location: American Left Coast
Posted: 3rd Mar 2018 00:20
Thank you! I'll try that!

I had thought that I could do that in-line:



...but that didn't work too well. I'll try to do each explicitly, like you suggest.

Login to post a reply

Server time is: 2024-04-18 06:46:34
Your offset time is: 2024-04-18 06:46:34