View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 03.04.2011, 13:11Posts: 58Location: The Netherlands Likes: 1
 

 Post Topic: Re: Flyable aircraft
PostPosted 15.07.2012, 19:49 
Ooh that looks nice.
So it can still be a hot summer (rain here all days). :P

Jon

  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 1832 Likes: 4
 

 Post Topic: Re: Flyable aircraft
PostPosted 17.07.2012, 11:07 
Hi Jon,
Over here in the UK we haven't had a summer at all, it's been cold and wet. But the forecasters are saying the jet stream will start to move north, where it should be, and maybe summer will start next week....
Meanwhile, I've nearly solved the problems with the spaceflight system, though there's still lots to do. I'll see if I can do a detailed update in the next week or so.
Best regards,
Chris
  Beginner BeginnerMember since: 03.04.2011, 13:11Posts: 58Location: The Netherlands Likes: 1
 

 Post Topic: Re: Flyable aircraft
PostPosted 18.07.2012, 08:35 
Hi Chris,
Sounds like the same weather as in the Netherlands. At the moment it is 3 degrees Celsius warmer than with 1th Christmas Day. I hope summer will start next week.
Wow you're really having a good progress on your project if you've almost solved those problems. I'm looking forward for more updates.
All the best,
Jon
  Beginner BeginnerMember since: 22.08.2011, 15:57Posts: 63 Likes: 0
 

 Post Topic: Re: Flyable aircraft
PostPosted 19.07.2012, 03:13 
Same weather in Germany. Stormy and rainy as if fall's here already. At least there's some 'good' weather in space :D
  Beginner BeginnerMember since: 19.07.2012, 16:56Posts: 7 Likes: 0
 

 Post Topic: Re: Flyable aircraft
PostPosted 25.07.2012, 16:33 
After years of playing Train Simulator I'm convinced that the engine it runs on is crap.
So I got the brilliant idea to create a working train myself, in the Cryengine.

I have been trying to create some basic train wheels with the standard vehicle scripts (topic viewtopic.php?f=326&t=95223 ) but it seems that the system is created just for cars. (what was I thinking :P )

I read a few things in this thread about you (cwright) managing to create a working train.
My question is, do you still have a working example ?

I lack programming skills so this stuff is probably way over my head but can't hurt to ask :P
  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 1832 Likes: 4
 

 Post Topic: Re: Flyable aircraft
PostPosted 26.07.2012, 12:33 
Hi Cultor,
Yes, I have a fully drivable train system. I do all my Lua development through a program which I call Aircraft Factory. In fact it supports all these vehicle types: aircraft, ships, submarines, spacecraft - and trains. As you can see, it is badly mis-named - at some stage I'll rename it to Vehicle Factory.
Here's a description of what the train system can do. Currently it uses the Crysis train and track models, but it will certainly work in CE3, though of course CE3 models for trains and track will be required.
.
Like all my vehicles, the train system does not use the game engine vehicle system in any shape or form. Everything is programmed in Lua.
Trains can now also use the Lua AI system, so you can create waypoint files for trains. An AI train could stop at a station, wait a few minutes, and then carry on to the next destination. The player can enter a carriage and travel as a passenger, or walk to the locomotive and take over as the driver.
Train wagons can carry vehicles such as tanks and also AI characters, see screenshots.
.
To add a new railway to a map, I would start by adding the editor entity to the map. The editor allows a track system to be built and edited very quickly, even for tracks many kilometers long. You can select any track and change its bend angle. Change one track and all following tracks are updated automatically. It's a lot of fun to play with!
Each time you save the track data, the editor also saves a track data file that will be used by the trains. This guarantees that locomotives and wagons etc will accurately follow the tracks.
When you're satisfied with your track layout you can save it as a group file. You can then load the track as standard brushes, which is much more efficient. You can then disable or remove the editor.
.
Next, you add the required instances of the train entity. For each instance, you use its Properties to define the model (e.g. a locomotive or wagon) and several other settings, including the contact points for each locomotive/wagon.
.
When this is all done then, as if by magic, the locomotives and wagons will be accurately positioned on the track. One Properties setting for each vehicle sets its position on the track, e.g. to form a train or for additional wagons further along the track.
.
The locomotive is fully drivable, and uses the standard commands. Press F to enter, type in EALL to start the engine, press + to increase the throttle, and you're off. You can use the standard view commads e.g. for external view or flypast view.
If you drive the locomotive into a free wagon, the wagon is automatically coupled to form a train. The code calculates the forces between locomotives/wagons so you could, for example, do real shunting operations (but it would be necessary to disable the auto coupling).
You can also walk around quite naturally, including walking from one wagon to the next. This works even if the train is going very fast.
.
Originally it only worked for flat tracks, but last year I added support for tracks to follow the terrain, so now you could build a mountain railway (I had several trips on Japanese mountain railways and they were spectacular).
.
Currently, you can have multiple rail track systems, but they are separate, you can't drive a train from one system to another. The trains system is a lot of fun, later on I'll look at joining track systems so you could drive from one section to another by switching points.
.
But there is one catch. The Crysis 1 train models don't have separate wheels, so it wasn't possible to have rotating wheels. However, rotating wheels would be quite feasible (it's a standard feature for the other vehicles).
.
Are you thinking of creating new train models? New, high quality textured train models would be very welcome, and I would definitely consider adding support for rotating wheels.
.
There is a demo that includes the train system and a train demo map, but it's for CE2 only (the original Crysis). It was released just before Christmas 2011. Go back a few pages in this thread to see the details.
If you're using CE3: the code does work in CE3 (the free SDK, not the Crysis 2 SDK). There will be a new release later this year, for both CE2 and CE3. It will include the new water bomber, dynamic fire, spacecraft - and, of course, trains.
Best regards,
Chris
Attachments:

ScreenShot0112.jpg
ScreenShot0131.jpg
ScreenShot0123.jpg



Last edited by cwright on 26.07.2012, 12:45, edited 1 time in total.
User avatar   Hardcore Modder Hardcore ModderMember since: 11.11.2011, 07:36Posts: 811Location: Asia Likes: 0
 

 Post Topic: Re: Flyable aircraft
PostPosted 26.07.2012, 12:37 
[quote]Image[quote]
Nice aircraft :))


Image
Role :Texture artist
My skills : Level Designer|Game Designer|Sound Designer|3D Artist|2D Artist|
  Beginner BeginnerMember since: 19.07.2012, 16:56Posts: 7 Likes: 0
 

 Post Topic: Re: Flyable aircraft
PostPosted 27.07.2012, 11:54 
Thanks for the explanation!
I found the demo map and got it to work in the original Crysis. Works a lot better than I expected, very nice job.

I have not yet managed to get your editor to work with CE3. Having trouble figuring out what to install and where.
The manual of the most recent "AircraftFactory.zip" tels me to extract the zip in the main folder.
But how can files be created in folders when they are not even in the .zip (refering to this part in the manual: "If they don't already exist, four new directories will be created inside Crysis\Game: Entities, Libs, Objects and Scripts. A new mod named 'Vehicles2011' " )
  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 1832 Likes: 4
 

 Post Topic: Re: Flyable aircraft
PostPosted 27.07.2012, 19:26 
Just to be clear: you've installed the aircraft release from December 2011, the one I mentioned?
After installing it, the four directories mentioned will exist.
Your quote is from the Aircraft manual, not from the Aircraft Factory manual. You can install Aircraft Factory into any location you want, it's completely separate to the aircraft installation in Crysis.
.
By 'editor', do you mean Aircraft Factory or the track editor that I also mentioned?
.
If you do want to use Aircraft Factory, I would suggest that in the first instance you use it with Crysis, as you already have the aircraft installed and working. To give yourself confidence with AF, you can load any of the standard aircraft (e.g. to load the Spitfire, enter 'Spitfire' into the project name slot). You can then generate the Spitfire code. If the Spitfire still works (and the date of SpitfireAF.lua shows that it really was updated) then you have successfully built an aircraft with AF!
With that under your belt, you could try changing some Spitfire settings. But keep the original Spitfire project settings, so you can always return to the original settings. You can save your own settings with a different name e.g. Spitfire Test.
Also, as you can see in the AF options, you can create the train code.
.
Don't worry, the code will work in CE3 (you just need to check the CE3 option and enter the correct path to the CE3 installation). But for CE3 the map has to be set up slightly differently. I'm still not completely happy with some aspects of CE3, that's why I'm still concentrating on CE2. But there should be an 'official' release for CE3 later on in the year.
.
By the way, did you try the train demo map? You can drive the train nearly all the way around the island.
.
The train map may have the editor installed, but it will be disabled. If you would like to try the rail track editor, let me know and I'll post the current version with the editor manual. By the way, the editor is multi-functional, currently it can edit AI waypoints and rail tracks. You set it up by changing its Properties settings.
Best regards,
Chris
  Beginner BeginnerMember since: 23.08.2011, 01:39Posts: 11 Likes: 0
 

 Post Topic: Re: Flyable aircraft
PostPosted 27.07.2012, 22:23 
Is the train system available yet?
  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 1832 Likes: 4
 

 Post Topic: Re: Flyable aircraft
PostPosted 28.07.2012, 13:37 
Hi trainguy,
Yes, the drivable train system was included in the December 2011 release:
https://dl.dropbox.com/u/4380128/Aircraft2011.zip
The release includes a train demo, which has maybe 5 km of track. There are two demo maps (day and night). See screenshots.
But there's a catch: it's for CE2 (the original Crysis) only. If you have Crysis 1 installed then no problem.
There should be a CE3 release later this year. Of course, one requirement is to make the necessary track and train models for CE3, you can't use the Crysis models in the free SDK.
.
It looks like the train demo map (day time) has the track editor installed. To use it:
1. Load the map Train_Journey.
2. In the objects box, select aaa Editor1
3. In its Properties settings, uncheck Edit_Waypoints, and check Edit_Rail_Tracks and EditorEnabled.
4. Click Reload Script
You should now see an additional rail track which you can edit. Hit CTRL-G and you should see the editor text. Move mouse and press LH and RH mouse buttons to move around the map. Roll the mouse button to adjust your speed. Press plus key to increment the selected track etc etc The editor text gives a prompt for all key command.
Here's the Editor manual:
https://dl.dropbox.com/u/4380128/EditorManual.rtf
Have fun....

Chris
Attachments:

ScreenShot0531.jpg
ScreenShot0534.jpg
ScreenShot0526.jpg

  Beginner BeginnerMember since: 19.07.2012, 16:56Posts: 7 Likes: 0
 

 Post Topic: Re: Flyable aircraft
PostPosted 28.07.2012, 22:23 
Your previous post cleared a lot of things up Chris. Thanks.
However I'm running into problems when I add the editor into a new Crysis 1 Level.

Loading the Flow Graph and the Camera Group seems to work fine but once I hit Reload Script I got an error indicating that I didn't have a LuaCompiler.exe
So to fix that I followed this post viewtopic.php?p=286499#p286499

Now I'm stuck again, when I press "reload script" I get an "error output from lua compiler" My guess is that it cannot find the Editor.lua since the "edit script" button next to the "reload" button doesn't work either :P

When I load my new empty level with only the Editor Entry in it I get this log. Maybe it contains some useful info because I ran out of ideas :P
Image
  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 1832 Likes: 4
 

 Post Topic: Re: Flyable aircraft
PostPosted 29.07.2012, 11:22 
Hi Cultor,
First, a crucial question:
I'm asuming you have installed the December 2011 aircraft release. Did you follow the steps in the previous post, starting with loading the map Train_Journey? And did the editor work correctly? Were you able to drive the train?
If it doesn't work in the demo map then it probably won't work in your own map.
.
After loading the editor in your own map, look at the entity rollup on the right. Check that it says 'Entity:Editor'.
There may be an entity named 'WaypointEditor'. Don't use that, make sure it's specifically named 'Editor'.
Make sure you loaded the Editor flow graph, there are several flow graphs.
.
Yes, the Edit Script should open the Lua file.
.
Check the file game\entities\Editor.ent
It should be:
Code:
<Entity
Name="Editor" Script="Scripts/Entities/Aircraft/Editor.lua"
/>

.
Check that the Lua file exists:
Scripts/Entities/Aircraft/Editor.lua
and open it with Wordpad or your text editor. It should start with something like:
Code:
Editor = {
time=0,dt=0,x=0,y=0,z=0,
PlayerX=0,PlayerY=0,PlayerZ=0,PlayerAngleX=0,PlayerAngleZ=0,PlayerXPrev=0,PlayerYPrev=0,PlayerZPrev=0,
SelectedWaypoint=0,pi=3.1415926,
v1="",pressedKey="",EOL= string.char(10),
Message1="",Message2="",Message3="",MoveMult=1,EditorRunning=1,

.
Select an aircraft and check that the Edit Script button works correctly.
Basically, if it's working on the demo map then it must be correctly installed.
If still no joy, you could replace Editor.lua with the latest version:
https://dl.dropbox.com/u/4380128/Editor.lua
.
Good luck and let me know how it goes....
Chris
  Beginner BeginnerMember since: 19.07.2012, 16:56Posts: 7 Likes: 0
 

 Post Topic: Re: Flyable aircraft
PostPosted 29.07.2012, 13:19 
With your new Editor.lua the edit script works. The reload button still gives an error with which doesn't make any sense. The compiler can't find the file, but it can be opened...

I'm using the december2011 version and the aaa Editor1 in the Train_Journey level works! (getting the reload error here too ) I see the editor text and I can tune the track.

It's not working for me when I create a new level however.
I can add the entry, and I see the start of the track, but once i go Ctrl+G I'm missing the Editor :)
Image
  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 1832 Likes: 4
 

 Post Topic: Re: Flyable aircraft
PostPosted 29.07.2012, 15:34 
Hi Cultor,
That's good, so it does work in the demo map. So why not in your map?
There's one definite possibility. Whenever you click reload script or start the game, the editor loads the track data. I don't think it has error checking for this, so if the Properties setting for LoadTrackFile is wrong it'll probably generate a Lua error and will not work at all.
So, click LoadTrackFile and navigate to scripts\aircraft\data and choose the same file that was used in the demo map. It was probably
scripts/entities/trains/data/island_track_data.txt
Later today I'll probably add some error checking for this problem and upload the Lua file.
.
Or, load the demo map, select the editor and save as a group file (from the Modify top menu). Then delete the editor in your own map, and load the group file. The editor will have the flow graph and exactly the same Properties settings as in the demo map. There's a good chance this will fix the problem.
.
By the way, in the demo map you could also select all the locomotive entities and save as a group file. When you load the group file in your own map you should have the same train as in the demo. This would be much easier than setting up each locomotive and wagon to form your train.
Actually, you will probably need to set each locomotive/wagon for PathDataFile. It must be the same SaveTrainFile in the editor, and you will need to save the track data while running the editor. Hopefully the manual makes this clear.
Let me know how it goes!
Chris