Suggestion for AGS...

Started by Gregjazz, Sun 12/10/2003 21:22:16

Previous topic - Next topic

Gregjazz

Well, here goes:

A function that would return the color of a specified pixel on the screen.

That way you could make those little save game snapshots and other cool stuff like that.

Thanks,

Geoffkhan

a-v-o

I haven't found anything like RawGetColor (only RawSetColor) in the help file, so I don't think there is such a function.

There is this SaveScreenShot function. With file i/o functions maybe you can do what you want.

Or you write a plugin.

Pumaman

Hmm, I'll consider a RawGetColor function, but it would probably be easier if I just implemented screenshot support for save games; which is on my to-do list and I will get round to it at some point, honest ;)

Gregjazz

I'm assuming that when you refer to "screenshot support for save games" it would be somewhat like the text description that is attached to a savegame.

The screenshot support for save games is nice, but with my idea, you could do more stuff than that. It's a bit more general.

I dunno, actually, I think the screenshot support would be better. It's easier to use than a RawGetColor function.

Gilbert

Hmmm I think that's been discussed before, but if such a function is added, we may invest on ways to handle things in hires games. For example in a 640x480 game the internal game res is just 320x240, so in position say (50,50) there are actually 4 screen pixels...

Gregjazz

Yeah, I know. Screen coordinates. I wish the screen coordinates would match the resolution. Maybe if we beg CJ enough...

Gilbert

In that case, you must script carefully in the game, and check the resolution the game is being run in for adjustments, since it's quite normal that people playing your game won't use your desired resolution (eg, playing a 640 game in 320 res or vice versa).

Actually I'm also interested in whether we can have functions to raw paint on sprites, we can have functions like:
RawSetSpritePixel(int sprnum,int colour,x,y)
(Of course it would also be cool if there're line, etc functions for it.)
This would be useful in many ways (one being painting your own portrait, like in some RPG games, etc.).

Note this is not a request, just a suggestion, as it's not important for me, and AGS is powerful enough in many aspect already, and I can see there may be some obstacles in implementing (eg. you may need to alter save game format to include altered sprite data, maybe to keep things organized, just add a checkbox function to the sprite editor, with which a sprite can be edited in game if checked, so it'sdata would be saved to a save game, etc.).

Gregjazz

You know what would be really cool:

LoadImage (string filename, int slot);

This would load a image into a specified slot. Are you hip to this idea?

Oh, and maybe you could have some general image editing commands, like "crop image" and stuff like that.

Pumaman

Allowing scripts to work in screen co-ordinates throws up a lot of issues, which would be rather complex to solve - to be honest, not something that will happen in AGS 2.

QuoteActually I'm also interested in whether we can have functions to raw paint on sprites, we can have functions like:
RawSetSpritePixel(int sprnum,int colour,x,y)

Apart from the reasons you mentioned, this would be problematic due to the sprite cache, which dynamically loads and discards sprites during the game - this would mean that the sprite had to be written out to disk every time it got discarded, which would incur performance problems.
I don't really see this as a viable feature.

QuoteYou know what would be really cool:

LoadImage (string filename, int slot);

This would load a image into a specified slot. Are you hip to this idea?

This is more possible, and a variant of this may well be the way savegame screenshots are implemented. Watch this space.


Gregjazz

I don't really care too much about the raw painting on sprites. And I am fine with the screen coordinates versus resolution deal. But to have a function like "LoadImage (string filename, int slot)" would be pretty cool. I would definitely use it.

SMF spam blocked by CleanTalk