Nabucodonosor
|
Here's the problem: I use a pointer to a image (320x470), that are full of 30x30 tiles. It's the faces of the characters of the game. But due to memory problems, I don't know, the engine can't handle it integrally, even if I use malloc. I know the problem is with the memory, because when I increased the size of my VSP file, the problems get worse (weird, isn't it?)
The solution I found is to reload the pointer (fac=loadimage("faces.gif")) every time I need to use a new face in my game... This is not very healthy, and make the game slower...
I tried to use a pointer for EVERY face (150), but I don't know why, verge could'nt retain all of them, and the result was worse. Some of the images appeared, others not...
No, there is no problem with my code or with the image. I'm used to use this functions in my games. With v2 it worked fine, the problem is with v2k... But I like to use v2k, because of entity.visible and a couple of others things... Anybody has a solution to this memory problem?
Another thing: If I have a pointer to a image file, can I use direct memory access to get some parts of it (like using vsp+(256*slot))? I know the vsp is a sequential array, well, if you can answer, thanks...
Posted on 2001-03-15 00:42:06
|
Devon
|
Well, it depends on how exactly the file is set up. If all of the faces were stacked vertically, you could DMA any one that you wanted by just doing a CopySprite() with the image pointer offset by the correct number of bytes. As it is you can use SetClipRect() and just offset the blit itself to do basically the same thing. You'll need to do that anyway if you want to upgrade later, because the new DirectX versions of VERGE are not going to allow DMA. (DirectX doesn't allow it, that is)
In my own personal experience, VERGE's memory system is screwy and prone to illogical seeming breakdowns. I'm having a similar problem myself in v2.6. It almost seems to lose track of its own global vars sometimes, and changing something unrelated always seems to trigger the problem. It might date back to those memory errors vecna and Aen were starting to hunt before they left.
-Devon
---
Square's making money.
We're making art.
Posted on 2001-03-15 13:42:56
|
Nabucodonosor
|
Now I'm back to Verge 2 before v2k, and converted my game. It's working fine, but I don't like it anymore because Windows ME have some problems with Prompt of Dos sound...
This memory thing is a really pain in Verge, but I can live with it, I hope...
Posted on 2001-03-15 23:06:32
|