Done how? And will it affect the transparency?Quote:
Originally posted by plenderj
You could smooth the image to blend pixels into one another
Printable View
Done how? And will it affect the transparency?Quote:
Originally posted by plenderj
You could smooth the image to blend pixels into one another
Well.Quote:
Originally posted by Arbiter
Done how? And will it affect the transparency?
My theory on how to do it.
You have your transparency colour. So never touch any pixels with that colour.
Having said that, you would then loop through each pixel in the image starting at 1 pixel in and one pixel down, and finishing, one pixel from the bottom right hand corner too.
You would then get the colour of the $current$ pixel, and get the average of the colour between it and the pixel $above$ or $below$ or whatever.
So that should then smooth out the image.
I'll code it once I have a slice of toast.
Oh and the thing I was writing for you, well it didn't really work.
I was writing something to compress the images for you and what not, but well in the end it just wasn't worth it because it took so long to extract the images it didn't make it viable.
Well, that smoothing is the common way of doing it, but it only seems to blur the image. I'm not a great fan of that to be honest...
And thanks for looking at that picture compressing thing. I also spent a couple of weeks trying to do something similar. I can up with a decent algorithm which worked well for the images, but it took so long to decompress is was useless for using in game. :rolleyes:
Oh well.
I'll have a fiddle with the smoothing algorithm.Quote:
Originally posted by Arbiter
Well, that smoothing is the common way of doing it, but it only seems to blur the image. I'm not a great fan of that to be honest...
And thanks for looking at that picture compressing thing. I also spent a couple of weeks trying to do something similar. I can up with a decent algorithm which worked well for the images, but it took so long to decompress is was useless for using in game. :rolleyes:
Oh well.
Look in my sig, at the thread "storing files in executables"
I was working off that base code.
There may also be other stuff you're interesting in there too...
we originally had the larger images stored and shrunk via stretchblit for the game, but strtchblit loses colour depth :(
Any suggestions, jamie?
Yeah, that's a point.
Stretchblt is being gay and splatting the colour depth.
The best place to see this happening is if you explore all the map and then go the world map screen, the colours are all bollockes.
If you could point us in the right direction to fix that then I'd love you forever.
I've just no idea what's causing it....
Well yeah StretchBlt makes a complete bollox of images I'm afraid.
I sincerely doubt Microsoft actually use it.
But there must be other ways around it
Though I might mention that you can use SetStretchBltMode() to increase the quality of the Stretching.
How's this ?
Actually this is better methinks.
If the colour change is big enough, then soften it, otherwise, do nothing.
This file also has the test image I've been using
Well.....
It's too slow and unfeasible really Plend... :(
The images are animated so it would have to be applied to every frame. As there can be 16 images on screen at once that's a bit of work involved and also the images change every 200ms. It's going to struggle on my P3-700. A P75 would just explode.
It needs to be quickly and one the fly, if at all.
PS - are you on MSN?
No, but I can be. Gimme a few minutes.Quote:
Originally posted by Arbiter
PS - are you on MSN?
Regarding your animations, why not prepare the images before hand, then apply to each frame, and then just run those modified frames ?
Right I'm [email protected]
Other then blurring/smoothing, I have no clue how you would fix the images. You may wish to attempt to find a photoshop filter to do this (check on limewire, morphus, or naspter[?])
You can use partal transperancy (i asked a quesion about using it and bitblt in the & graphics forum). This would involve more work, but could make the graphics look more realist. The worst part about doing this would be writting the code to create transparentcies (easy enough with a basic background color; or the increaced dl size due to masks).
Plend,
Got you added to my MSN list now. Prepare for some IM abuse... :D
Preparing the images beforehand would take too long as it would need to be done for all the buildings. That's 30 frames per building * however many buildings are in the script.
Grrr....
Gaming,
How would at partial transparency (alphablend?) help?
And Sentience creates the transparencies the first time it's ran (that what the updating core files is all about). Is that what you mean?
What I meant, was that all objects have a slight blurryness to them (around the edges), you could always make it so that the edges of the pictures use partial transperancy (using bitblt) to include this in the . Hence making the graphics look more realist. But it would make it so you problably couldn't create the masks on the fly (as you would need to use a gray-scale mask instead of b&w). Not being able to create the masks in the program would increase d/l size.
Well you could do it as part of that preperation you do when the game is run for the first time ?
Been thinking about a map marking thing, whereby you can annotate the map with comments and stuff. We can also create natural landmarks in the map maker and label them too...
Whaddya think?
IF you're big time fed up of buildings then you could give a thought to the images we'll need on the quick build screen.
The chassis ones can come from the chassis' you've done, but we'll need representative images for the mech class
Classes off the top of my head are:
Assault
Defense
Sniper
Suicide
Stealth
Scout
Not sure of the sizes yet, depends how many come up with.
Post back with more types/comments when you get chance...
I'm on a rampage today. I've handcuffed myself to the pc and I'm going to get as much done as humanly possible.
We're seriously lagging with Sentience now, we need to get some of our thoughts actually in the game and working, or we're just going to be wallowing at this point forever.
I'll post here later with some of the correlated stuff I've found - it might help inspire you.
Was with Microsoft all day so far.
So um yeah, a map maker.
Well that sounds interesting.
I think it would look good if someone else made one for it instead of you guys, would give an impression that your app is easy to work with etc.
Would it be easy to implement a map reading ability into sentience ?
Behemoth,
I'd like to place an order for some more buttons please...
All 145x25:
add to notes (on/off)
clear note (on/off)
clear all notes (on/off)
cancel note (on)
close screen (on)
Superifically slim!!! :)
Sorry I misread your post there, I thought you said a mad maker program :)
Anyway yeah I could make the map maker and the maps if you'd like.
Just send me the latest module from sentience that contains the structure of a map etc, or specs on it.
I could make it such that its recorded in a proprietary format first, and then its converted from the map maker format into sentience format. Therefore its just a case of updating the conversion algorithm instead of re-writing the entire application
I don't think a map-editor would be good, a full blown senanior/campain editor would be better (full unit control).
I wouldn't mind making it again, as I am getting awfully bored anymore...
In theory yes that would be a good idea but its starting off a little big don't you think ?
I think a simple map editor as a start would be better.
Then as ben gets the sentience code to a level of consistency for different aspects then editors could be made
Yes, I agree that it should start off as a map-editor, but it should be disgined with the idea of adding in the features of a senanior/campain editor from the beginning. Otherwise it would take too long to implement the features, and chances are that noone would bother doing it.
Well, I can resolve the issue about the scenario/campaign thing.
Sentience doesn't have scenarios or campaigns, in much the same way that Alpha Centauri doesn't.
There is a vague idea that we'll include triggers at some point, but that's a long way off and doesn't really tie in with the maps.
If you really want to write a map maker then I'll take care of the Sentience side of it, just let me know what format the maps are in...
Attached is the main code module (which contains all the global variable declarations). There's quite a few....
In there will be the details of what the map's made out of.
Each map square is given an ID created using IEB (Ian Encoded Binary).
The square in question is classed as the centre square out of nine, as below.
OOO
OXO
OOO
Each line is interrogated to produce a number, based on whether the square is bordered by sea or not. See below.
124
SLL
SLL
SSS
As we go off the middle square we work out its ID based on...
SLL = 6 (1+2+4)
SLL = 6 (2+4)
SSS = 0 (4)
ergo the middle squares ID is 660. The graphics for the square are in the graphics directory.
Easy.
Any further questions then feel free to ask.... :)
wish I hadn't asked now ;)
i'll have a look
you have no idea what you've let yourself in for..... :D
Interesting.
Hmmm. I'll have a look at that later.
Too bored to do anything right now ;)
Quote:
Originally posted by Arbiter
145x25:
add/update note (on/off)
clear note (on/off)
clear all notes (on/off)
cancel note (on)
close screen (on)
I wouldn't mind attempting the map editor again.
Maybe a joint effort?
I haven't returned the favour of you letting the ToW team know what your views are, so here I am to do so.
I think the IEB idea is excellent. Is it produced at run-time or before you play the game?
A map editor is a must if you plan not to have this game's novelty wear off after they've played it for the first time. However since you said there are no missions or campaigns, I'm a tad confused. Is everything just basically a "deathmatch" like in the Civ games on random maps?
If it is, cool :)
But remember that you can make special battles with the map editor, maybe as a training map or a fun map, very much like popular games such as Starcraft has (but I'm sure you know that ;)).
One last note, you're doing very well on your game. I read a few posts back and see you have a scripting system to do your jobs, and that's excellent. One note though, you'll have to encrypt them. I didn't read far enough to see if you had.
Also, about your graphic problem (about the semi-transparent masks), you should make your own "texture" format. Sure, it will be hard work, but you can incorporate the GZIP algorithm in there, and RLE if that isn't enough by itself, to make the graphics smaller. I also suggest 4-bit for the masks as you won't need extreme detail, no?
Thanks for popping in Sas, nice to see you.... :)
Each map tile is given its ID when the map is generated. Once done, it is saved along with the map files so it doesn't have to be regenerated.
As the maps are randomly generated the novelty shouldn't wear off after the first game, but a map editor would be nice. Everything is basically as per the Civ/SMAC games, a sort of deathmatch, though there will be other ways to win than military victory.
The scripts are not really scripts per se, but a set of ini values. The games rules are hard coded, but are extremely flexible and can be drastically changed via the scripts. Sentience has changed in its goal - it's now an engine for a TBS. When I've finished applying my changes to the framework, you'll be able to completely alter the way Sentience looks. By changing the buttons, background images, map graphics and scripts you could easily make it a medieval TBS.
No idea what you were on about in the last paragraph. I got your bit on compression but the texture bit lost me...
Behemoth...
An order for 2 more buttons please...
90x30
Menu
Turn Complete (or equivalent)
They seemed to get lost when I reshuffled the graphics....
I need these before Sunday please, but any time before then is fine. :)
Ta!
.
Well, I didn't go to bed after all. I've sat and coded in the cool building/unit name display thing. It's pretty accurate, but at 1280x1024 the text isn't really readable.
I'll have to see if I can dynamically resize it and see where it gets me...