Kixdemp

Members
  • Content count

    76
  • Joined

  • Last visited

Community Reputation

202 Neutral

About Kixdemp

  • Rank
    Member
  1. C++ or C#?

    Quote:Kind of like how you seem to love circumventing (IP) bans, Mr. AnonJavaDev? LOL. Yeah, I'll do it in sharpie, and when I feel I'm ready for plusieplusie, I'll do it in that. [wink] (plusieplusie - I sound like a girl... [razz]) Thanks you all for your replies! [grin]
  2. C++ or C#?

    Sorry 'bout that... I would never have imagined that was such a popular topic... [embarrass] But yeah, I Googled it a bit, thought about it, and yeah... C# [cool] Thanks! [grin] (and sorry for being teh n00b)
  3. Hello everyone! I'm making a multiplayer game, style of Soldat and the new Liero clones... But I'm stuck, I don't know if I should do it in C++ or C#... I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#? Thanks! [grin] PS: I meant C Plus Plus, but it doesn't let me display the pluses...
  4. Hello everyone! OK, I'm making an online game and one of my ideas is to let the users (server admins) create their own missions using some kind of scripting language, and to have the default missions coded in that language also... I've seen people do this, like in MTA, StarCraft (?), and a few other games I can't think of now, but I don't know how to do it... Do I have to create my own language/parser, or are there some "defaults" that game makers use for this? How would I go about it? Thanks! [wink] PS: I'm using C#/SDL.NET, if anyone wants to know...
  5. Map/Level editor?

    Rob Loach: Yeah, I'm using C# with SDL.NET*. I'll use that Tile Studio thing, thinking about the map editor kinda stressed me out... [lol] markr: Yeah, text file, that's what I used on my previous game! Quote:3. It has an undo which works I hope you're not talking about Notepad... [dead] Thanks both of you! [wink] * Apart from the tile thing... What do you guys thing is better? C#/SDL.NET or DarkBasic?
  6. Hello everyone! Well... I'm happy because I just got unstuck on my game, but then I realized I can't continue without the maps! [flaming] So, does anyone have any idea how to go about this? Each map will have 4 layers, and the tiles can have different sizes... Maybe tiles aren't the right choice? For example, I'll have underground entrances and staircases, which may be larger than the 24x24 tiles I've done, since the player is 32x32... [grin] Any ideas? Also, what do you recommend? SDL? Thanks!
  7. Hello everyone! OK, I want to port this from CPP: // Main game loop while (true) { // Get the current time float newTime = (float) SDL_GetTicks(); float deltaTime = newTime - currentTime; currentTime = newTime; accumulator += deltaTime; while (accumulator >= dt) { game.Respond(); t += dt; accumulator -= dt; } game.Render(); SDL_Delay(10); } But there's a little problem... I put all of the event handling in game.Respond(). SDL.NET uses C# events, so I can't do that... Help? Thanks!
  8. ARGH. $^*$ (@&$ (@&$ F*&) *^*(^ *$^!!!!!!! Your code seemed to be the fix, but it still screws around... [tears] Sorry about not posting the error messages, I thought I did it when I edited the message to put the Notify by Email checkbox... I probably forgot to press the Submit button... [embarrass] But no, these are the errors: 1>------ Build started: Project: War Game, Configuration: Release Win32 ------ 1>Compiling... 1>MapHandling.cpp 1>ErrorHandling.cpp 1>Vehicle.cpp 1>Player.cpp 1>Main.cpp 1>HelperFuncs.cpp 1>Game.cpp 1>Linking... 1>HelperFuncs.obj : error LNK2005: "void __cdecl MapHandling::LoadTiles(void)" (?LoadTiles@MapHandling@@YAXXZ) already defined in Game.obj 1>HelperFuncs.obj : error LNK2005: "class _WGError WGError" (?WGError@@3V_WGError@@A) already defined in Game.obj 1>HelperFuncs.obj : error LNK2005: "struct TileFile * MapHandling::Tilesets" (?Tilesets@MapHandling@@3PAUTileFile@@A) already defined in Game.obj 1>Main.obj : error LNK2005: "void __cdecl MapHandling::LoadTiles(void)" (?LoadTiles@MapHandling@@YAXXZ) already defined in Game.obj 1>Main.obj : error LNK2005: "class _WGError WGError" (?WGError@@3V_WGError@@A) already defined in Game.obj 1>Main.obj : error LNK2005: "struct TileFile * MapHandling::Tilesets" (?Tilesets@MapHandling@@3PAUTileFile@@A) already defined in Game.obj 1>Player.obj : error LNK2005: "void __cdecl MapHandling::LoadTiles(void)" (?LoadTiles@MapHandling@@YAXXZ) already defined in Game.obj 1>Player.obj : error LNK2005: "class _WGError WGError" (?WGError@@3V_WGError@@A) already defined in Game.obj 1>Player.obj : error LNK2005: "struct TileFile * MapHandling::Tilesets" (?Tilesets@MapHandling@@3PAUTileFile@@A) already defined in Game.obj 1>Vehicle.obj : error LNK2005: "void __cdecl MapHandling::LoadTiles(void)" (?LoadTiles@MapHandling@@YAXXZ) already defined in Game.obj 1>Vehicle.obj : error LNK2005: "class _WGError WGError" (?WGError@@3V_WGError@@A) already defined in Game.obj 1>Vehicle.obj : error LNK2005: "struct TileFile * MapHandling::Tilesets" (?Tilesets@MapHandling@@3PAUTileFile@@A) already defined in Game.obj 1>ErrorHandling.obj : error LNK2005: "void __cdecl MapHandling::LoadTiles(void)" (?LoadTiles@MapHandling@@YAXXZ) already defined in Game.obj 1>ErrorHandling.obj : error LNK2005: "class _WGError WGError" (?WGError@@3V_WGError@@A) already defined in Game.obj 1>ErrorHandling.obj : error LNK2005: "struct TileFile * MapHandling::Tilesets" (?Tilesets@MapHandling@@3PAUTileFile@@A) already defined in Game.obj 1>MapHandling.obj : error LNK2005: "void __cdecl MapHandling::LoadTiles(void)" (?LoadTiles@MapHandling@@YAXXZ) already defined in Game.obj 1>MapHandling.obj : error LNK2005: "class _WGError WGError" (?WGError@@3V_WGError@@A) already defined in Game.obj 1>MapHandling.obj : error LNK2005: "struct TileFile * MapHandling::Tilesets" (?Tilesets@MapHandling@@3PAUTileFile@@A) already defined in Game.obj 1>..\Release/War Game.exe : fatal error LNK1169: one or more multiply defined symbols found 1>Build log was saved at "file://c:\Incoming\War Game\Visual Studio 2005\Release\BuildLog.htm" 1>War Game - 19 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== As you can see, they're all related to those 2 files... Any ideas what it could be? Thanks! (PS: I learned a lot from you guys today... Thanks! [grin]) [edit] Also, after much plain-C coding, I had completely forgotten about std::string... [/edit] [edit2] Now, I switched to exceptions (forgotten that too... [embarrass]), did a lot of change in my code, renamed the files, it gets to the Linking part, but STILL I get those errors... [/edit2] [edit3] Updated the errors. [/edit3] [Edited by - Kixdemp on September 15, 2006 6:55:19 PM]
  9. Hello everyone! Can someone take a look at my code and tell me what's wrong with it? It doesn't compile on VC++ or GCC... [sad] Error.h #pragma once #include "Includes.h" class Error { static char lastError[512]; public: static char *GetLastError(); static void SetError(char* error); }; Error.cpp #include "Includes.h" #include "Error.h" char *Error::GetLastError() { return Error::lastError; } void Error::SetError(char *error) { strcpy(Error::lastError, error); } Map.h #pragma once #include "Includes.h" // TODO: Move to Structures.h maybe? struct TileFile { /* surf: SDL surface s: Tile size w/h: How much tiles it has */ SDL_Surface *layers[4]; // Underground, Ground, Building Floor 2, and Building Floor 3 int s, w, h; }; class Map { public: Map(void); ~Map(void); // TODO: Make as a global var in TileFile declaration? static TileFile Tilesets[2]; static bool LoadTiles(); }; Map.cpp #include "Includes.h" #include "Map.h" Map::Map(void) { } Map::~Map(void) { } bool Map::LoadTiles() { // Main tiles Map::Tilesets[0].layers[1] = IMG_Load("./Graphics/Tiles.png"); Map::Tilesets[0].s = 24; Map::Tilesets[0].w = 3; Map::Tilesets[0].h = 2; if (!Map::Tilesets[0].layers[1]) { return false; } if (!Map::Tilesets[0].layers[1]) { Error::SetError(IMG_GetError()); return false; } return true; } Help! [sad] Thanks! [Edited by - Kixdemp on September 15, 2006 6:29:01 PM]
  10. Yeah, I figured it out... :grin: Now, how can I check which Telnet client the user is running? Because for example, Windows Telnet sends info when a character is pressed, but PuTTY only sends it when Enter is pressed! Do you know? Thanks!
  11. No, I don't want graphics, I just want color text. [wow] Any other ideas? Thanks!
  12. Hmm... Still not working... Here's what I'm doing now: char sm[5]; /* Function goes here, doesn't mess with sm at all */ sm[0] = (char) 0x1b; sm[1] = '['; sm[2] = '='; sm[3] = (char) 4; sm[4] = 'h'; SDLNet_TCP_Send(csd, sm, 5); // Send escape sequence SDLNet_TCP_Send(csd, buffer, 1); // Send my char By that I'm trying to change the screen mode to 320x200 color... Am I doing something wrong or what? Thanks! PS: I'm using PuTTY on Win98.
  13. Hello everyone! Here's how I'm sending my codes: (After I established a connection and received a character) SDLNet_TCP_Send(csd, (void*) 0x1B, 1); // Send ESC char SDLNet_TCP_Send(csd, (void*) 0x01, 1); // Send 0x01 (40x25 colors creen) SDLNet_TCP_Send(csd, (void*) 0x42, 1); // Green background SDLNet_TCP_Send(csd, buffer, 1); // Send my char But only the last one gets sent! (On WinXP's Telnet client, it gets sent twice, so I'm using Win98's) Why is it? I have a feeling this is not how you do it... Any ideas? Thanks!
  14. Color conversion algoritgms?

    Limitz: Oh, oops... [embarrass] But it didn't compile... Nope, DeadXorAlive, he doesn't use SDL... But anyways, I tried to translate his code to SDL, but I need to know where the RGB values are stored in a SDL_Surface... I tried this: int t; t = this->player->format->palette->colors->g; this->player->format->palette->colors->g = this->player->format->palette->colors->r; this->player->format->palette->colors->r = t; But my app crashed. [flaming] Where are they stored? Thanks!
  15. Making a transparent surface?

    Don't worry, I solved it: this->vehicles[0].bmp = SDL_CreateRGBSurface(SDL_HWSURFACE, 96, 96, 32, 0, 0, 0, 0); if (!vehicles[0].bmp) { this->SetError(IMG_GetError()); return false; } int c = SDL_MapRGBA(this->vehicles[0].bmp->format, 0, 0, 0, 0); if (SDL_SetColorKey(this->vehicles[0].bmp, SDL_SRCCOLORKEY, c) == -1) return false; Thanks! BTW: Did you get it at last? [lol]