Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 4:57 pm
All times are UTC + 0
TS/RA2 grid not exact
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Dec 18, 2013 11:21 am    Post subject:  TS/RA2 grid not exact Reply with quote  Mark this post and the followings unread

It's not a big deal, but the TS/RA2 grids aren't 100% accurate.
-the grid should show the inner border of a tile (currently it's neither the outer border nor the inner but sometimes here sometimes there)
-the grid basically has to be 2 lines big (not only one) to show the inner border of each cell

attached is a SHP which could help you to get the TS grid exact. (don't have a RA2 example)
The SHP Builder grid should match exactly the one in the shp.
To make the SHP Builder grid preview only in the south is ok. I just copied mine over the whole image as this was easier to create.

suggestion: an option to highlight a certain foundation size might be nice.



CellGrid.zip
 Description:

Download
 Filename:  CellGrid.zip
 Filesize:  1.84 KB
 Downloaded:  30 Time(s)


_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 7:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Should it really be like your grid, or more like 'testgrid.shp' (included in zip) ?



Grids.zip
 Description:

Download
 Filename:  Grids.zip
 Filesize:  1.2 KB
 Downloaded:  25 Time(s)


Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 19, 2013 8:01 am    Post subject: Reply with quote  Mark this post and the followings unread

It should be like testgrid2 with the doubled lines, as only this is showing the exact tile borders (except you invent a pixel in between 2 pixel and you can show a line just between the tiles borders)
If you have only a single line, you can't tell exactly, if it's the inner or outer border of the current cell. (your single line example is also wrong, as you missed adding empty lines in between each tile. You have only the border of one tile and 2 tiles next to each other don't overlap with their border, but they are next to each other. see attached example gif)

The grid should be also not shown over the entire frame, but only from the center going down to the south (like it's currently).
It's simply because the base of a building never goes northwards of the center cell, but all foundations expand to the southwest and southeast only.



grid.gif
 Description:
-a single tile is the bright red border with the darker red area
-tiles are placed next to each other, thus no overlapping part and each tile in the grid needs its own inner border visible
 Filesize:  1.01 KB
 Viewed:  4707 Time(s)

grid.gif



_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Last edited by Lin Kuei Ominae on Thu Dec 19, 2013 8:20 am; edited 1 time in total

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 8:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Ok, I'll try to do it. I'm just not sure how haha.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 19, 2013 8:23 am    Post subject: Reply with quote  Mark this post and the followings unread

here's the code i wrote for TMP Shop to show the borders there.
it also includes heighlevel which is a tmp thing only.
In this one it draws on a per frame basis (each cell in a tmp is a single frame), so this code only draws a border to a single cell, but it is repeated for every cell in the tmp.

for you interesting is basically the polygon only as this is a single cell and then you only have to place this polygon next to each other without having them overlap

the tile dimension is as follows
tmpfile.header.cx = 48 for TS and 60 for RA2
tmpfile.header.cy = 24 for TS and 30 for RA2

framex and framey are the offset/location of the tile in the tmp

Code:
                    int framex = Math.Abs(r.X) + tmpfile.frames[frame].imageheader.x;
                    int framey = Math.Abs(r.Y) + tmpfile.frames[frame].imageheader.y - tmpfile.frames[frame].imageheader.heightlevel * tmpfile.header.cy / 2;

                    // Draw the specified section of the source bitmap to the new one
                    if (tmpfile.frames[frame].image != null)
                    {
                        Point[] tileborder = new Point[6];
                        tileborder[0] = new Point(framex + tmpfile.header.cx / 2 - 1
                                                , framey + 0);
                        tileborder[1] = new Point(framex + 0
                                                , framey + tmpfile.header.cy / 2 - 1);
                        tileborder[2] = new Point(framex + tmpfile.header.cx / 2 - 1
                                                , framey + tmpfile.header.cy - 2);
                        tileborder[3] = new Point(framex + tmpfile.header.cx / 2
                                                , framey + tmpfile.header.cy - 2);
                        tileborder[4] = new Point(framex + tmpfile.header.cx - 1
                                                , framey + tmpfile.header.cy / 2 - 1);
                        tileborder[5] = new Point(framex + tmpfile.header.cx / 2
                                                , framey + 0);
                        Pen p = new Pen(Color.FromArgb(175, 0, 255, 0));
                        g.DrawPolygon(p, tileborder);
                    }

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 26, 2013 9:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Okay, I gave the grids a shot, tell me if something is wrong.

EDIT: I checked with your .shp and mine is off by one pixel, but I'm not sure if it's mine or yours that's right #Tongue Anyway, just tell me, this is an easy fix if it's mine that's wrong.  

My build is there:
www.ppmsite.com/forum/viewtopic.php?p=501424#501424

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 26, 2013 11:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

yours is off.
Canvas.Height / 2 is the point on which the inner border starts of the top most cell. Yours is Canvas.Height / 2 + 1 (yours is off, because the outer most 1-pixel-line of your 2 pixel wide grid is already the inner border of the cells next to your grid)

Another small suggestion:
your grid is only shown on transparent background. Could you show it also above every other color?
When you have a building, you want the grid to be shown on top of it, so you can check the building border against the grid. If the grid is only drawn on the background behind the building, you can't really see by how many pixel the building is off.

When creating warfactories, you also need the grid to show in front of the building, so you can check if the door is on the right position.


Thanks again for all the fixes you're doing and merry christmas Smile

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Fri Dec 27, 2013 6:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Okay, I updated my build with your recommandations.
Thanks for your feedback and support, LKO.
Merry christmas #Tongue

Back to top
View user's profile Send private message
xanax
Vehicle Drone


Joined: 14 Nov 2013

PostPosted: Fri Jul 25, 2014 5:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hello.

Have grids been fixed/updated?

I am using OS SHP Builder 3.38 beta 6 (ID: 3.37.99.006) and here is what I see (TS Grid):



Is it normal that the grid is not complete? --> missing lines and strange pixels (at the top right).

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jul 25, 2014 5:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

No, this issue has not been fixed yet.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1911s ][ Queries: 14 (0.0105s) ][ Debug on ]