Updating to A8 [SOLVED]

Posted By: Dooley

Updating to A8 [SOLVED] - 06/21/19 00:32

UPDATE: The old shaders I was using from A7 were preventing the game from compiling in A8.

I am updating my games to work with A8.
One of them worked with very little issues. My other game, which is older and bigger in terms of content, is not so easy. The game crashes before loading, and the log looks like this:

Code
Log of A8 Engine 8.47.1 run at Thu Jun 20 19:25:15 2019
Schmidt on Windows NT/2000/XP version 6.1 Build 7601
Options level_001.c -nx 500 -diag
App: C:\Program Files (x86)\GStudio8\acknex.exe in E:\My Documents\3dGameStudio\Star Explorers\Star Explorers Lite-C - A8\

MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened(c) Conitec - www.3dgamestudio.com
A8 Engine - Pro Edition V8.47.1 - Mar  9 2016
Development version
Registered to: Michael Schmidt

Mouse found
Speakers (VIA High Definition Audio) opened
NVIDIA GeForce GTX 770 pure T&L device 1ff9 detected
D3D device NVIDIA GeForce GTX 770 1ff9 selected.
knownfolder.dll opened
SteamGS.dll opened
acknet.dll opened
ackoal.dll opened
ackphysX.dll opened
Compiling LEVEL_001.C - [Esc] to abort....
PATH C:\Program Files (x86)\GStudio8\code\
PATH C:\Program Files (x86)\GStudio8\templates\images\.......
PATH C:\Program Files (x86)\GStudio8\code\...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................


Not sure what to look for, it is not giving me any cause for the crash. I set warn_level to 6, but no warnings pop up.

I am sure it has to do with my code, since my other game worked fine.

I'm just wondering what sorts of things I might want to look for as potential causes for this behavior. The error seems to be happening during the compiling process, before the "main" function is even called.

Posted By: Dooley

Re: Updating to A8 - 06/21/19 02:56

For the record, I have gone through the manual and found this "A8 is 100% compatible to A7, so all A7 projects will nomally still run under A8 without any change" under the Updating and New Features section.

I am not using any physics, so I don't think the new physics engine will make a difference...
Also, it is all in Lite-c, no c-script is used.
Posted By: Emre

Re: Updating to A8 - 06/21/19 08:40

That's weird.

Just in case you should know that there may be one or two little issue about compatibility in A8 but they are not important.

For example: In the past, we used the pansetdigit function to add string to the panel. We could set NULL the pv. (last variable of pan_setdigits.)
sample:

Code
pan_setdigits(testpan,0,0,0,"asdasdasd",myfont,1,NULL); 


As far as i remember in A8 you can't set NULL pv. if you do that, you will get error. (invalid pointer) so instead, you have to use pan_setstring function. (which is the correct function for this purpose. So there is no problem.)

But your situation looks like different. You are not getting an error message. That could be anything. Maybe you're facing an undiscovered bug.
Posted By: Dooley

Re: Updating to A8 - 06/21/19 11:15

Thank you,
I am reading more and I encountered the issue about using old scripts and .fx files. I think this might be the cause, since I did use some modified scripts and a number of .fx files from A7.

I appreciate your input, I know I used pan_setdigits, but I will have to see if that's a factor...
Posted By: Dooley

Re: Updating to A8 - 06/21/19 15:49

Yes! It was the shaders I was using. By disabling those, I am able to get the program to compile and run!

I know, it's in the manual. But ... I don't know, it helps to come here and put down my questions in a coherent form. It's like, public scrutiny will force me to ask the right questions, and that helps me know what to look for. Plus, now others who face a similar issue might be able to benefit from my efforts.
Posted By: Emre

Re: Updating to A8 [SOLVED] - 06/22/19 10:23

Originally Posted by GAMESTUDIO MANUAL (A7)
Q. Strange things happen when I run my project.
A. If you've copied script or .fx files from a program folder into your project folder, and/or modified them, make sure that they are updated as well. Apart from that, see compatibility notes below.


Just for better understanding; this was the issue i guess? That means; the problem is not about A8->A7 compatibility, but about updating.

Because i'm very sure there is no differences about hlsl, between A7 and A8. Except; The A8 includes a number of features that are not affect compatibility like: "support for: include code from fx files with the #include statement" or "allowing the effect file to contain several techniques for different materials."

By the way, i'm glad you solved the problem.
Posted By: Dooley

Re: Updating to A8 [SOLVED] - 06/23/19 21:19

So far, I disabled the view shaders, so I removed any reference in the script to .fx files. After doing that, the script was able to compile. I am guessing that I was using some old shaders that were no longer compatible, but I really don't know which ones. By the way, these are view shaders from the Wiki, so many of them were fairly old.

I am starting to re-introduce the built in shaders to replace the old ones.

Also, I was using a script called PP_Helper.c which I can't quite remember where I got. Maybe from AUM? It looks like A8 has a built in command pp_set and pp_add that has the same functionality, so I will be using those...
Posted By: Dooley

Re: Updating to A8 [SOLVED] - 06/23/19 21:22

The manual mentions this: "Or you've earlier copied script or .fx files from one of the program folders in your project folder, leaving your project now with a mix of old and new files. The error line is displayed, so fixing the script errors is normally easy." under the Updating & New Features section.

For me, the error line was not showing, so I did not pick up on it right away.
Posted By: Dooley

Re: Updating to A8 [SOLVED] - 06/23/19 21:26

Another smaller issue I encountered has to do with PASSABLE entities.
In my game I have some models in a level with the PASSABLE flag set. The script associated with those entities will use ent_morph to change the models as needed, then reset the PASSABLE flag, so they can be interacted with. In A7 this worked fine. However, in A8, the entity remained PASSABLE even after the script reset the flag. So I think if an entity's PASSABLE flag is set in WED, then the script cannot override it. This was easy to fix, but I thought it should be noted.
Posted By: Emre

Re: Updating to A8 [SOLVED] - 06/24/19 16:20

Thank you for informations.
Posted By: Dooley

Re: Updating to A8 [SOLVED] - 06/24/19 21:26

Here's a related issue:
Setting something PASSABLE in WED also seems to prevent c_trace from hitting it. Setting it as PASSABLE in a script does not have the same effect.
Posted By: Dooley

Re: Updating to A8 [SOLVED] - 06/25/19 16:00

Another issue I discovered:

If I used "snd_stop(snd_handle);" in A7, it would run fine.

Now, in A8 this will crash the game unless there is a "if(snd_playing(snd_handle))" statement before it.

To be more precise, it crashes the game if it is published, but if it is running through WED, it works fine.
Posted By: txesmi

Re: Updating to A8 [SOLVED] - 06/27/19 12:55

That PASSABLE issue sounds pretty weird for me so I did some tests. It seems that when you set an entity as passable in WED, it prevents the engine to compute the collision hull of the entity. If you try to change the PASSABLE flag, it is actually changed but has no effect. Every FAT & NARROW, min & max, changes has no effect too. Calling 'c_updatehull' builds entity's collision hull and makes it behave normally. So I guess it has something to do with the lack of a collision hull. Checking BBOX on WED, as well as calling 'c_setminmax', should force the engine to compute the entity's collision hull, but it does not. I guess this 'c_setminmax' behaviour is actually a bug. Will it ever be fixed? That is another story.
Posted By: Dooley

Re: Updating to A8 [SOLVED] - 06/27/19 15:50

It's fairly easy for me to work around it, so I don't see it as a big problem. But as for fixing it ... who knows, maybe one popular game will spark interest in 3D Gamestudio, and it could take off from there. I could see if they changed to a different pricing model and offered support or platforms other than Windows, that might make all the difference.
© 2024 lite-C Forums