Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Development client: map scaling  (Read 25751 times)

0 Members and 1 Guest are viewing this topic.

smacky

« on: 27, February 2012, 13:40:59 »
Please try this revision. I've put a new exŧension library in the source which allows all sorts of nice graphical things. This was what I was aiming for earlier last year when I started working on the transparent widgets (vanilla SDL can't do that) but what with one thing and another I never got round to it. I know this compiles flawlessly on Linux and wine+CB but please test on Windows.

ATM we only use the new library (SPriG) for map zooming (or scaling is a better word). In fact this has been totally rewritten. The new system, for me, is significantly faster, especially at large screen sizes, than 0.10.5 with zoom + smoothing (we now automatically do smoothing [anti aliasing] because for some reason it is faster with than without).

It is of course a WIP and ATM you have little flexibility. So the map is always zoomed according to screen size and positioned basically horizontally centered and vertlcally below center. Things will improve in this regard (I have some old code, which was built over the old zoom system so tended to be slow, that allowed much more flexible scaling and resizing).

I'm not 100% sure I've got the calcs perfect for map drawing yet so things IMO look just a bit off at bigger scales.
« Last Edit: 28, February 2012, 23:01:09 by smacky »

zrubavel

« Reply #1 on: 27, February 2012, 14:52:22 »
Here's a zipped windows versions of this client  (without a new readme .txt file)
a good sharp edge
is a man's best hedge
against the uncertain vagaries of life
Corb Lund

zrubavel

« Reply #2 on: 27, February 2012, 15:02:34 »
One thing I noticed is that with this new client the numbers that float from you when you are hit are the same color as the numbers that float from a mob when its hit-orange. Before (and I went to my 10.5 client to check) they used to be red and orange respectively. This is not a huge issue of course...
a good sharp edge
is a man's best hedge
against the uncertain vagaries of life
Corb Lund

smacky

« Reply #3 on: 27, February 2012, 16:30:18 »
Thanks Zrub. I'm not going to make that an official download yet because this is too developmentish even for a development client! In fact I have a suspicion it is inherently flawed. I think the tile calcs have to be too precise to scale up properly this way, which is why things look increasingly odd at higher res's (at 1920x1080 everything is shown a tile south and a tile east from where it actually is). A biit depressing, but salvageable I think

The colour problem is an easy fix though.

smacky

« Reply #4 on: 27, February 2012, 17:37:19 »
Bah! Indeed that's the problem. I can emulate the old behaviour but if anything it is even slower (unsurprisingly as library code often is -- a nice simple API at the expense of speed). I shall have to think on this one. Perhaps if I scale only in exact multiples of tile size...

EDIT: Huzzah! It is indeed, at least partially, down to a stupid miscalculation on my part. I probably won't have time to fix it tonight though.
« Last Edit: 27, February 2012, 19:25:51 by smacky »

zrubavel

« Reply #5 on: 27, February 2012, 20:02:31 »
I understand its not ready for a public download, I put it there so others with windows would try it out...I play on a laptop so I figured I was not very suited to trying this out...Although it is useful to know that (color issues aside) it seems to look fine on a small laptop screen.
a good sharp edge
is a man's best hedge
against the uncertain vagaries of life
Corb Lund

smacky

« Reply #6 on: 27, February 2012, 23:48:02 »
Indeed. But now I've fixed it!  :laugh: :laugh: I'll commit tomorrow and we can do an official dl.

smacky

« Reply #7 on: 28, February 2012, 23:08:15 »
r6829 is the one. Now scaling is independent of screen size. You can scale map width and height to different values, both from 5% to 1000%. Currently, the map is simply centered (approximately) in the screen.

EDIT: Somehow I disabled anti aliasing at some point and right now I can't get it to work properly.
« Last Edit: 28, February 2012, 23:23:12 by smacky »

zrubavel

« Reply #8 on: 01, March 2012, 14:46:14 »
Here's a link to a zipped windows version of r6386.
a good sharp edge
is a man's best hedge
against the uncertain vagaries of life
Corb Lund

zrubavel

« Reply #9 on: 01, March 2012, 15:35:13 »
So a couple of issues:
A.The colors of damage numbers are now fixed, but both the damage done by a char and the damage to done to him fly out of the char's sprite and not the mob (i.e. if I hit a mob for 353 hp damage an orange 353 number flies out of my body).
B. Sometimes (I think because of "fog of war")  fire storm flames stay drawn in a room long after the fire...This could have been an older issue with fog of war, but I just recently switched back to using mage so I don't know.
a good sharp edge
is a man's best hedge
against the uncertain vagaries of life
Corb Lund

smacky

« Reply #10 on: 01, March 2012, 15:46:07 »
A. Dammit! This is all down to me trying to be clever by merging two similar bits of code together without remembering that similar != same. Will fix.

B. I thought there might be a problem here. I'm either not keeping track properly of which image I'm recolouring for the various effects or not redrawing the map when I should be. Or both. Will fix.

Thanks for the client package. I'll do what needs to be done later on.

_people_

« Reply #11 on: 03, March 2012, 04:04:26 »
I think this feature is working a bit oddly. If you look closely at the edges of the map,  each tile is misaligned by a pixel or two, giving the map a rough-edged appearance.

Also, it's rendering masks oddly. This is particularly noticeable on the islands north of GH, where all of the water-earth masks are misaligned.
-- _people_ :)

smacky

« Reply #12 on: 03, March 2012, 04:23:11 »
Does it still misalign in 800x600? Scaling is not use then so it must be my calcs.

_people_

« Reply #13 on: 03, March 2012, 04:52:51 »
Okay, I changed the resolution to 800x600, didn't work. So I restarted the client (logging out still causes segfault btw). When I tried to log in, it stuck at "Transfer character to map". So I logged out and tried again. This time I logged in, but a book GUI opened with a null square, two check marks, and "_person_[SA]".

Alignment issues are still occurring.
-- _people_ :)

smacky

« Reply #14 on: 04, March 2012, 12:58:50 »
Is it just me or has anyone else noticed that light no longer works in 6836?

Honestly trying  to coax SDL to usefully handle alpha and not destroy my X session in the process is putting me very close to postinig my own I QUIT topic every day... :grr:

Re logout segfault: Yeah I'm still waiting for some feedback from this guy. He's slow though.

https://www.daimonin.org/bugtracker/task/68

Tags:
 

Related Topics

  Subject / Started by Replies Last post
75 Replies
173084 Views
Last post 08, February 2013, 02:14:04
by B5_Misidian
1 Replies
4200 Views
Last post 05, June 2011, 15:29:08
by smacky
71 Replies
156902 Views
Last post 11, July 2012, 14:38:51
by smacky
0 Replies
202327 Views
Last post 11, January 2012, 22:48:03
by smacky
0 Replies
84 Views
Last post 28, June 2021, 18:16:53
by Clort