Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

124 Neutral

About Archi

  • Rank
  1. Archi

    Error writing location...

    Quote:Original post by Svenjamin Hey, I need help again, I should have mentioned that the error was occurring when I tried to initialize the member data. Ex: m_Cursor->m_X = 32; /* Caused the error */ then, if I set the pointer to null before I initialize it, the error occurred on that line, (setting m_Cursor = NULL) it still gives me an error writing a location. You should first allocate memory for your object, like that: m_Cursor = new CGameCursor(); // or whatever class/structure you use then you can actually initalize member data as you've written above. NOTE: You have to free allocated memory later like that: delete m_Cursor; Quote:this might have something to do with it: a while ago I was working on my game engine, and when I tested it once, it compiled fine, but when I ran it, it threw another exception, (I think it was an exception) but anyways, the dialog box had a line that said DAMAGE: <some sector here> or something like that. is it giving me an error because that space that it is trying to write to was damaged? if so, is there a way to fix it? Thanks again, Svenjamin. The following code will give that exception char array8[8]="1234567"; sprintf(array8, "TEST: %s", "OK"); array8 actually can hold 7 symbols, while I tried to write 8 ones
  2. That sounds to me like random labyrinth generation in Angband and etc. You could take a look at it, since Angband and its clones are opensource and easily found on the web. You also may try looking at Joshua's articles. Hope that helps. [Edited by - Archi on January 5, 2006 8:04:27 PM]
  3. Archi

    Would you buy sprites?

    Right now I'm in need for a lot of sprites for isometric RPG... Willing to see your samples ASAP ;)
  4. Haven't been here for awhile... Good to see EDI's "Morning Wrath" is released. Hope could find or order it in Belarus. Thumbs up! Eagerly awaiting for "Project 2"! ;)
  5. Archi

    Debug Assertion Failed! ???

    Quote:Original post by JohnBolton Archi, I don't see anything wrong with the code you posted. There must be something different between that code and the real code, or the problem is caused by code elsewhere. 2JohnBolton: Not much, just reading from arrays. Quote: Original post by smart_idiot If allocating b failed, a would never get deleted and you'd have a memory leak 2smart_idiot: My engine allocates up to 16 megabytes, and they are ok. I can't figure why that 1 kilobyte gets spoiled... When I swap the allocation/filling/deleting of a/b vica versa the result is just the same. Strange indeed. PS I'm not noob, I've been programming for 5 years, and that problem makes me frustrated... DAMAGE: before %hs block (#%d) at 0x%08X. [Edited by - Archi on November 12, 2004 7:59:37 PM]
  6. Archi

    Reducing the size of the DLL

    Quote:Original post by Spudder UPX is a popular tool for reducing the size of exe and dll files, you can usually achieve around 40-50% compression of the file. The best part is the file is automatically decompressed when used so you don't even have to know it's been compressed. That isn't good idea (especially for dll) because: OS 'projects' executable to memory right from the hard drive, simply clears the memory if it's unused, and when launching second copy it won't 'eat' any additional memory. Compressed with UPX executable when launched second time grabs the same amount of memory (it's unpacking itself in memory), and would be swapping right to pagefile. Sorry for terrible english, over and over again.
  7. Archi

    Debug Assertion Failed! ???

    Yep, I've got the same one. it looked like: int *a = NULL; int *b = NULL; a = new int[256]; b = new int[256]; for (i=0;i<256;i++) { a = i; b = i; } delete[] a; // is ok delete[] b; // and here assertion rises debugging showed a and b pointers were okay, and BoundsChecker found no leaks (when I skipped assertion). when I commented //delete[] b; no assertion raised but leak (sizeof(int)*256=1KB) appeared. That happened when compiled in VC++ 6.0 and .NET 2003
  8. Archi

    Kingdom-3. Welcome!

    Quote:Original post by Mamont1537Maybe smb will help me? I'll contact you on your forum
  9. Great topic, I was looking for something like that! 1) It's classical, most players got acquainted with it. 2) The most logical and realistic, but characters cannot advance in other specializations 3) Simple and effective, but very difficult to 'classify' Morrowind has all three system merged, and it's pretty nice. I suppose #2 and #3 merged is the best solution yet.
  10. Archi

    crash [solved]

    Quote:Original post by Axiverse ahh! my prgram crashes... i have a wrapper class over DX, and in the destructor of that wrapper class, all resources (device, vb) are released, but after everything is released, and before it executes the next statement outside of the destructor it crashes... Perhaps you are using some wrapper's fucntions or variables after they are gone? Quote: i think this is due to releasing of resources because if I don't call the release on either the device or the vb, it doesn't crash... since it's bad to leave resources unreleased i want to fix this now... any ideas? check if all your code looks as follows: init A init B ... release B release A Sorry, I don't know any debugger for VB :(
  11. Archi

    Mass Multi Space Combat Rpg concept/idea

    Sounds like a Ground Control
  12. Quote:Original post by Omaha ThisDevice->DirectInputDevice->EnumObjects(BUTTONS); ThisDevice->DirectInputDevice->EnumObjects(AXES); Well I can't imagine why are you using EnumObjects(): === cut MSDN == Applications should not rely on this method to determine whether certain keyboard keys or indicator lights are present, as these objects might be enumerated even though they are not present. Although the basic set of available objects can be determined from the device subtype, there is no reliable way of determining whether extra objects such as the menu key are available. === end cut ===
  13. Good job, Joshua! I found some labyrinth generation tutorials in russian, I hope they might be interesting to you. I'll try to translate them to english as soon as I get some free time.
  14. I get no ads with Opera. I am using a firewall, though.
  15. Quote:Original post by a2ps void swap_asm( int *a, int *b ) { __asm { push a; push b; pop a; pop b; } } i call this function from my main function and in the end A and B remain with the same value, but if i define A and B localy in the swap function, it does swap the values. hows that? thanks in advance There could be too many answers, beginning from "local scope" compiler variable turned on and finishing with stack pointers, and the reason could be any of them. Get yourself "Art of Assembly Programming", and look for "stack", "pointer" and "call". Sorry for such an answer but I'm not very good in english so I fear tou can misunderstand my explanation.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!