Another Eejits guide . . . .

View previous topic View next topic Go down

Another Eejits guide . . . .

Post by graymac on Tue Sep 20, 2011 4:00 pm

Some users have found the "Eejits Guides" helpful in tackling the first steps in object building. An extra one has been done to try and make co-ordinates a bit easier to understand. For the perplexed, give it a go. Very Happy

There's a bitmap to go with the example, so learners can have a go.
Attachments
eejits four.zip You don't have permission to download attachments.(194 Kb) Downloaded 31 times
avatar
graymac

Posts : 1744
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Another Eejits guide . . . .

Post by Egg on Wed Sep 21, 2011 1:59 pm

It is surprisingly unusual for a competent programmer or developer to produce documentation at all, let alone documentation of this high quality. Well done, graymac.
I've attempted to write documentation before (not easy), and I urge anyone who has trouble with "Eejits Guides" to contact graymac telling him where they get stuck, so that he can provide clarification.

Egg

Posts : 81
Join date : 2011-07-25
Location : Tasmania

Back to top Go down

Re: Another Eejits guide . . . .

Post by mrknowitall on Wed Sep 21, 2011 4:03 pm

its CRAP!!!!!!!


Spoiler:
C - creative
R - real easy to pick up on
A - actually well thought about
P - pretty damn good!

mua ha ha Smile


good job Smile

avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: Another Eejits guide . . . .

Post by graymac on Wed Sep 21, 2011 4:19 pm

Thanks for that. Really, the bottom line with the developing game is to gain competence with the object building skills. Whether you make routes or externals it is common to all forms of development work. I learned from these here:
http://bveworldwide.unlimitedboard.com/t60p15-high-speed-2-development#478
All I have done with the Eejits Guides is repeat a lot of what's gone before. Maybe I explain it a bit differently, from the way I understand it as I learn too. Don't forget, I'm not long at this myself with only about 21 months experience at BVE.
I recommend learners to try all the material available. Once the concept of vertexes and coordinates is properly understood, believe me, you will FLY. It isn't magic or "rocket science", a bit of hard work at first and once the wheels start rolling and the brain kicks in you will wonder what held you back before. Remember way back, how hard it seemed to NOT fall off a two-wheeler bike. But you got to the point where it all clicked, it's no different with this stuff.
(I do NOT want to hear from 34 year old simmers who are STILL falling of their bikes!!! Very Happy )

As for contacting me with individual difficulties as Egg suggests, , I really don't have the facilities or time to offer one-to-one tuition or email learning. As I say, between the different sources of learning material you should grasp it one way or another. If not then ask any specific question on the forum (we're all happy to help) and you should get a reply to help you in the right direction.

Get working on it everyone. OpenBVE needs YOU!

Attachments
OBVEyou.jpg You don't have permission to download attachments.(45 Kb) Downloaded 5 times
avatar
graymac

Posts : 1744
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Another Eejits guide . . . .

Post by graymac on Wed Sep 21, 2011 4:20 pm

@Mr Knowitall
Right, knowitall, After class. My study!!
avatar
graymac

Posts : 1744
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Another Eejits guide . . . .

Post by mrknowitall on Wed Sep 21, 2011 4:58 pm

graymac wrote:@Mr Knowitall
Right, knowitall, After class. My study!!

ill be getting my coat........... :/


Very Happy Very Happy :d
avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: Another Eejits guide . . . .

Post by Egg on Thu Sep 22, 2011 2:41 am

I wasn't meaning that you provide one to one tuition, just that sometimes a slight rewording of a document can make a big difference.

Egg

Posts : 81
Join date : 2011-07-25
Location : Tasmania

Back to top Go down

Re: Another Eejits guide . . . .

Post by graymac on Thu Sep 22, 2011 10:05 am

Ah, yes, by all means that can be done if it makes it clearer.
I wish someone could do one to explain those .animated files (1), without having a degree in logic, maths and boolean algebra (2). Although that's probably a tall order!!

(1) No, I don't understand them either.
(2) No, I haven't that, either.
avatar
graymac

Posts : 1744
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Another Eejits guide . . . .

Post by lonelyinardwick on Thu Sep 22, 2011 6:00 pm

1) Me too.
2) I have known Maths (I had a overall B in GCSE Maths) but I haven't seen as complicated as this, and my maths has faded away..

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Another Eejits guide . . . .

Post by mrknowitall on Thu Sep 22, 2011 7:50 pm

i know enough animated files commands and how to explain them if that helps? Smile
avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: Another Eejits guide . . . .

Post by wheeltapper on Thu Sep 22, 2011 8:18 pm

You will be getting a few questions before long, of that there is little doubt!! Very Happy

wheeltapper

Posts : 72
Join date : 2011-07-12

Back to top Go down

Re: Another Eejits guide . . . .

Post by mrknowitall on Fri Sep 23, 2011 4:57 pm

well here's a bit of easy reading and explanation of a few area's on Michelle's site.

Code:
[Include]

basically it does what it says on the tin, if you wish to include another .CSV , .b3d & .ANIMATED file you would just pop include into a animated file basically to tell the program you wish to include which ever file you need.

< mark 4 coach with no door's.ANIMATED>
[Include]
a door.csv


Code:
FileName0
FileName1
FileName2
...

This is not actual coding, but actually refer's to what file you wish to include like above.

< mark 4 with no door's.ANIMATED>
[Include]
a door left front.csv
a door right front.csv
a door left back.csv
a door right back.csv




Code:
Position = X, Y, Z

so lets recap, so far we have the mark 4 coach with no doors in one csv, then we have made 4 other csv's with a door in each facing the way they should relevant to the coach it's self. we have 1 .ANIMATED file which now has the > include < section and then all the different door .csv's. now we need to move then into place, this is where this coding comes into play. if you have good knowledge of coding this should not be hard to explain.

X,Y,Z = left,right ,, up and down ,, forward and backwards



now that's the overview (No.1) section explained a bit more simpler. now section 2


You can use the [Object] section to create a single animation. This requires to set up at least one state via the States parameter, and to use any combination of functions you want, which provide control over the animation. There can be any number of [Object] sections within the file.


so this is a quick explanation of the power which the [object] in the .ANIMATED file can do. when she explains that at least one state needs to be made via the states parameter is because if you don't, you may as well use the [include] as this will work for placing an object instead of wanting to animate it. when you see the explanation that you may wish to use as many functions as possible its basically explaining that if you wished to make the door open forward, and then slide back, you can. although the coding for that is not on the site it doesn't mean its not possible.

so now lets give things a try! Very Happy

Code:
[Object]



Code:
Position = -1.5,0,-7

basically the first is -1.5 meters to the left of the car ( or what ever the side of the car is in the original .csv) , the second is 0 because the doors should not site higher or lower than the car, and the third being towards the rear end of the car (this is for a centered car ONLY!! if your car is built from o to 24 and not -12 to 12 in length then adjustments will need to be made)

Code:
States = File0, File1, ..., Filen-1

well this is where you state what you are wanting to use in the formula you are creating. if you wished to make a flashing light then you would use two .csv's one with a light showing, and one with it not showing. then pop them into the code, but in this case its the front left door. so it would be as follows.

Code:
States = frontleftdoor.csv


now the hard part, it took me 2 weeks of maths, thinking and brain microwaving to figure this out and will be hard for me to explain even though i actually figured the coding out. so there may be errors and i can not confirm the following due to me writing this without looking in depth to the animation today and loading things up and testing things out. but from my countless weeks of head aches i can and will do my best to explain.


so lets look at what we got in our .ANIMATED file so far

Code:
[Object]
Position = -1.5,0,-7
States = frontleftdoor.csv

so we have a boring door sat there now on our carriage with no animation, now here is the animation.

please note the coding below would not be for the mark 4 coach stock, they use slam closing doors, the coding is for bi parting plug-in doors.



Code:
TranslateXFunction = min[leftDoors,0.1]

X = left and right. so
Code:
min
actually makes the door go outwards by 0.1 and
Code:
-min
makes the doors go inside the train by 0.1 the
Code:
[leftdoors]
assigns it to a key command, which believe it or not is the leftdoor command which is ordered once the key F5 is pressed in a simulation. ( just a shame that BuildACrossingForMe key is not assigned as yet Very Happy )


so now we have a door that now comes out when the key is pressed. but apart from coming outwards we need her to now slide out the way so the heavier kind of passenger can get in! this is where the next bit of coding comes in handy.



Code:
TranslateZFunction = leftdoors[0]

same again ,

Code:
Z

forward or backwards

Code:
leftdoors

the simulations key press command

Code:
[0]

makes the door move downwards away from the door by the size of the door itself.

Code:
[1]

makes the door move upwards by the size of the door in the .csv


so now the full coding should be like this

Code:
[Object]
Position = -1.5,0,-7
States = frontleftdoor.csv
TranslateXFunction = min[leftDoors,0.1]
TranslateZFunction = leftdoors[0]

now thats our front left door made into an animated sliding door Smile

now 30 minutes of writting this and making it all colorful and easy to read, that should be worth a few appreciation's Smile

KIA.



avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: Another Eejits guide . . . .

Post by graymac on Fri Sep 23, 2011 5:59 pm

Well done MrK. You are now promoted to "Special K" Very Happy
That just about wraps up the doors.

How about a hinged carriage door, which would swing open a bit less than 90 deg, with two possibilities, opening forwards and backwards (as well as left to right) I imagine you might use the above, substituting RotateYFunction to swing the object instead of sliding it, but what would be the formula for the four possible combinations?

(the same might work for a level crossing gate, with something like
= (abs[trackdistance] > 300)
to tell it to work when the train is 300metres from the gate (by which time the gatekeeper will have done it in his pants)

*** and, no, I don't know the answer, it isn't a trick question silent


Last edited by graymac on Fri Sep 23, 2011 6:06 pm; edited 1 time in total
avatar
graymac

Posts : 1744
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Another Eejits guide . . . .

Post by mrknowitall on Fri Sep 23, 2011 6:05 pm

Well I'm having a brunch ATM now Smile but will gladly explain further when I'm off my iPod, did my explanation make things easier?
avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: Another Eejits guide . . . .

Post by graymac on Fri Sep 23, 2011 6:13 pm

A lot easier, thanks. It took me ages too, when I did the 2700/29000 doors. I had to experiment with bits of code off other trains before I could figure what should happen, then make the version I needed. (thanks, Derryck)

By the way, TIP: you can make the doors work more quickly/slowly by changing the time of the doorcls.wav sound file (use Audacity to edit) - a short sound opens faster.

** and I've topped up your appreciation tank!
avatar
graymac

Posts : 1744
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Another Eejits guide . . . .

Post by mrknowitall on Fri Sep 23, 2011 9:23 pm

i think explaining the coding will suffice for now! and we should see results from others learning the commands! Very Happy im special K not super K Wink
avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: Another Eejits guide . . . .

Post by mrknowitall on Fri Sep 23, 2011 10:49 pm

avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: Another Eejits guide . . . .

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum