Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: initializing problem  (Read 2236 times)
siskin
Community Member
*
Posts: 9


« on: July 26, 2010, 04:30:28 PM »

Hello, i'm new to this engine (to any engine for that matter) and i started about 2 days ago.

Since i have some experience with C#, i'm using this language.

So far, i can say i grasp the basics, and i have managed to create my own terain with custom texture (i don't understand exactly how splatting is done, but i'm getting there) and a lake, fog and sun.
I also managed to create the camera controls in a FPS style, and crouching works perfectly.

I use Visual Studio, and so far things are well, except for one problem i couldn't solve.

When i move the application in any other location, it stops at "InputEngine.Initialize();" as if it had a breakpoint. If i comment that line, the program loads fine but there is no keyboard input (obviously).
Does anyone have a clue why does it freeze like that ?

On a side note: can someone point me to one or more tutorials showing how to implement jumping, and impassible terrain (too steep or too close the the edgeof the map)?
I tried a newb approach to impassible terrain, by not allowing movement if the angle is too steep, but i just have to walk diagonally and slowly but surely i can get to the top of even nearly vertical surfaces.

Regards,
Siskin
Logged
siskin
Community Member
*
Posts: 9


« Reply #1 on: July 27, 2010, 02:09:06 AM »

aparently the freezing was caused by bitdefender acting up and blocking the application because it is potentialy maliciuos (listens for keystrokes, just like a keylogger).

Still, i would really apreciate if someone could point me tu a tutorial about impasssible terain.
Logged
uncasid
Community Member
*
Posts: 109


« Reply #2 on: July 27, 2010, 07:40:28 AM »

Depends on the terrain you are using..  If you are using tv terrain.. use physics Smiley  It is built in.  The search function will show a lot of stuff.
Logged
siskin
Community Member
*
Posts: 9


« Reply #3 on: July 27, 2010, 08:40:21 AM »

Thanks Smiley

Also, does anyone else have a problem with running  the created application on other PCs ?

I tried on 2 different PCs (other than the developer machine) and they both trow error.

On Win Xp:

 "truevision 3d application has encountered a problem and needs to close."

Error Signature:
AppName: truevision 3d application.exe      AppVer: 1.0.0.0     AppStamp:4c4ed550
ModName: kernel32.dll      ModVer: 5.1.2600.3541      ModStamp:49c4f751
fDebug: 0       Offset: 00012a6b

On Win 7 :
"truevision 3d" has stopped working."


The only way i can replicate this on the dev machine (win 7) is by deleting "MTV3D65.dll"
from the applications folder folder.

I think there's something i'm missing since i don't think i need to manually install truevision on every PC i want ot run my program on.

Cany anyone help me ?
Logged
uncasid
Community Member
*
Posts: 109


« Reply #4 on: July 27, 2010, 09:06:12 AM »

You need to make sure you copy the bin folder.  You also need to make sure DX is on all of the machines.  Build yourself a better error testing routine, put a try / catch in the init stuff, show the error (saves a lot of headache).  It is usually something you just forgot..  Also, make sure you have your game in one directory and use relative paths (as in "bin\release" etc..  Absolute will cause grief.
Logged
uncasid
Community Member
*
Posts: 109


« Reply #5 on: July 27, 2010, 09:07:02 AM »

Ohh, you will also run into problems with 64 bit compiling..  make sure you set target to x86 in your project settings.
Logged
siskin
Community Member
*
Posts: 9


« Reply #6 on: July 27, 2010, 09:51:02 AM »

i tried the following:

Target changed from Mixed platforms to x86 - same error

Copied the whole bin folder - same error

Changed
Code:
static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
to
Code:
static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
and the messagebox doesn't show up, instead it's still the uncaught exception window described above. This leads me to belive that my initial asumption was correct: The program searches for MTV3D65.dll and it can't find it so it throws an error before getting to the main application entry point.

The game is in one directory. I can copy it anywhere on the dev machine and run it with just the "Resources" folder, "MTV3D65.dll", and "TrueVision 3D Application.exe" all in the same folder.

The paths are relative to "3D Application.exe"

Example:

the files are located in:
D:\TrueVision 3D Application\bin\Debug\TrueVision 3D Application.exe
D:\TrueVision 3D Application\bin\Debug\MTV3D65.dll
D:\TrueVision 3D Application\bin\Debug\Resources\Up.jpg
D:\TrueVision 3D Application\bin\Debug\Resources\Down.jpg
D:\TrueVision 3D Application\bin\Debug\Resources\Left.jpg
D:\TrueVision 3D Application\bin\Debug\Resources\Right.jpg
D:\TrueVision 3D Application\bin\Debug\Resources\Front.jpg
D:\TrueVision 3D Application\bin\Debug\Resources\Back.jpg
etc

This is copy / paste of how i acces them:

Code:
TextureFactory.LoadTexture(Application.StartupPath + "\\Resources\\up.jpg", "SkyTop", -1, -1);
            TextureFactory.LoadTexture(Application.StartupPath + "\\Resources\\down.jpg", "SkyBottom", -1, -1);
            TextureFactory.LoadTexture(Application.StartupPath + "\\Resources\\left.jpg", "SkyLeft", -1, -1);
            TextureFactory.LoadTexture(Application.StartupPath + "\\Resources\\right.jpg", "SkyRight", -1, -1);
            TextureFactory.LoadTexture(Application.StartupPath + "\\Resources\\front.jpg", "SkyFront", -1, -1);
            TextureFactory.LoadTexture(Application.StartupPath + "\\Resources\\back.jpg", "SkyBack", -1, -1);

As i side note, the target Framework is 2.0
« Last Edit: July 27, 2010, 09:56:46 AM by siskin » Logged
siskin
Community Member
*
Posts: 9


« Reply #7 on: July 28, 2010, 01:37:53 PM »

Another problem i discovered, is that the model converter doesn't work.

The error is:
___________________________________
Converter.exe - System Error

The program can't start because MTV3D65.dll is missing from your
computer. Try reinstalling the program to fix this problem.
___________________________________

This indicates a faulty installation of the TrueVision Engine, tough i installed it as administrator, and there were no errors during the install. I reintalled TV3D after this error, but it didn't make a difference

Also, in Add reference -> COM i only have 2 items related to TrueVision:

TV3D SDK 6.5 - Delphi/COM Release located in C:\Program Files\TV3D SDK 6.5\sdk\delphi\MTV3D65.dll

TV3D SDK 6.5 - VB Release located in C:\Program Files\TV3D SDK 6.5\sdk\vb\TVb3D65.dll

so, i went to Browse tab, and manually loaded C:\Program Files\TV3D SDK 6.5\sdk\dotnet\TVb3D65.dll

I believe this is somehow related to the problem about my programs not running on other machines.

Anyone got a suggestion ?
Logged
uncasid
Community Member
*
Posts: 109


« Reply #8 on: July 28, 2010, 02:16:19 PM »

your dll for mtv should be in the same folder as your bin.. have all of your executables there.. also, are you sure that DX is installed?  Can you run applications (with c#) that don't use TV?  You might also need to remove TV and install it again.  The model converter should work.. which means that it isn't TV that is causing the problems.
« Last Edit: July 28, 2010, 02:18:21 PM by uncasid » Logged
uncasid
Community Member
*
Posts: 109


« Reply #9 on: July 28, 2010, 02:20:43 PM »

are you are using delphi or are you using vb6?  We need to know what you are using.  If you are using Dot Net, get the dll from the .net folder.. it works for c# / vb.net

the name is MTV3D65.dll, also snag the XML file.

Sorry for my confusion with you btw..
« Last Edit: July 28, 2010, 02:23:31 PM by uncasid » Logged
siskin
Community Member
*
Posts: 9


« Reply #10 on: July 28, 2010, 03:12:14 PM »

as i said in my first reply, i'm using C#.
C# in Visual Studio to be precise.

When adding reference only delphi and VB releases are registered in COM, so i had to manually browse to "TV3D SDK 6.5\sdk\dotnet\MTV3D65.dll"

so, i went to Browse tab, and manually loaded C:\Program Files\TV3D SDK 6.5\sdk\dotnet\TVb3D65.dll
Sry, "TVb3D65.dll" was a typing error, i meant "MTV3D65.dll"

Also, about the XML file ,can you please be more precise ? Should i add reference to the XML as well ?
Logged
uncasid
Community Member
*
Posts: 109


« Reply #11 on: July 28, 2010, 11:27:26 PM »

Tv is not a com object.. by the way.. the comment on my last post is because of all the information that doesn't doesn't need to be here.  You are working with c#, why do you care what Delphi / VB does?  Lets worry about c#.

As for com, com is old technology.  c# is dot net.  the tv dot net dll is meant to be added by reference. Please pardon me if this is too simple, I just want to make sure all bases are covered here...  have you right clicked on references in your c# project, then clicked on "browse", then selected the tv dot net dll, then added it?  If so, that is ALL (besides making sure to target 32 bit) you need to do.. the rest is just using the namespace.  When you add the dll this way, it will auto put it into your bin folder, along with the xml.. the xml (if I remember correctly) is really only for intellesense.

Now, for the tv model viewer, did you ever get that working?  If not, did you copy the dll over to the same location as the model viewer executable?

Also, to help me understand where you are.. how long have you been working with c#?

(jesh, having a hard time getting my head together)
« Last Edit: July 29, 2010, 12:06:22 AM by uncasid » Logged
siskin
Community Member
*
Posts: 9


« Reply #12 on: July 29, 2010, 03:31:25 AM »

i have 4 years of programming experience... highschool years to be precise.
3 of C++ in ancient MS-DOS platform, and 1 in C# (to which i fell in love and spent my free time coding in it ever since)
about a week ago, i decided 3d programming would be a nice adition to my skills, so i googgled for directx 3d programming, went to a tutiral saying you need an engine, looked up what it meant, then i found a site comparing engines, and finally i decided to go with truevision3D.

This would be my background Smiley


i started following this tutorial, and got stuck at adding reference since i don't have TV3D Media and TV3D Engine, so knowing C# is a .NET language, i manually browsed to the tv dot net dll (via project -> right click -> add reference -> browse -> select dll). The target platform is x86 so yeah, 32bit.

The XML file is not added along with the .dll

Yeah i copied MTV3D65.dll from "TV3D SDK 6.5\sdk\dotnet", see below.



I also tried with Conv3ds.exe (from what i understand, it's pretty much the only free tool for converting) but this one says "The program can't start because d3drm.dll is missing from your computer. Try reinstalling the program to fix this problem."

It turns out, that "d3drm.dll missing" is associated with faulty directx installation, tough i recently installed the latest directx sdk, and i had no errors during install.
What i don't understand, is what do you mean by using the namespace. It has to be named in a certain way, or you mean i just have to make sure all source files (.cs) are using the same namespace (in which case, nothing's new)
Logged
uncasid
Community Member
*
Posts: 109


« Reply #13 on: July 29, 2010, 08:12:39 AM »

Hah, dx install..  I knew it was something like that..  As for the name space..  it is simple..

if you include the dll into your references, in c#, create a class, then type "MTV3D65." and you will see all that stuff..  TV exists in the MTV3D65 namespace Smiley  BTW, you don't really need the dx sdk to work with TV (unless you intend to do some dx programming).  Start with TV, then branch out..  things will get plenty complicated while working with tv..  Believe me
Logged
siskin
Community Member
*
Posts: 9


« Reply #14 on: July 29, 2010, 09:21:54 AM »

The dx sdk was installed before i found out about 3D engines.

By namespace, i thought you meant this:


namespace TrueVision_3D_Application
{
    public partial class Form1 : Form
    {       
        TVEngine TV;
        //etc continuing with declarations


As for all the stuff contained in MTV3D65, it's kinda hard to try to learn them blindly with no description., especially since they require to be in a certain sequence, and in the proper order (like rendering order).

I prefer to reverse engineer the demos and samples, it's faster and much more clear to me than tutorials to which i might have unanswered questions.

Btw, do you have a working sample of terrain self-shadow and/or shaders, that you can spare ? The demos i found either require a beta key, or throw an error "MSB6006: "cmd.exe" exited with code 9009.   C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets"

The project that throws that error is located here.
Logged
uncasid
Community Member
*
Posts: 109


« Reply #15 on: July 29, 2010, 10:15:39 AM »

yes, that is the name space.. TV has something similar to what you have there..

As for the other issues.. there are a lot of demo's out there.  The good news is you can pretty much use any demo from anywhere, all you have to do it put it into TV correctly.  All the theories are still the same (for the most part).  As for the errors you are getting... man, sounds like you have a lot of install issues.. is your HD dying?  Also, if you want to get to know shaders... Zak has some pretty sweet stuff (that site you listed)!  You have a bunch to learn man, you have no idea..  Try to stick with SM2/SM3 for the shaders for now.  In all honesty, I really don't think you should start there.  get used to loading textures / models / making things move / making cameras / mini-meshes / and engine math functions..  once you understand this stuff, move to the theory like render surfaces and shaders / shadows / etc.
Logged
siskin
Community Member
*
Posts: 9


« Reply #16 on: July 29, 2010, 11:45:04 AM »

As for the errors you are getting... man, sounds like you have a lot of install issues.. is your HD dying?

I hope not Smiley

Thanks for all the advices.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks