WackyWormer

Members
  • Content count

    26
  • Joined

  • Last visited

Community Reputation

126 Neutral

About WackyWormer

  • Rank
    Member
  1. No, I'm worried that I'm never calling the client: close function, because I have no way of exiting the game loop because I don't have input directly to the server. Though I suppose that the client with admin privs could send a shutdown command.
  2. I've decided to go with the "client with admin privileges" idea. Now the only thing that concerns me is closing the server without shutting down the client connections. Is there any way to call a function when the console window is destroyed, like the WM_DESTROY event I remember using in my c++ apps?
  3. Bah, stupid phone. Its the Lua for Windows package, if that's what you're asking.(Sorry, I'm new at this thing... all my Lua experience has been scripting in Mudlet, which auto compiles/runs the scripts for you. Over there, you just type the code out and save it.)
  4. I'm developing in Windows 7, using SCite
  5. I'm trying to program a MUD server in Lua, as I've had a good bit of experience in writing scripts for the Mudlet client and Lua is the language I'm currently most comfortable with. I've run into a bit of a brick wall though. I'd like for the server, a console application, to accept keyboard input, so when I'm running the games i can interact as an admin from the server itself. The problem is, all the functions for accepting input in Lua are blocking functions. Should I just program a backdoor into the server, so I can connect as an admin from any telnet client? Or is there a simple way to accept keyboard input to the console app without blocking the rest of the script from running?
  6. Strange Culling Effect in Direct3D

    Nevermind, I found my answer in depth buffers
  7. I have a very strange culling effect going on in my game... [img]http://i228.photobucket.com/albums/ee129/WackyWormer/Pic.jpg[/img] When I move the camera to the opposite side, the culled/not culled faces switch sides. When I move the camera to view the right side ( from image), the right wall is shown, When I move the camera to view the left side (from image), the left wall is invisible All this is done with p_dx_Device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); called in the Draw function, so I know its not being overidden. Anyone have any ideas?
  8. Hey guys, I'm working on a Mastermind game for some practice and I've got a question... I want to have 3 difficulty levels... Easy: There are 4 colored pegs to choose from, the answer is 4 pegs, and player has ten guesses Medium: There are 5 colored pegs to choose from, the answer still has 4 pegs, and player has 12 guesses Hard: 7 colored pegs to choose from, answer has 5 pegs, and player has 15 guesses How would I implement this into my code? Use big if statements around all the code that depends on difficulty level? How would you handle this?
  9. Storing sprites from a sheet

    Reegan, see edit of 2nd post
  10. Storing sprites from a sheet

    BITMAP* m_sprites; m_sprites = new BITMAP*[10][16]; This doesn't compile, throws : error C2440: '=' : cannot convert from 'BITMAP *(*)[16]' to 'BITMAP *' Same problem I've been having... jdindia, do you know of a tutorial or article on creating an animation class that would help me? I've looked all over the web for something similar, never found anything Reegan, the thing is with allegro, its all BITMAP*, not BITMAP... BITMAP actually has no size, judging from the errors the compiler just threw at me. I can load m_sprites up just fine, by doing m_sprites[x][y] = load_bitmap(blah blah)... its just getting to those sprites i'm having the problem with
  11. Storing sprites from a sheet

    I'm trying to code a simulation game in c++/allegro, and I'm having trouble storing the sprites... I made a SpriteSheet class with member BITMAP* m_sprites[10][16], there being 10 different characters and 16 frames of animation for each. getting m_sprites set up is no problem... its accessing m_sprites that's messing me up. What I would like to do is have a function such as: BITMAP* SpriteSheet::getCharacter(int Row); The return type is wrong, I know... I want to return a pointer to the first element of m_sprites[Row]... so I should be returning a pointer to a pointer... I don't know how to do that. Also, the compiler keeps telling me that when I try to return m_sprites[Row] for the function above, I'm returning BITMAP*[16] and not a BITMAP*... so how would I return a pointer to the first element of m_sprites[Row]??
  12. Destroy_bitmap() causing error

    Nobody? Well here's the error its throwing... The thread 'Win32 Thread' (0xd80) has exited with code 0 (0x0). First-chance exception at 0x10056a87 in Survival.exe: 0xC0000005: Access violation reading location 0x00000048. Unhandled exception at 0x10056a87 in Survival.exe: 0xC0000005: Access violation reading location 0x00000048. Oh, nevermind... I just realized that this is the VERY end of the program... as in allegro_exit() has already been called... stupid me
  13. I've got a program where I've created a SPRITESHEET class, loaded a sprite sheet, then created a 2d array of BITMAP* and broken the sprite sheet up. Now, on exiting the program, it crashes on SPRITESHEETS destructor, specifically these lines SpriteSheet::~SpriteSheet() { for( int i=0; i<16 ; i++ ) for( int j=0; j<10 ; j++ ) destroy_bitmap( m_Sprites[i][j] ); } It crashes on m_Sprites[0][0], but I've checked in the debugger, and m_Sprites is full of nothing but good pointers Here's the constructor for reference SpriteSheet::SpriteSheet(BITMAP* source) { m_X_OFF = 40; m_Y_OFF = 65; m_source = source; for( int i=0; i<16 ; i++ ) for( int j=0; j<10 ; j++ ) m_Sprites[i][j] = create_bitmap(m_X_OFF, m_Y_OFF); if ( m_Sprites[1][1] == NULL ) { allegro_message("SpriteSheet::m_Sprites failed to load!"); while (!key[KEY_ESC]) {} } for( int i=0; i<16 ; i++ ) for( int j=0; j<10 ; j++ ) blit(source, m_Sprites[i][j], i*m_X_OFF, i*m_Y_OFF, 0,0, m_X_OFF, m_Y_OFF); }
  14. Problem with char arrays

    Lol thanks Crane and rip-off, pretty neat how that worked. And I usually avoid char* for my own stuff, but it was required in the homework.
  15. Problem with char arrays

    DevFred, My bad, the char* buffer[] should have been char buffer[]... it was a typo. Mike, "As for this line: cout << Word[i]; <- Why did this line execute correctly when i was 0? Arrays in C and C++ are zero based, which means the first element is at index 0." I know arrays are zero based... my question is, when I ran in debug, the program would correctly print the first element of Word, even though Word should have been a bad pointer, being a pointer to a local variable of FirstWord(). The for statement would print the first element of Word (i==0) but when the cout statement was executed, in the debugger, Word changed to a bunch of crap. How did the first element print correctly if Word was a bad pointer? And why did "cout << *Word << Word[1] << Word[2] << Word[3] << endl;" work correctly?