Page 1 of 2

MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 17:26
by mph
Hello. i have changed my name- i thought now im going to release something-ill have a proper name. and with initials MPH for a transport game-i dont know why i never chose that in the first place! anyway- daylight is now mph.

after some interest in my fences in another thread- i had a go at drawing them for all the angles needed to replace the standard ttd fences. since i had the day off-i decided to have a go at coding them too!

please bear in mind that this is my first attempt at coding a grf.

i have no idea if this will work- and i have only tested them a little bit myself, but they appear to work.

i followed the tutorials, and used the code for the fences that purno/Szappy did for help -http://www.tt-forums.net/viewtopic.php?p=433758#433758-
so thankyou to all

Edit- updated version 30/08/07- v0.0.3 changed graphics a little- changed heights of posts. fixed description.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 17:44
by m3henry
did you ask owen just to change your username?
now you have two accounts.
/OT

the fences look broken, i would suggest you put the fence posts at the end of each sprite

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 17:59
by mph
im sorry owen! :? i didnt realise he could change my account.

i agree about the fences. will have a play around. did the grf work ok?

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 18:53
by Ben_K
I like the look. The CC is subtle and would look cool, although Id probably choose no CC. Maybe you can add it as a parameter. Maybe make non-CC, 1CC and 2CC versions and have a parameter option to choose which one?

Great work fella. 8)

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 19:02
by mph
yeah- thats something i would like to do. especially as i did it sort of as a way to learn to code. i will try to work out how to do that when im 100% happy with the graphics themselves.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 19:55
by FooBar
Pretty sweet!

They remind me a bit of the RollerCoaster Tycoon plot boundary fences.
Is it possible to get better connections in corners? There are some gaps in certain places.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 20:05
by Purno
FooBar wrote:Is it possible to get better connections in corners? There are some gaps in certain places.
Probably impossible, same issue was with the original fences and my fence GRF.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 20:21
by mph
i have another version with fence posts at the end- but-to me it looks even more obvious that they dont meet up. i have been trying to but i dont think its possible- as purno thought. which do you all prefer?

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 20:42
by Ben_K
Im with the original to be honest. :)

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 20:50
by AndersI
It looks like the fence on the SE side is too far away from the tile edge, compared to the other directions. See

picture:
Example12.png
Example12.png (18.79 KiB) Viewed 5666 times
If the fences were placed exactly on the edge I think they would line up in the corners, but maybe there's something else hindering this?

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 21:13
by Purno
AndersI wrote:If the fences were placed exactly on the edge I think they would line up in the corners, but maybe there's something else hindering this?
Ever seen two tracks from two different companies next to each other? There are two fences then, the fences aren't exactly on the border between one tile and another.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 21:36
by mph
anders- you are right a little- by moving it over it does look better but i dont think its possible to join them up perfectly- as there is only one sprite for each side of the tracks. so if i adjust one side -the other side moves. also-if i make it match up on one join- it no longer joins up on the other. i dont think its possible to align them perfectly.

i think it might be best to leave it as it is in my first post. as there are no posts at the ends- it is less obvious that they dont meet up. it also looks a little like theyre broken- which fences like this often are.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 28 Aug 2007 21:53
by FooBar
It should be possible to line things up pretty neatly. Have a look at my tram tracks (see sig), for instance. There's only one sprite with poles per tile, and still everything lines up, caused by overlap.

Something similar can be done with those fences. In case of two companies next to each other, there will be only one fence inbetween.

However, gaps or no gaps, I still like those fences.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 29 Aug 2007 08:33
by m3henry
I like the new ones a lot!
my suggestion; make the \_ view 1 pixel longer (as well as the hill \ )

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 29 Aug 2007 21:56
by mph
updated version. see first post- changed graphics a little- fences a little taller, better alignment at the ends. went with posts at the ends- they look neater than before, although not perfect. dos version added too(but not tested- i think i did it right though)

i think i am fairly happy with this, so i will probably leave it. i dont want to get too bogged down with the graphics- i was really only looking at how to go about coding! of course, if there is anything in particular wrong- do let me know. cheers

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 30 Aug 2007 08:22
by m3henry
boring and bad are words that don't spring to mind :D
but I do prefer the old height though.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 31 Aug 2007 05:04
by athanasios
Higher for safety reasons. :wink:

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 05 Sep 2007 13:53
by mph
I have included in this grf some trees I drew to replace the original roadside trees. the updated one is only in this post- as i still have a few questions.

Is it a good idea to combine them in one grf? i thought maybe i could have some parameters- say - first parameter- 1=disable fences, second parameter 1=disable trees?

I have got a little confused by this. would i do this using action 6?-- and to have this before the action A for each set of sprites- saying to skip that set of sprites?
I may be completely on the wrong track-

Of course-it may be fine to just have no options- but i am interested in learning.

Thankyou for any help-

This does perhaps seem like a faily unimportant grf- but they are fences and trees i am using in an upcoming british stations set- and they will all look nice together! (fortunately- i am not coding this, maedhros is!)

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 05 Sep 2007 14:11
by FooBar
I would keep them seperate. No need for unnecessary stuff if someone only wants the trees for instance. This also solves your action 6(?) problem.

Parameters are fun anyways, so if you want to know...
First you need an ActionD to set any unset parameter to 0. After that, use an Action7 before each part of the grf to skip it if required. That's about it.


Those trees are pretty sweet. Should look way better in combination with SAC's stolen trees than those default ones.

Re: MPH New fences [Test Version] (my first grf attempt)

Posted: 05 Sep 2007 14:45
by DaleStan
Or you just arrange the action 7s so that "unset" and "default" have the same result.