iamcheeseontoast Posted August 22, 2010 Share Posted August 22, 2010 Been modding in BF series for a few years now and decided to go for an actual game. Likede the demo of the Leadwerks engine, unfortunately you can't import anything. Before decided on spending money on an engine can you guys tell me whats involed in creating a - Misc Statics b - (Most Important) Whats involved in getting vehicles ingame. And how complicated it is. (UDK is a nightmare, lol). www.bigkidcreations.com Cheers Quote Link to comment Share on other sites More sharing options...
Canardia Posted August 22, 2010 Share Posted August 22, 2010 Very easy, I made a playable car racing game in less than a day. So you can race on a track and it records your times. The source code of the game is about 50 lines of code (not counting gamelib code lines). For importing models I use UU3D Pro, because I can convert any free or commercial models I find on the internet to Leadwerks game model format with it (.gmf). There's also lots of free models already in gmf format on this website when you are a registered LE user. I'm still expanding the game, although it's kinda finished and playable already at this stage, and next I'll add multiplayer and lots of more things. Here's a video what is possible to make in a few hours with Leadwerks Engine. Note that the visual flaws with the cockpit are just because I haven't adjusted the camera near range yet, its just one command to do that. I might also adjust the spring strengh of the camera when accelerating, that's also just one value to change (in gamelib): Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Mumbles Posted August 22, 2010 Share Posted August 22, 2010 Hopefully you don't have a driving license. You'll kill someone driving like that. can you guys tell me whats involed in creating a - Misc Statics I presume you mean how do you import your models into the engine? If so, .gmf is the model format for leadwerks, so you'll need an exporter to make your models leadwerks ready. The most popular one I believe is for Ultimate Unwrap 3D, but there is also one for 3DS Max and there are a few for other modelling apps too... Then it's just a case of using LoadModel() to make it appear. b - (Most Important) Whats involved in getting vehicles ingame. And how complicated it is. (UDK is a nightmare, lol). There's a special command set (link) for vehicles. I believe they are now working (at times in the past they didn't work properly, but like I say, I think that's fixed now). Vehicles though are physics bodies, which you can create in code, or export from a modelling app (as a wavefront obj), and then run that obj file through something called "phygen" (included for free) which will create a custom physics shape. If your vehicle model (.gmf extension) and the generated physics shape file (with a .phy extension) are in the same folder, then your model will be linked to a physics body. Turn that physics body into a vehicle then you can move it around with the vehicle commands, and the graphical model will stay perfectly synchronised with it. It may be a bit wordy, but really, take it step at a time, and you'll see that you can load your vehicle in just two lines of code. Which must be easier than it is in UDK... Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
Canardia Posted August 22, 2010 Share Posted August 22, 2010 Hopefully you don't have a driving license. You'll kill someone driving like that.Well I have a yellow Smart Brabus with 187 horse powers. But it's not so serious like a normal car, so I can just drive like in a game. Also physics doesn't seem to be as gimped as with real cars, so I can accelerate and brake much faster Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Sean Posted August 22, 2010 Share Posted August 22, 2010 Lumooja: I am curious how you did the engine sound and shift points. I did something like that one time. My approach was to literally recreate an auto trans valvebody in code. I lost that code through the years.. Quote AMD Phenom II X6 Black Edition, 8GB, 120 GB SSD, 2TB HDD, nVidia GTX 570 1.2GB, Win 7 x64 Intel Core i5, 4GB, 120GB SSD, NVidia 360M 1GB, Win 7 x64 Link to comment Share on other sites More sharing options...
Canardia Posted August 22, 2010 Share Posted August 22, 2010 In the video it's just a quick hack, I'm using only 3 sounds (accel, brake, idle) which I then mix and stop when another one needs to be played (using TSource entities). In the final game I will split each sound into a start, increase (multiple sounds) and loop sequence, so I have full control of the sound dynamics. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Mumbles Posted August 23, 2010 Share Posted August 23, 2010 I think in one of the old tutorials, Josh said that engine revving can be done via the SetSourcePitch() command Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
Canardia Posted August 23, 2010 Share Posted August 23, 2010 Yeah, but it sounds good only within a certain pitch range. When the pitch gets too high or low, you need a new sound for the next octave, because in engines and musical instruments not only the pitch changes, but also the waveform. And changing the pitch also makes the sound play faster, since OpenAL doesn't have that synthesizer feature that you can change the pitch and keep the speed the same. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Laurens Posted August 23, 2010 Share Posted August 23, 2010 Took a look at your website OP. Some nice stuff you have there On-topic: there is a vehicle script that comes with the evaluation kit I believe (including controls and proper physics). If it doesn't, well, the full version definatly has. Anyway, you can simply modify that one to suit your needs. No need to reinvent the wheel Cheers! Quote Link to comment Share on other sites More sharing options...
Michael Betke Posted August 23, 2010 Share Posted August 23, 2010 This is cool. I want to make a tractor driving around game for my 4 year old son. He would have fun with it driving just around in a cartoony world with a tractor or other vehicle. Quote Pure3d Visualizations Germany - digital essences AAA 3D Model Shop specialized on nature and environments Link to comment Share on other sites More sharing options...
VeTaL Posted August 29, 2010 Share Posted August 29, 2010 Lumooja, how you could connect wheels to car body so they don't shake car? In my case, car is shaking like boat in a storm ( http://leadwerks.com/werkspace/index.php?/topic/2664-vechicle-model-problem/ ) Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.