![]() |
Screen buffer
This was something that came to me while at work today. Basically, there would be a new command with parameters that does a screen capture like alt+2 but it keeps it in memory. Some of the parameters that could be used with it could capture just the level, the level with NPCs and showimgs on layers 1-3, and capturing the entire screen. The buffered image could be accessed by #p like those sent by a triggeraction.
For playerworlds that are of a modern theme this could be used in conjunction with showimg to make something of a video display for a camera security system (you'd want to do changeimgzoom with a factor less than 0.9). For other things it could be used for effects similar to the script Kaimetsu did for my Doragon Koden logo for those that have seen it. There would also, then, be the potential to somehow send the buffered image to a webpage where you could check out the game in a webcam-like view; sometimes a still picture is not enough ;) |
Would be invaluable for some awesome screen transition effects. ;)
I think video would be too difficult though |
Quote:
What I meant was that this feature would kind of stream the buffered screen to another place, say an inner level, where the image is displayed on something that looks like a monitor. |
Like a portal on Quake 3? (Probably other games too.)
|
Quote:
|
*pokes the thread with a stick*
|
NPC Code: In breif: Make your own parameters for the Camera. *cough*LAG*cough* For webpages.... It won't be possible... Well, it IS possible, but won't be happening, unless you put a life webcam on your computer, and have your guy constantly move, and send what your webcame shows. |
Quote:
|
I didn't check it. I don't use players[].# usually... When I do, I check if I got it down right. Didn't bother now.
|
Quote:
Really, all you'd need is a db NPC that randomly selects players online based upon playerindex. The NPC could 'track' the actions of the randomly selected player. Then it could be saved to the server's filespace and then access by the Graal main page much like it used to do for the player stats. It wouldn't be that hard :p Using multiple showimgs and whatnot slows down older computers. This would just take a window/screen snapshot and put it in memory until something else wrote over where its stored. Buffering the screen to memory could allow for certain transition effects seen in games like Final Fantasy. It would be kept client-side unless used with a dbNPC which could possibly store it on the server itself. To be honest, I suggested this in the first place because I wanted to do some nice screen transitions. Its kind of difficult to do that as of now. I only threw in the other things about it to make it more appealing and useful since I'm sure all of it is possible in some form or another. This is probably what the command(s) could look like: //Client-side command takesnap attrib; takes a snapshot of the playing window/screen and stores it in specified attribute #P() //Client-side/Server-side command takesnap2 playerindex,x,y,attrib; takes a snapshot of the specified playerindex with x and y being the frame size. Stored in #P() |
It is an intresting idea, and has potentual to be a good one, too. I think that the real problem is that images have a file size. The people with dialup would track you down and light you on fire if this were handled as you sugested.
Oh, and people still use dialup, if you had your doubts. Anyhow, my idea to making this better, would be to make it so the snapshot isn't captured as image data, but something a little similar to vecter graphics instead (no, I don't mean actual vecters, just continue to read). Now, I don't mean actual vectors (lest you're using polygons), but instead information only needed to recreate what is seen onscreen. For example, the level's tile data, and npc information to recreate what was onscreen... like level snapshots, but better. (I supose the vecter formats would be much like a gani's format, but with tiledata, etc). The command would look something like this: NPC Code:screencapture p1,p2; The first parameter would be the filename. The second parameter would be the layer (or layers, in the form of an array) it would capture... or a variable "all layers" or something that represents every screen layer. Other parameters could be things like the area of the level board you want to capture, rather than using the current screen area. Now, yes that solves the filesize problem, but it sure doesn't make it useable... this might, though... NPC Code:screenmake p1; The parameter would be the filename. This command would take the said "vecter" data and make it into an image. The actual conversion would happen clientside, even if the command was run serverside... that way the image can be sent in a more compact format, and then inflated into the person's webgifs folder. There is plenty of room for more parameters, like one to inflate it on the server's space so it can be used for a webserver or something. |
Quote:
I want it to be captured like a regular alt+2 screenshot but kept in memory rather than put on disk. This feature would have to be used clientside since dbNPCs are not made to deal with graphics. Just allowing something like savelog to save the image to the playerworld's filespace. And to inform, I am cursed with dialup :p I don't need any silly lectures. |
It is planned to be integrated into v3.1 sometime, also a command to send a buffer to the server (would be limited in file size / how often you can send it though)
|
Quote:
|
| All times are GMT +2. The time now is 09:45 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.