Gamestudio Links
Zorro Links
Newest Posts
script() function that sets Script
by AndrewAMD. 07/20/19 14:18
Beginners Workshop
by danatrader. 07/20/19 07:54
ANet and GSTsqlite files
by TheDynamit. 07/20/19 06:38
What are you working on?
by rayp. 07/19/19 20:34
missing trade variables
by sarmasboy. 07/19/19 15:54
histdata to t1
by sarmasboy. 07/19/19 14:26
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
6 registered members (danatrader, Dalla, AndrewAMD, TheDynamit, Zheka, Seymour), 641 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ChrPr, fclaros, maxwellreturn, chtostoic, Charttrader
18259 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Issue with bmap_for_entity [SOLVED] #477440
06/27/19 05:22
06/27/19 05:22
Joined: May 2005
Posts: 675
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 675
Chicago, IL
UPDATE:This was not a problem with bmap_for_entity, but a problem with not setting the level_ent min_x/max_x correctly. See below for more details.



In my previous version of the game (A7) I was able to use bmap_for_entity to display a VIEW onto a model skin.

Now with A8, it works sporadically. It will usually work the first time I load a level, but if I leave and return to it, then the bitmap will appear black for a long time. Sometimes it "kicks in" and starts working after a few moments.

I got one error that said "Error E1516: Invalid memory area" but this does not happen every time, even when the problem appears.

This problem happens in both the published game and when run through WED.

Any ideas or similar experiences would be helpful, I do not really know where to look for a solution (other than the manual of course) but so far I have not been able to find anything that can explain it.

Last edited by Dooley; 06/27/19 17:23.



Re: Issue with bmap_for_entity [Re: Dooley] #477441
06/27/19 06:39
06/27/19 06:39
Joined: May 2005
Posts: 675
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 675
Chicago, IL
In addition to this, sometimes the whole screen seems to freeze. However, panels with variable readouts still update while the view is frozen, so it's like the camera is not updating, but the game is not frozen...




Re: Issue with bmap_for_entity [Re: Dooley] #477442
06/27/19 09:30
06/27/19 09:30
Joined: Jun 2007
Posts: 1,234
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,234
Hiporope and its pain
Hi, I would use 'ent_getskin' instead.

Code
_cam.bmap = ent_getskin(_ent, 1); //set the first skin of '_ent' as render target of '_cam'

Re: Issue with bmap_for_entity [Re: txesmi] #477447
06/27/19 15:53
06/27/19 15:53
Joined: May 2005
Posts: 675
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 675
Chicago, IL
Nice! I will try this to see if it makes a difference.




Re: Issue with bmap_for_entity [Re: Dooley] #477448
06/27/19 16:01
06/27/19 16:01
Joined: May 2005
Posts: 675
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 675
Chicago, IL
Having the same issue this way. I am thinking of re-writing the whole script for this object. A lot of this stuff is like 6 years old...




Re: Issue with bmap_for_entity [SOLVED] [Re: Dooley] #477449
06/27/19 17:28
06/27/19 17:28
Joined: May 2005
Posts: 675
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 675
Chicago, IL
I have figured it out. I had a similar error when I first upgraded to A8. When I turned my spaceship too far in either direction, the screen would go black. I fixed it by setting the level_ent size to maximum dimensions:

Code
vec_set(level_ent.min_x, vector(-999999, -999999, -999999));
vec_set(level_ent.max_x, vector(999999, 999999, 999999));


So in this latest case, the screen was not going black, but apparently "freezing" so I did not recognize it as the same problem.

It turns out that when I load my space level from the main menu, it uses one function, but when I load the same level when returning from a planet, it uses a different function. This second function did not include the level_ent command, so the same problem was happening. I'm not sure why it presented a frozen screen instead of a black one, but I don't really care now that it's working laugh

Glad it is solved!





Moderated by  HeelX, Spirit 

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