Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,519 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Fog of War ( AUM ) problem #240994
12/13/08 20:39
12/13/08 20:39
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
hi..
I copied the Fog of War code from the AUM..


Now i got a new problem...

how am i able to ask for the floor entities???
the AUM Code askes for the player:
Code:
if(vec_dist(boden.x, my.x) <= 350)
		{
			while(my.alpha >= 5)
			{my.alpha -= 3;wait(1);}
			ptr_remove(my);
		}


But i create entities, where no fow should be over, and at 50 pixels each side.
The floor ents are stored inside an array ( 4000 stacks ). How to let the script ask for all 4000 places of the array paralell to the gameplay???

Variable code:
Code:
var i = 0;

var mouse_move[3];

var bodentiles[4000];
var bodentiles_start = 0;
while (i < 4001) 
{
   bodentiles[i] = 0;
   i += 1;
}


the ent_create part:
Code:
			// Boden_normal ( immer gesetzt, alles andre iss drüber )
			bodentiles[bodentiles_start] = ent_create("Ground.mdl",vector(temp.x,temp.y,2),object_boden);
			bodentiles_start += 1;


you see.. every floor ent is stored in a specified place of the array...

The Fog of War Bitmap has a size of 8x8... so i need on a 150x150 Field map ( each field has 64x64 pixels ),...
180000 Fog of War entities.. only for fow...

Last edited by xXReapeRXx; 12/14/08 03:12.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Fog of War ( AUM ) problem [Re: Espér] #240996
12/13/08 20:44
12/13/08 20:44
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
try commenting out line by line to locate in which line is the problem that causes the crash



Ubi bene, ibi Patria.
Re: Fog of War ( AUM ) problem [Re: croman] #241000
12/13/08 20:54
12/13/08 20:54
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
i added printf("number"); Codes after every line..

Popup with "6" inside appeart at last.. Popup 7,8,9 ( everything inside the while loop ) causes the error.. but why???


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Fog of War ( AUM ) problem [Re: Espér] #241004
12/13/08 21:13
12/13/08 21:13
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
maybe it has something with cursors.x - maybe it's an empty pointer. check it.
btw - do you get an error or complete crash of application?



Ubi bene, ibi Patria.
Re: Fog of War ( AUM ) problem [Re: croman] #241009
12/13/08 21:59
12/13/08 21:59
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline
Senior Member
sadsack  Offline
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Are you sure that is lite-c?


I have A7 Commercial .............. Now I just need to learn how to use it

Re: Fog of War ( AUM ) problem [Re: sadsack] #241046
12/14/08 02:22
12/14/08 02:22
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
uhm.. yes... it´s lite-c

and no.. the pointer isn´t empty, because it´s created as first entity with a wait of 20 following.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Fog of War ( AUM ) problem [Re: Espér] #241049
12/14/08 03:04
12/14/08 03:04
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
code works now.. a bit...

Rewrote the startpost..plz take a look on it..


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Fog of War ( AUM ) problem [Re: Espér] #241056
12/14/08 04:25
12/14/08 04:25
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Code:
var bodentiles[4000];

array indices 0-3999?
Code:
while (i < 4001) 
{
   bodentiles[i] = 0;
   i += 1;
}

array bounds exceeded?
Quoting xXReapeRXx.
Quote:
180000 Fog of War entities.. only for fow...

1. Maybe only space d / area a is visible at time t, thus, perhaps, only max n entities are required to cover visible d / a.
2. A separate function / loop / action might not be required for each coverage entity, where only one loop might do.
3. Potentially separate from visible coverage entities, cell visible states might only require boolean slots (vs var long = memory savings?).

Re: Fog of War ( AUM ) problem [Re: testDummy] #241095
12/14/08 13:48
12/14/08 13:48
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
didn´t understand anything of what you said ( german )....

Last edited by xXReapeRXx; 12/14/08 13:48.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Fog of War ( AUM ) problem [Re: Espér] #241761
12/18/08 17:42
12/18/08 17:42
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
i push this.. because i need help here as soon as possible


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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