Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 821 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: Test publish critical problem! [Re: ] #456158
11/12/15 20:33
11/12/15 20:33
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline
Member
NeoJones  Offline
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Hi,
I have a big problem and I really dont know, whats the problem here.

So if I test the script in SED, it works fine. If I publish it and test the main.exe on my pc, it all works fine.
If my friend test my published main.exe (on his pc with exact the same files and folders) it dont work. His system is the same, and the video card driver is the newest. The engine window doesnt popup and the "wait" cursor is showing. In taskmanager there is three times "main.exe" ...?

Here is the complete code of my main.c:

Click to reveal..
Code:
//gs includes
#include <acknex.h>
#include <windows.h>
#include <default.c>

//including paths
#define PRAGMA_PATH "filme"
#define PRAGMA_PATH "pause"

//fonts
AddFontResource("exo_light.otf");
AddFontResource("exo_regular.otf");

FONT* exo_light = "exo_light#15";
FONT* exo_regular = "exo_regular#16";
FONT* exo_regular_big = "exo_regular#20";

//vars
var count_filme = 0;
var count_pause = 0;
var current_index = -1;
var mhandle = NULL;
var pause = 0;
var show_fn = 0;
VECTOR desktop_size;

//strings
STRING* count_filme_str = "";
STRING* nj_str = "Developed by NeoJones";

//bmaps
BMAP* nj_logo = "nj_logo.tga";

//text objects
TEXT* txt_label_filme = 
{
	string("Gefundene Filme (");
	pos_x = 30;
	pos_y = 30;
	font = exo_regular;
	size_x = 200;
	layer = 10;
}
TEXT* txt_filme = 
{
	strings = 100;
	pos_x = 30;
	pos_y = 60;
	font = exo_regular;
	layer = 10;
}
TEXT* txt_bilder_label = 
{
	string("Pausen-Standbild:");
	pos_x = 500;
	pos_y = 30;
	font = exo_regular;
	layer = 10;
}
TEXT* txt_bilder = 
{
	strings = 100;
	pos_x = 500;
	pos_y = 60;
	font = exo_regular;
	layer = 10;
}

TEXT* txt_message = 
{
	string("Bitte die Enter-Taste drücken, um den Play-Modus zu aktivieren");
	font = exo_regular_big;
	flags = CENTER_X;
}


//panels
PANEL* pause_pan =
{
  layer = 9;
}

PANEL* nj_logo_pan =
{
	digits(25,60, 5 ,exo_regular_big,1,nj_str);
	bmap = nj_logo;
  layer = 9;
  flags = CENTER_X;
}


function show_filenames()
{
	while(1)
	{
		//show or hide filenames on key_d
		if(key_d)
		{
			while (key_d == 1) { wait(1); }
			if(show_fn == 0)
			{
				show_fn = 1;
				set(txt_label_filme, SHOW);
				set(txt_filme, SHOW);
				set(txt_bilder_label, SHOW);
				set(txt_bilder, SHOW);
			}
			else
			{
				show_fn = 0;
				reset(txt_label_filme, SHOW);
				reset(txt_filme, SHOW);
				reset(txt_bilder_label, SHOW);
				reset(txt_bilder, SHOW);
			}
		}
		wait(1);
	}
}

function start()
{
	//search files in folder "filme"
	count_filme = txt_for_dir(txt_filme,"filme\\*.wmv"); 
	
	//save the number of files as text
	str_for_num(count_filme_str,count_filme); 
	str_cat((txt_label_filme.pstring)[0], count_filme_str);
	str_cat((txt_label_filme.pstring)[0], "):");
	
	//search images in folder "pause"
	count_pause = txt_for_dir(txt_bilder,"pause\\*.jpg"); 
	
	// stop here, if no files in folder
	if(count_pause > 0 && count_filme > 0) 
	{
		STRING* tmp_str = "";
		var i;
		
		//write each correct filename with foldername in string
		for(i = 0; i < count_filme; i++)
		{
			tmp_str = str_create("filme/");
			str_cat(tmp_str, (txt_filme.pstring)[i]);
			str_cpy((txt_filme.pstring)[i], tmp_str);
		}
		
		tmp_str = str_create("pause/");
		str_cat(tmp_str, (txt_bilder.pstring)[0]);
		str_cpy((txt_bilder.pstring)[0], tmp_str);
		
		str_cpy(tmp_str, (txt_bilder.pstring)[0]);
		BMAP* pause_bmap = bmap_create(tmp_str);
		
		while(pause_bmap == NULL){wait(1);}
		pause_pan.bmap = pause_bmap;
		
		//set correct panel sizes and positions
		pause_pan.scale_x = screen_size.x/bmap_width(pause_pan.bmap);
		pause_pan.scale_y = screen_size.y/bmap_height(pause_pan.bmap);
		txt_message.size_x = screen_size.x;
		txt_message.size_y = screen_size.y;
		txt_message.pos_x = screen_size.x/2;
		txt_message.pos_y = screen_size.y/2;
		nj_logo_pan.pos_x = (screen_size.x/2)-25;
		nj_logo_pan.pos_y = screen_size.y-120;
		
		//show logo, message and wait for the enter key
		set(nj_logo_pan, SHOW);
		set(txt_message, SHOW);
		while (key_enter == 0) { wait(1); }
		
		//show or hide correct panels and textobjects
		reset(txt_label_filme, SHOW);
		reset(txt_filme, SHOW);
		reset(txt_bilder_label, SHOW);
		reset(txt_bilder, SHOW);
		reset(txt_message, SHOW);
		reset(nj_logo_pan, SHOW);
		set(pause_pan, SHOW);
		
		//wait, if enter is pressed
		while (key_enter == 1) { wait(1); }
		
		while(1)
		{
			//play next movie on key enter
			if(key_enter)
			{
				while (key_enter == 1) { wait(1); }
				current_index++;
				if(current_index == count_filme)
				{
					current_index = 0;
				}
				reset(pause_pan, SHOW);
				media_stop(mhandle);
				mhandle = media_play((txt_filme.pstring)[current_index],NULL,100);
			}
			
			//play or pause the movie on key space and show or hide the pause image
			if(key_space)
			{
				while (key_space == 1) { wait(1); }
				if(media_playing(mhandle) != 0)
				{
					if(pause == 0)
					{
						pause = 1;
						set(pause_pan, SHOW);
						media_pause(mhandle);
					}
					else
					{
						pause = 0;
						reset(pause_pan, SHOW);
						media_start(mhandle);
					}
				}
			}
			
			//restart current movie 
			if(key_bksp)
			{
				while (key_bksp == 1) { wait(1); }
				media_stop(mhandle);
				mhandle = media_play((txt_filme.pstring)[current_index],NULL,100);
			}
			
			//show pause image after playing a movie
			if(pause == 0 && media_playing(mhandle) == 0)
			{
				set(pause_pan, SHOW);
			}
			wait(1);
		}
	}
}

//////////////////////////////////////////////////////////////////////////////////////////

function main()
{
	//standart optionen setzen
	fps_max = 60;
	text_outline = 30;		
	sky_color.red = 1;
	sky_color.green = 1;
	sky_color.blue = 1;
	
	//desktopauflösung ermitteln
	desktop_size.x = sys_metrics(0);
	desktop_size.y = sys_metrics(1);
	
	//auf ermittelte oder gespeicherte auflösung umschalten
	video_set(desktop_size.x,desktop_size.y,0,1);
	wait(2);
	
	//start functions
	start();
	show_filenames();
}



Can it be, that i have problems with my script why it doesnt work on his pc?
I really dont know...


Last edited by NeoJones; 11/12/15 20:35.

Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Test publish critical problem! [Re: NeoJones] #456160
11/12/15 21:00
11/12/15 21:00
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Is your friend using Windows 10?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Test publish critical problem! [Re: Superku] #456161
11/12/15 21:20
11/12/15 21:20
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline
Member
NeoJones  Offline
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Originally Posted By: Superku
Is your friend using Windows 10?

No, he is using windows 7, 64 bit. Do you have any problems with this script, too? (if you publish this script?)


Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Test publish critical problem! [Re: NeoJones] #456162
11/12/15 21:56
11/12/15 21:56
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Code:
//desktopauflösung ermitteln
	desktop_size.x = sys_metrics(0);
	desktop_size.y = sys_metrics(1);
	
	//auf ermittelte oder gespeicherte auflösung umschalten
	video_set(desktop_size.x,desktop_size.y,0,1);



We had some strange effects with resolution setting via sys_metrics.
Usually this is not a problem at all, but maybe replace it with video_mode = 12; for testing if this is causing the problem.

Re: Test publish critical problem! [Re: FBL] #456168
11/13/15 00:58
11/13/15 00:58
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline
Member
NeoJones  Offline
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Uh okay, thanks. It always worked without any problems on my pc. I test it without sys_metrics on his pc next monday. He's away at the weekend.

Last edited by NeoJones; 11/13/15 01:18.

Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Test publish critical problem! [Re: NeoJones] #456274
11/16/15 16:31
11/16/15 16:31
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline
Member
NeoJones  Offline
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
So, I have tested it without sys_metrics and it dont work. cry
Code:
//desktopauflösung ermitteln
//desktop_size.x = sys_metrics(0);
//desktop_size.y = sys_metrics(1);

//auf ermittelte oder gespeicherte auflösung umschalten
//video_set(desktop_size.x,desktop_size.y,0,1);

video_mode = 12;
video_screen = 1; // start in fullscreen
wait(2);


Also I have installed GameStudio on his pc and test it. You dont believe it: It works! (If I start it with SED). But after publish, it always dont work.
This is really not motivating when I imagine, I program a big game and it did not even start at the end or if I publish.
I really dont know whats the problem here, please help...

Last edited by NeoJones; 11/16/15 16:38.

Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Test publish critical problem! [Re: NeoJones] #456279
11/16/15 20:41
11/16/15 20:41
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Try removing media_play and see if that helps. I have similar problem with one of my projects that I can't play on a desktop; the game freezes as soon as the music plays through media play (atleast I suspect that is it, have to double check that, could also be some other sound or something with level load).

If that is indeed the problem, perhaps altering the music file or use snd_play. Don't quote me on that though, I am a newbie when it comes to sound/music stuff.

-edit, if that doesn't work try commenting lines or blocks until the published project works. Or e.g. add long waits at several spots that you suspect that the problem is. Also check if warn_level is on.

Last edited by Reconnoiter; 11/16/15 20:56.
Re: Test publish critical problem! [Re: Reconnoiter] #456280
11/16/15 21:03
11/16/15 21:03
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline
Member
NeoJones  Offline
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Thanks Reconnoiter, I try that


Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Test publish critical problem! [Re: NeoJones] #456282
11/16/15 22:54
11/16/15 22:54

M
Malice
Unregistered
Malice
Unregistered
M



I have had issue with some d3dx....dll not being bind to the publish. It runs in sed but the publish didn't get the dll. So I had to manually move it into the .cd folder. It pointed a error on the start screen, but loaded and crashed. But I can no longer repeat this error, may be fixed in last update.

Just because I have cover bases - when you publish, you get a *.exe in the work folder and one in the .cd folder. Not sure why there is one in the work folder, but it never works.. Make sure you are running it out of the .cd folder.

Further I may be wrong but check this note from STRING
Quote:
Special characters within a string must be preceded by a '\': \n - Line feed; \\ - Backslash; \" - Quotation mark.


You code you seem to reverse this
Code:
//write each correct filename with foldername in string
		for(i = 0; i < count_filme; i++)
		{
			tmp_str = str_create("filme/");



Needed A bad name in media instructions, damages file, corruptor missing codec, wrong container format(Does it still have to be box in a VFW ?), all could be a cause.

Further - app locked by security or AV programs ( we are doing all possibilities)

Curious - What is the behavior and status of the *.exe in windows task manager when run. - i.e "not responding", hogs cpu or ram, cause huge jumps in hdd read times? Or worse doesn't even pop up in Win task manager ?
EDIT - old or bad reg keys, as it's using the media player...Why not throw that out there
EDIT2 -
Quote:
But after publish, it always dont work.
This is really not motivating when I imagine, I program a big game and it did not even start at the end or if I publish.

Really need more than "it didn't work", get a start screen? Get a crash w/error get a crash w/oError?

Also have you run it with the log file commandline ?

ok ok , I'm done.
edit3-
Quote:
We had some strange effects with resolution setting via sys_metrics.
Usually this is not a problem at all, but maybe replace it with video_mode = 12; for testing if this is causing the problem.

Try it in widow mode video_set(.....,2);
Ok that's my once over
Mal

Last edited by Malice; 11/16/15 23:07.
Re: Test publish critical problem! [Re: ] #456284
11/16/15 23:35
11/16/15 23:35

M
Malice
Unregistered
Malice
Unregistered
M



Can I note that I never have this issue, but every month someone has problems with a published build. Sure I get the black-screen of dead when I make a endless loop, but win task manger points them out with "Not responding" and allows me to close it(Never test a publish in fullscreen till it passes windows mode).
But what really gets me is this ghost crash behavior people report, it doesn't show up in the task manager, really? It doesn't throw a error message, ok sometime. It doesn't record anything in the log file, well that's hit or miss.Warn_level makes no difference? But the big one I can not believe, - No information about the app lunch or crash is record in the Windows Event system??? Really?
Truly a ghost app with ghost crashes... Scary

Well hope I never have this issue, here's hoping for another decade without this problem.
Mal

Last edited by Malice; 11/16/15 23:37.
Page 3 of 4 1 2 3 4

Gamestudio download | chip programmers | 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