Golden Sun Hacking Community

General Hacking => Assets & Discussion => Coding => Topic started by: Lord Wolfram on 19, June, 2017, 09:37:43 AM

Title: Image transforming
Post by: Lord Wolfram on 19, June, 2017, 09:37:43 AM
So the other day I was talking with my Programming teacher and an idea came in my mind.
"Let's load image in game from the game's code."
So the idea follows - We take the image's data and transform it into HEX code. Then we write an array of each hex value for the image, then we load the image from Array into the game and we have our sprite.
Title: Re: Image transforming
Post by: Salanewt on 19, June, 2017, 10:11:22 AM
Wait, so we load an image and then save the image to the game again?
Title: Re: Image transforming
Post by: Lord Wolfram on 19, June, 2017, 10:13:01 AM
Quote from: Dendrophiliafish_the_skull_licker_xxXXDx101XyeahbabyyeahxxXX on 19, June, 2017, 10:11:22 AM
Wait, so we load an image and then save the image to the game again?
Idea is that we don't have to have the image, we just have the HEX data of the image in game's code
Title: Re: Image transforming
Post by: Salanewt on 19, June, 2017, 10:16:48 AM
It sounds like a cool idea, though I'm afraid I am still lost on the reason for doing this. Would you mind elaborating a bit?
Title: Re: Image transforming
Post by: Lord Wolfram on 19, June, 2017, 10:25:31 AM
Quote from: Dendrophiliafish_the_skull_licker_xxXXDx101XyeahbabyyeahxxXX on 19, June, 2017, 10:16:48 AM
It sounds like a cool idea, though I'm afraid I am still lost on the reason for doing this. Would you mind elaborating a bit?
I just came up with such idea, well some engines do not compress images etc. and hackers can easier MOD the game. This way they don't, AND if they were to edit your code, they would have to recompile it, and you can add uncompleted code there, which at first does nothing but serves as the defense system of the game, and we can punish the players for hacking
Title: Re: Image transforming
Post by: Daddy Poi's Oily Gorillas on 19, June, 2017, 10:43:19 AM
@ 1st post:  Yep. I do believe that is the way you do it.

@ Last post: I see it more as a way for hiding information / decluttering the user experience rather than anti-hack, but okay. (Maybe anti-hack for the inexperienced, though...) Closest I can think of to anti-hacking is a server+client approach that requires an internet connection. Any sensitive data (e.g. Save data) could stay on the server. (That being the server isn't on the player's machine, but the client connects to it.) But of course... if one is going to build a server+client thing... then there's the possible issue of DDOS and such... so, eh. It's never that simple.

Anyway... the client should only send input data like mouse clicks and keyboard presses... and receive image data/audio data.... in best case circumstances... but that's probably a lot of data, though... (graphics/audio), so probably not recommended. But if it was done... I recommend a small resolution (e.g. 240x160=0x9600 pixels)that could possibly be zoomed in to full screen. (So less data is sent across the internet than otherwise.) As for music... I'd say just send the audio file over to the user... As people will probably document it anyway. And less internet traffic=better.)
@My idea:  I can see its potential for a 4-player game, maybe... but a large MMO, probably not. - In that case, image caching would be the way to go, most likely.
Title: Re: Image transforming
Post by: Lord Wolfram on 19, June, 2017, 01:32:23 PM
Quote from: Fox on 19, June, 2017, 10:43:19 AM
@ Last post: I see it more as a way for hiding information / decluttering the user experience rather than anti-hack, but okay. (Maybe anti-hack for the inexperienced, though...)

It's more of like a message, don't mess with this engine, I don't like what you're doing, I.E. Easter egg.
Title: Re: Image transforming
Post by: Salanewt on 19, June, 2017, 01:43:43 PM
Wait, so you want the potential for a hacking community dedicated to hacking the game to make it harder to hack the game? :o

Or do you mean in general, like as a security feature for other games or sites?
Title: Re: Image transforming
Post by: Daddy Poi's Oily Gorillas on 19, June, 2017, 02:50:12 PM
A message? Might as well spell out to them.... that you are the copyright holder/etc.

But anyway... in the situation where a program is not open-sourced... data/images that are stored outside the program can still be checked against a checksum/signature type thing... if they need not be edited by a user. If editing was the main concern and not necessarily exposure/etc. But that's more me just speaking of an alternative. (That is definitely not foolproof. But then again, neither method is.)

Now I wonder if it is possible to encrypt a file using certain built-in techniques... and make it so one's own program can decrypt it... but only into RAM. (Without actually grabbing any encryption related code yourself.)
Title: Re: Image transforming
Post by: Luna_blade on 19, June, 2017, 11:32:04 PM
Okay pretty nice.
But what kind of format are you going to use? I guess that would be the first step in this problem.

Now that I think about it, you might only need to specify a width for the image and then simply just load RGB values, which makes an extremely easy format.