Jump to content

StOneDOes

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by StOneDOes

  1. Thanks for your reply. That will be implemented on the client end when I'm ready, but shouldn't that only be required to actually receive a message from the server? I like to ensure things work step by step, so at the moment I want confirmation that there is an established connection.
  2. Hi guys, I expected the new multiplayer system to be rather easy to use, as I've done manual connection and message sending before, but I can't seem to receive the connect message on the server end. I run the server application first, and then then the client application many seconds later, both on the same PC, but pMessage is always null. I'm also receiving a value in pPeer on the client end, so it seems like there is a successful connection. Can anyone see where I have gone wrong here? Here's what I have at the moment. Server: int main() { Window *pWindow = Window::Create( "Server", 100, 100, 400, 200, Window::Titlebar ); Server *pServer = Server::Create(); Message *pMessage; while( true ) { if( pWindow->Closed() || pWindow->KeyHit( VK_ESCAPE ) ) break; pMessage = pServer->Update(); if( pMessage == nullptr ) continue; if( pMessage->id == Message::Connect ) { cout << "Player connected to the game." << endl; } pMessage->Release(); pMessage = nullptr; } pServer->Release(); pWindow->Release(); return 0; } Client: bool App::Start() { m_pWindow = Window::Create( "Client", 100, 100, 800, 600, Window::Titlebar ); Client *pClient = Client::Create(); Peer *pPeer = pClient->Connect( "127.0.0.1" ); return true; } Thanks in advance.
  3. Hi guys, Just wondering if it's possible to control an FPS player who has been placed with the level editor, with C++. I'd like to change things such as the player speed, footstep sounds, camera position (3rd person), etc. All things that I expect to be simple in practise, if only I could access the player entity. Is this possible or am I better off re-writing my own player class? EDIT: Also, while I'm here, since I only know a little about lua scripting, I have a couple questions regarding it. What is the script compiled into? What is its speed comparison to C++? Thank you.
  4. Ok that fixes my issue. Thankyou. However, now it seems that the map loads successfully, but then the application appears to just hang straight after with no further messages after the loaded textures, with just the loading cursor appearing whenever I hover the mouse over the window I created. The test map I made loads just fine from the Leadworks editor. I'm using Visual Studio 2017, because with 2013 I had nothing but toolset errors. Could any of these issues be related to using Windows 10? My desktop runs Windows 7 so I'll test it on that when I get home later, but I still want this to work on my Windows 10 laptop. Thanks. EDIT: Seems to be all working now ... I've re-added all the code that came with App::Start() and App::Loop(). I don't believe this used to be necessary - must be part of an update? Also it tries to load start.map, so I changed my map name to match it in order for it to work. Is there somewhere I can change the default loaded map? Or do I just load my map straight after? Thanks again.
  5. I was using Leadwerks last year but have just come back to it now and I'm having a lot of issues trying to run projects that used to work fine. After topping a few issues that may have been visual studio related, I can't seem to load a map without hardcoding the file path. For some reason Leadwerks is searching the map and its textures in the wrong place - it never used to do this. Loading map "C:/Users/Admin/Documents/Leadwerks/Maps/Island.map"... Error: Failed to read file "C:/Users/Admin/Documents/Leadwerks/Maps/Island.map". Why is it not searching in: "C:/Users/Admin/Documents/Leadwerks/Projects/PROJECT_NAME/Maps/Island.map" ? If I hardcode the map path then the same error happens for the textures. This is what I'm doing, which is what I always used to do: string szMap = System::GetProperty( "map", "Maps/Island.map" ); Map::Load( szMap ); As far as I understand, the above code should search from the working directory? Thanks in advance.
  6. I too just bought this and have the exact same issue. Can some someone please provide some help with this.
  7. Thanks for this, much more brain hurt avoided - minimizing it to a window and then double clicking the right edge of the window brought it back.
  8. Hi guys, pretty rookie question ... but in the map editor, I've somehow made the scene panel ( the one docked on the right side with terrain, entities etc. ) disappear, and I have legit spent a couple hours trying to get it back. Any help please? Thanks in advance.
×
×
  • Create New...