PDA

View Full Version : Saving data to a file



gwartney
04-24-2016, 06:52 PM
So not sure how to not make this question so broad. But what iam having a hard time trying to come up with logic for is lets say i want to make a level editor. I take and drag my images ect around the screen and now iam ready to save them. What iam not understanding is what it is i would need to do in order to save the changes i made to a file to be loaded into level for latter on. Hopefully this isn't to broad of a question but if i could be pointed in the right direction it would be great thanks

gwartney
04-25-2016, 06:11 AM
So not sure how to not make this question so broad. But what iam having a hard time trying to come up with logic for is lets say i want to make a level editor. I take and drag my images ect around the screen and now iam ready to save them. What iam not understanding is what it is i would need to do in order to save the changes i made to a file to be loaded into level for latter on. Hopefully this isn't to broad of a question but if i could be pointed in the right direction it would be great thanks

So I have been doing a lot of research into this topic as its really broad. And i think i have come to a understanding of what i would need to do. So if iam right i would use serialize save my specific object data aka position of sprites on the screen ect and then take and save that information out to a xml or other file format to latter on be read back into the editor? am i on the right track? Obviously there is alot more behind the editor but i think my idea is on track.

GClements
04-25-2016, 06:18 AM
Hopefully this isn't to broad of a question
It's not that it's broad, it just has absolutely nothing to do with OpenGL, which is a rendering library.

gwartney
04-25-2016, 09:06 AM
yea that is true all i was trying to see was how to take the data from opengl and save it to a file format. Which i was asking on here because i wasn't sure if this was the place i should be asking or not. So i do apologize for that i will ask on a different forum.

GClements
04-25-2016, 10:05 AM
yea that is true all i was trying to see was how to take the data from opengl and save it
You don't take the data from OpenGL. At most, you might save the data which you pass to OpenGL, but it's more likely that there would be some amount of processing between the data you'd use for modelling and the data you'd pass to OpenGL.