Okay, my questions.
Displaying 1-7 of 7 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
CypherAlmasy

I'm just gonna throw these out. . . feel free to respond to one, many, all or none, at your leisure.

1) I've asked similar questions in the past, but that was a long time ago and I never got it to work anyway. Here it is: I want to get a portion of the screen via GrabRegion() and save it into some sort of image file that can be easily loaded an manipulated; this would be a nifty little thing to add to savegames a la Baldur's Gate, where not only does it show you some general information on the characters/party when you load, but also shows a picture of your party and surroundings. Now, I'm pretty sure that someone (I can't remember who for sure, though I think it was Hatchet) said that it could be saved as a RAW, but I don't think I ever got that to work. . .it was a while ago though. Whether or not I did, I don't think it would work because LoadImage only works with PCX, BMP, and GIF images. What I'd really like to do is be able to save a screenshot as a PCX or one of the other valid Verge image formats so that I can easily scale/blit the image on some sort of load game screen. Any ideas?

2)I'm planning on using datfiles for character/monster stats in my game, similar to the way V1 had *.dat files for every PC. I don't want the files to be in text, though, because it would be far too easy to open and edit the data (pretty much inviting hacks for any of the characters). I've toyed around with the idea of using fwritequad, but when I get to string data this gets slightly complicated. I was thinking that I could use some sort of loop to store every character in an array (string[255]), and then using another loop to write each character in the array to the file with fwritebyte, presuming it would convert the character to it's ASCII representation. Would this work? If not, is there some better way I could look at?

3) The Silhouette function isn't working in my code; the engine crashes whenever it's encountered. I'm using WinV2, final release. Is this my fault, or is the function just not working?

4) Having trouble loading sound samples. As far as I know, all of my sounds are 8-bit mono, sampled at 22Khz in PCM format, but it will load some and not others. Is there something else I'm missing?

5) There's some sort of variable group that holds the dimensions (in tiles) of the current map, but I can't remember what it is and the docs don't mention it at all. Does anyone know what this var is?

6) Who put the bop in the bop shoo bop shoo bop?

Thanks.

CypherAlmasy



"If it weren't for my horse (as in giddyup, giddyup, let's go), I wouldn't have spent that year in college (a degree granting institution)." -Lewis Black

Posted on 2002-05-20 04:26:00

CypherAlmasy

7) I want to have my entities completely visible whenever possible, and in order to do that I was trying to figure out a way to have the characters enveloped in a "transparency bubble," so that wherever they went there would be a circle around them and they'd be visible. I think Square and Capcom did something like it in either FF5 or BOF2, though I can't remember if it was both or even either. I have no idea how to do this, though, because the only way I can think of doing it would be some code in a HookRetraced script, but I don't think code can be used to draw "on" a layer and blot out the tiles, not to mention that my own particular HR script has to be drawn on top of everything, since that's what I'm using for mouse control, etc. Any ideas?

Thanks.

CypherAlmasy



"If it weren't for my horse (as in giddyup, giddyup, let's go), I wouldn't have spent that year in college (a degree granting institution)." -Lewis Black

Posted on 2002-05-20 04:49:14

Mythril

1. Well, if space is not a problem when saving the image, you can save it as raw, and then load it as raw. (Don't use loadimage(), just use the standard file functions to load it in the same way as you save the file. In other words, save and load the image byte for byte.)

2. You could try simple encryption. You can skew the numbers and the texts ascii values by a preset amount, and then store as bytes or words. (Text may be hard if you have variating name lengths, but you can probably just add spaces in front of the shorter names?) Also you can mix the numbers in with the names. Or you can make calculate a check-id from the saved data, and save it with the rest of the data. When you load, you can calculate that check-id again and check with the stored one. And if it's not right, you'll know that the savefile has been tampered with. Lots of options.

3. WinV2 doesn't support silhouette.

4. Sound has always been problematic with WinV2. Try using Cooledit to save the sounds, it seems that most other programs make wav-files that isn't compatible with Verge...

5. map_width and map_height, I think, but I'm not entirely sure.

7. You can change the renderstring! If you have the 'R'-layer over all the others (R is the rightmost character in your renderstring), then you can in your hookretraced function do something like this:

SetRenderString( "E" );
// and if necessary, to show only some of the sprites
SetClipRect(x1,y1,x2,y2);
Render();
RestoreRenderSettings();
SetRenderString( RENDERSTRING );

Where RENDERSTRING is the normal renderstring you use. I did something like this in the battle demo I made for the Verge compo thingy. You can get it off tVS. (http://www.vergesource.com)

Hmm, that should be it, I think.



Spoon.

Posted on 2002-05-20 15:54:00

CypherAlmasy

Thanks for your help. I'm DLing CoolEdit right now, and I'm planning on doing the picture script later tonight. However, I'm confused by your answer to question 7 (on the entity circles). I don't think I quite understand . . . I went to tVS and downloaded what (I hope) is the right demo, something on magic effects. I can't get it to work, (nothing happens when I press any of the buttons) though I can kinda see what you did in the code. My renderstring right now is pretty simple; 1E2R. If I set the renderstring to just E, does it draw on the same level as the ents? If I draw a transparent circle on the ent layer, will it make everything above it transparent? Could I also set the renderstring to 2, draw a circle on the the layer, and have it be transparent? I'm not sure if that makes any sense or not. If possible, a more detailed explanation would be much appreciated. Also, thanks very much for your help with the other matters.

CypherAlmasy



"If it weren't for my horse (as in giddyup, giddyup, let's go), I wouldn't have spent that year in college (a degree granting institution)." -Lewis Black

Posted on 2002-05-20 21:42:17

Mythril

That code I gave you would draw the entities on top of all layers, because if you set the RenderString to "E", and then do Render(), then the engine would draw the renderstring (which is set to E) on top of what is already drawn. If you want to include part of layer 1 too, you can set the renderstring to "1E", and use that SetClipRect() code to limit what part of the map which is drawn.
If you really want transparency, you can use SetRenderDest() to draw the second layer to an image buffer, then use restorerendersettings() to return rendering to the videobuffer, and use setlucent() to have lucency on, and then blit the image buffer that you used to store layer 2.
Just try out the code I gave in the previous post. Trying and failing is the best way to learn coding. I will not provide you with the exact code for doing things. =D But look in vergec.txt to get a short description of the functions I mentioned.



Spoon.

Posted on 2002-05-21 07:04:02

CypherAlmasy

This post has two purposes: I'm trying to organize my thoughts and ask you if what I'm thinking is correct. :-) Thanks for all of your help so far. Oh, and by the way, the screenshot script worked great. Thanks for your help with that, too.

Okay, in my code I use SetRenderDest() to set the render destination to a buffer, set the render string to 2, use Render() to get layer 2 in the buffer and draw what I need to to the buffer. After that, I use RestoreRenderSettings and blit the 2nd layer. Is that the general gist of it? If not, let me know. I'm gonna go try it right now.

CypherAlmasy



"If it weren't for my horse (as in giddyup, giddyup, let's go), I wouldn't have spent that year in college (a degree granting institution)." -Lewis Black

Posted on 2002-05-21 17:26:07

CypherAlmasy

Yay!



"If it weren't for my horse (as in giddyup, giddyup, let's go), I wouldn't have spent that year in college (a degree granting institution)." -Lewis Black

Posted on 2002-05-21 17:42:06


Displaying 1-7 of 7 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.