|
Black Screen when Test Runing in Lite-C
#236647
11/15/08 15:21
11/15/08 15:21
|
Joined: Nov 2008
Posts: 20
deyshawn
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 20
|
Hi, I am trying to make a basic flight game. I am using the mig.hmp model from the litech workshops and a terrain level which is my own. I have borrowed a lot of code from the Litech workshops. When I test run it, the test run screen is black. but when I run the unmodifyed workshops, they seem to work fine. I deleated the #include <acknex.h> line at the top to see if I could get an error, but i still got the black screen. Does the black screen signify that there is an error with my code, or is there something wrong with the SED itself?
Here is my code:
#include <acknex.h> #include <defualt.c>
VECTOR jet_speed; ENTITY* jet;
function main() { fps_max = 140; level_load("riverbed.hmp"); wait (2); jet = ent_create ("mig.hmp", vector(-400,0,100), NULL); ph_setgravity (vector(0,0, -386)); phent_settype (jet, PH_RIGID, PH_CUBE); phent_setmass (jet, 3, PH_CUBE); phent_setfriction (jet, 80); phent_setdamping (jet, 40, 40); phent_setelasticity (jet, 50, 20); while(1) { jet_speed.x = 25 * (key_a - key_d); jet_speed.y = 25 * (key_w - key_s); jet_speed.z = 25 * (key_cuu - key_cud); phent_addtorqueglobal (jet, jet_speed); camera.x = jet.x - 300; camera.y = jet.y; camera.z = jet.z; camera.tilt = -60; wait (1); } }
|
|
|
Re: Black Screen when Test Runing in Lite-C
[Re: deyshawn]
#236673
11/15/08 18:35
11/15/08 18:35
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Does the black screen signify that there is an error with my code, or is there something wrong with the SED itself? For sure not. Errors are signalized through error messages. Make sure you run the file you're editing by pressing alt + f5. You have to include acknex.h. And it's default.c not defualt.c. Dunnow if that's just a typo here or in your code.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Black Screen when Test Runing in Lite-C
[Re: Hallucinogen]
#236704
11/15/08 23:59
11/15/08 23:59
|
Joined: Nov 2008
Posts: 20
deyshawn
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 20
|
level_load("riverbed.hmp");
i may be mistaken but to load a level does it not have to be the .wmb file that it loads? hmp is a terrain file I am not sure. I am a beginner at programming. If so, how would I compile the terrain.hmp with a sky layer like blood_gorge+6.tga (that is from a workshop). Also, my computer does not recognize .tga and .pcx files. Is this a problem?
Last edited by deyshawn; 11/16/08 00:38.
|
|
|
Re: Black Screen when Test Runing in Lite-C
[Re: deyshawn]
#236709
11/16/08 01:29
11/16/08 01:29
|
Joined: Oct 2008
Posts: 218 Nashua NH
heinekenbottle
Member
|
Member
Joined: Oct 2008
Posts: 218
Nashua NH
|
Never mind, i just read in help that Level_load accepts .hmp and .hmp was not listed in the help on ent_create.
Last edited by heinekenbottle; 11/16/08 01:43.
|
|
|
Re: Black Screen when Test Runing in Lite-C
[Re: heinekenbottle]
#236714
11/16/08 01:56
11/16/08 01:56
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Well, although I wouldn't use vista with an 1.7 GHz processor your laptop should be fine. And I've never heard of a bug like that. Please click on teh gears icon in the top toolbar of sed with the name "preferences" and ensure there is the file you want to run given under "Main Script to run / publish". A black engine window with nothing more is normally the result of an empty script. If that doesn't work, try a "printf("test");" at the very beginning of your main function. Is there then a message box appearing saying "test"? Also ensure you saved your file with the extension ".c".
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Black Screen when Test Runing in Lite-C
[Re: Uhrwerk]
#236716
11/16/08 02:25
11/16/08 02:25
|
Joined: Nov 2008
Posts: 20
deyshawn
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 20
|
Well, although I wouldn't use vista with an 1.7 GHz processor your laptop should be fine. And I've never heard of a bug like that. Please click on teh gears icon in the top toolbar of sed with the name "preferences" and ensure there is the file you want to run given under "Main Script to run / publish". A black engine window with nothing more is normally the result of an empty script. If that doesn't work, try a "printf("test");" at the very beginning of your main function. Is there then a message box appearing saying "test"? Also ensure you saved your file with the extension ".c". There was no file given under "Main Script to run / publish" however, when I chose the script I have been wanting to run (I called it "flightscript.C")and then test run, I still get a black screen. The "printf("test");" didn't do anything.
Last edited by deyshawn; 11/16/08 02:27.
|
|
|
Re: Black Screen when Test Runing in Lite-C
[Re: deyshawn]
#236718
11/16/08 02:37
11/16/08 02:37
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Ensure you have the file name including the complete path to the script selected "Main Script to publish / run". Alternatively press Alt + F5 when you got your script opened in the editor. as long as the test message does not appear and you don't get error messages the engine is not running your script. If that doesn't fix the problem maybe your installation is corrupted. What version of Game Studio do you use?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|