Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Black screen (well at least the logo's show up!) #220523
08/07/08 13:57
08/07/08 13:57
Joined: Aug 2008
Posts: 55
United Kingdom
CdeathJD Offline OP
Junior Member
CdeathJD  Offline OP
Junior Member

Joined: Aug 2008
Posts: 55
United Kingdom
Ok i am getting a black screen problem! here is my code:

================================================================
///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////////////////////////////////////
fps_max=100;

VECTOR camera_rot;
ENTITY* picture;

wait(5);

camera.x = 0;
camera.y = -500;
camera.z = 0;

picture=ent_create( "untitled.bmp",vector(0,0,0) )

function main()
{
vec_set(camera_rot,picture.x);
vec_sub(camera_rot,camera.x);
vec_to_angle( camera.pan ,camera_rot);
wait(1);
}
=============================================================

"Untitled.bmp" is a picture in the same directory as the script. The code in the func_main should make the camera point at the loaded sprite... but doesn't! Besides the shareware logos the screen is blank!


I am a noob to this... Blitz3D is where i am best at!
Re: Black screen (well at least the logo's show up!) [Re: CdeathJD] #220577
08/07/08 14:31
08/07/08 14:31
Joined: Apr 2008
Posts: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
Austria
The screen is blank because your code does not do anything.

You need to put your commands in a function, otherwise they are not executed.

And before you can create entities, you must open a level.

I recommend the lite-C tutorial!

Re: Black screen (well at least the logo's show up!) [Re: Petra] #220578
08/07/08 14:34
08/07/08 14:34
Joined: Aug 2008
Posts: 55
United Kingdom
CdeathJD Offline OP
Junior Member
CdeathJD  Offline OP
Junior Member

Joined: Aug 2008
Posts: 55
United Kingdom
but i have no level that i want to open i just want to create some entities. The code DOES do something it asks the camera to look at the sprite. Seeing as the program has loaded and not errored why has it not pointed the camera at the object... thus making it visible on screen?


I am a noob to this... Blitz3D is where i am best at!
Re: Black screen (well at least the logo's show up!) [Re: CdeathJD] #220580
08/07/08 14:35
08/07/08 14:35
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
i don't use A7, but i don't think they've changed the way you code that much?

try
Code:
///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////////////////////////////////////
fps_max=100;

ENTITY* picture;

function fncLookAtObject(ent){
	me = ent; //set me as ent that's been passed, now this function can be used more than once =)
	var camera_rot[3]; //declaring this a function will make it local to this function only
	vec_set(camera_rot,my.x);
	vec_sub(camera_rot,camera.x);
	vec_to_angle(camera.pan,camera_rot);
}

function fncCreatePicture{
	picture = ent_create("untitled.bmp",vector(0,0,0),null); //you had to assign an action in A6, not sure about A7 (that's the null part)
	//for vector(0,0,0) you can put nullvector

	fncLookAtObject(picture);
}

function main() 
{ 
	level_load("myLevel.wmb"); //change this to your level name
	wait(2);

	vec_set(camera.x,vector(0,-500,0); //sets the position of the camera

	fncCreatePicture(); //calls the create picture function =D
}


Hope this helps... if A6 didn't get swept away too much =/

Re: Black screen (well at least the logo's show up!) [Re: MrGuest] #220581
08/07/08 14:53
08/07/08 14:53
Joined: Apr 2008
Posts: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
Austria
When you have no level, just open an empty level:

function main()
{
level_load("");
ENTITY picture=ent_create(...);
...


But all this is in the tutorial and already explained on the first few pages. It makes no sense to write a program without knowing the language.





Re: Black screen (well at least the logo's show up!) [Re: MrGuest] #220582
08/07/08 15:04
08/07/08 15:04
Joined: Aug 2008
Posts: 55
United Kingdom
CdeathJD Offline OP
Junior Member
CdeathJD  Offline OP
Junior Member

Joined: Aug 2008
Posts: 55
United Kingdom
Thanks but it didnt work. I also DID try going through the LITE-C beginners workshops.. but it asks in one of them to open up the WED editor... which doesnt work on my computer :'(


I am a noob to this... Blitz3D is where i am best at!
Re: Black screen (well at least the logo's show up!) [Re: CdeathJD] #220583
08/07/08 15:05
08/07/08 15:05
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
Just load a blank level..

FUNCTION main()
{
level_load(null);
wait(1);
...


Hello everyone my name is Ivan Mandic from "Frozen pixel studio". wink
-----------------------------------
Homepage: www.fpx-studio.com
e-mail: emu_hunter_1990@hotmail.com
(working on a game engine)
Re: Black screen (well at least the logo's show up!) [Re: cro_games] #220587
08/07/08 15:15
08/07/08 15:15
Joined: Aug 2008
Posts: 55
United Kingdom
CdeathJD Offline OP
Junior Member
CdeathJD  Offline OP
Junior Member

Joined: Aug 2008
Posts: 55
United Kingdom
Originally Posted By: cro_games
Just load a blank level..

FUNCTION main()
{
level_load(null);
wait(1);
...


Ta but im thinking of giving up on this game engine... its seems well bugged and backwards, frequently crashes and WED editor wont even run. Shame! It looked so pretty too!


I am a noob to this... Blitz3D is where i am best at!
Re: Black screen (well at least the logo's show up!) [Re: CdeathJD] #220589
08/07/08 15:28
08/07/08 15:28
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
what OS are you using ?


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Black screen (well at least the logo's show up!) [Re: Blade280891] #220590
08/07/08 15:35
08/07/08 15:35
Joined: Aug 2008
Posts: 55
United Kingdom
CdeathJD Offline OP
Junior Member
CdeathJD  Offline OP
Junior Member

Joined: Aug 2008
Posts: 55
United Kingdom
XP Pro, intel petium 4 3.20ghz with 3gb RAM and and ATI HD2900 video card... and yes i have tried turning it off and on again! :p


Last edited by CdeathJD; 08/07/08 15:36.

I am a noob to this... Blitz3D is where i am best at!
Page 1 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1