Jump to content

tomis13lack

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by tomis13lack

  1. So I made this script that allows you to have a static loading screen entirely in lua. https://steamcommunity.com/sharedfiles/filedetails/?id=1676105035 How it works: In Main.lua, I took out the chunk of code from the WHILE loop that renders the world, and instead moved all that to a function called ShouldMapChange(). ShouldMapChange simply does all of the world rendering IF the map should not change. If it should, it renders a static loading screen image then proceeds to change the map. You can then change the map by calling the ChangeMap function. It only allows a static loading screen but that is MUUUCH better than looking at a black windows "Not Responding" while it loads imo. In the script, I give you the option of using an actual image (texture), which usually looks better. If, however, you don't have one there is an else statement which allows manually drawn loading screens with text. Enjoy!
  2. Attempting to compile with codeblocks and getting that error. I have tried copying the contents of the "Include" folder from common/Leadwerks to the Sources folder and the error went away but now i get a "zlib.h: No such file or directory" so i assume i wasnt supposed to do that. Had leadwerks for a little while now but im still not all that sure how to use the C++ extension. I want to try to make this game with as little lua as possible.
  3. What does the DisplayProgressbar do? I would check (assuming it is not a function i am to make) but I do not have access to a working leadwerks,
  4. Any variable or function I can call to check if it is loading? Trying to make a conditional for a loading screen
  5. I'm not too experienced in this so i may be wrong (I havent done networking yet) but i believe you spelled "address" wrong on line 13. Don't know if that is the only problem
  6. tomis13lack

    Exit Zed

    All right. Game looks good - I wanna try it. Get back to me if you can release it for linux.
  7. Fixed with a fresh install of steam... weird
  8. Those who make a standalone game might want an installer for it. It makes the game seem more professional. I have created a small NSIS script for those who want to use it to accomplish this. You will need to change stuff. I put the vital things you need to change on lines with 6 #'s. It doesn't look that good but NSI is really simple. Fixing it up should be easy. The #'s are comments. # comments 1 line but i used 6 around the text as an attention getter. semicolons as well as /*'s are also used for commenting on this. OutFile "GameInstaller.exe" !define pathToGame "C:\Users\**USERNAME HERE**\Desktop\**Gamename**\" ######Replace as you see fit###### InstallDir "C:\Program Files (x86)\NameofGame" ######Replace as you see fit###### Section SetOutPath $INSTDIR File /r ${pathToGame}\* WriteUninstaller $INSTDIR\uninstaller.exe SectionEnd Section Desktop MessageBox MB_YESNO "Create a Desktop Shortcut?" /SD IDYES IDNO end CreateShortcut "$desktop\myapp.lnk" "$instdir\gamename.exe" ######Replace gamename.exe with ur game's exe file###### end: SectionEnd Section -Prerequisites ######Any prerequisites go in here. I used OpenAL as an example###### SetOutPath $INSTDIR\OpenAL32 MessageBox MB_YESNO "Install OpenAL32?" /SD IDYES IDNO end ###Asks if they want to install openal in a message box File ${pathToGame}\dependencies\openalinst.exe ###i put the openal installer in a dependencies folder ExecWait ${pathToGame}\dependencies\openalinst.exe ### actaully installs openal end: SectionEnd Section "Uninstall" Delete $INSTDIR\uninstaller.exe Delete $INSTDIR\gamename ######Replace as you see fit###### SectionEnd You need NSIS for this. Here is a link: http://nsis.sourceforge.net/Download/ How to use it: Step 1. Paste the script in notepad Step 2. Save the script as install.nsi (or whatever-u-want.nsi) Step 3. open with NSIS and compile. If you have installed NSIS you should be able to compile by right clicking the nsi file and clicking "Compile with NSIS" Step 4. Enjoy the installer has everything in it. It will work on any system. You do not need anything but the installer to install.
  9. tomis13lack

    Exit Zed

    can you release for linux
  10. Thank you. I would really like to know how to do an animated loading screen with C++ as this only tells you how to make a static loading screen with lua. Do you know what i could run as a condition to check to see if it is loading and create a loading screen if it is? For example: ... while(isLoading()) { //some code to create the animated loading screen } ... I can't see any c++ examples for networking. I see the syntax of the command and that is it. From there, i have no idea of where to go. I know C++ but have no idea how to use it with leadwerks and not mess everything up. I don't even know where to begin if i want to add something to it. I can make a separate function but would have no idea how to set it up to be called. I do not know how to associate in game things with C++. Could anyone with a considerable amount of experience give me an example (even if just a small one) or a list of commands/classes/etc. that i will be using in leadwerks C++?
  11. Decided to do this one as well simply because I thought "why not." I am sure that Josh is quite busy so i'll try to do some of the more annoying/tedious stuff for now: Function Overloading Functions can be "Overloaded." An overloaded function is a function that exists with different arguments. This can be used for some functions that you may want to run with different argument types. This may also be used to allow default values and to avoid compiling errors: int addOne(int num) { return ++num; } int addOne() { print("There is no argument"); } addOne() //Output is nil, but it prints "There is no argument" addOne(5) //Outputs 6
  12. **Before I do this, i want to let you know that I am not well experienced in leadwerks C++. I am using what i know to combine it. I do not know any wait commands in leadwerks so i made my own. I am also not sure if that is how it wants the keys. Please fix as you see fit** Just in case someone is to need it: Do...While Loops Like, the while loop, the do...while loop continues looping over its code until a condition is met. The only difference is a do...while loop runs the code once before checking the condition. The syntax is as follows: do { //code to be executed } while (condition) The example below can be pasted into your "main.cpp" script file to see how do...while loops work. In this example, I am using a while loop like from the previous example. The do...while loop makes it so when you first start, it displays the "Tab menu" for 5 seconds. It will do nothing until tab is pressed again and it will display the tab menu for 5 seconds after the tab button is released and all of the time in between. #include <unistd.h> // Library used for usleep #define sleep(a) for(int i = 0;i<a;i++) {usleep(500000);usleep(500000);} // Creating a wait command for timing where "a" is the seconds //Create a window Window* window = Window::Create(); //Create a rendering context Context* context = Context::Create(window); // While loop while (window:KeyHit(Key.Esc)==true) { //Do...While loop do { //Set the drawing color and clear the screen context->SetColor(0,0,0); context->Clear(); //Set the drawing color and blend mode context->SetColor(1,1,1); context->SetBlendMode(Blend.Alpha); //Draw some text onscreen context->DrawText("This is the Tab Menu!",2,2); //Update the screen context->Sync(); sleep(5) } while (window:KeyHit(Key.Tab)==true) }
  13. I have a computer running Debian Buster. Upon running, it shows the "Create a project" page. If one is to create a project, it closes (cannot find an error - cannot open without steam therefore cannot open in terminal). If I open it again, the project is still not there. The project does exist in the leadwerks project folder. I would give inxi results or specific paths but i am not on this computer at the moment.
  14. While I am asking, i should probably ask about loading screens as well. I have absolutely no idea how to create one of those.
  15. I know C++ and lua is really easy. When I say I know C++ quite well i mean in every way except practice. I have the C++ addon on steam and have no idea where to go from there. I am trying to make a multiplayer game. I saw the Connect, client, etc. from the api but have no idea how to implement them. Can anyone reference a tutorial or anything? P.S. I have a Poweredge T410 with 2, 4 core Xeons and 96Gb of ram for this server - will that be good enough for ~64 players (a relatively simple first person shooter). P.P.S. Linux compatibility is high on my priority list. Would I just copy + paste anything i do to windows, to linux for that?
  16. I got everything fixed except one thing. Thui appears now and everything but the mouse is still locked when this happens. This problem did not occur before. Also if you click on some of the buttons the game crashes
  17. I think i should also add: old: local windowstyle = Window.Resizable+Window.Titlebar if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+Window.FullScreen end window=Window:Create(title,0,0,System:GetProperty("screenwidth","1024"),System:GetProperty("screenheight","768"),windowstyle) window:HideMouse() new: local windowstyle = 0 local winwidth local winheight there seem to be a lot of new local variables and stuff and i am not sure the usage. Is there anything i should keep? Edit: Also, i added in thui initialize and the import and it runs now, but thui isn't working. When you go to anything that would open up a menu, all effects occur except the menu itself. Game gets paused and everything but no options. Edit 2: Forgot thui update. that is fixed.
  18. What is this "Menu.lua" and what is it for? It is imported in the updated main.lua but not the old. What should i do with it?
  19. you say it most likely changed it. Does this mean it will have entirely reverted it? Will i have to rewrite things i put in there? i did have to add the line again but same error.
  20. I haven't worked on my game in a while. When i went onto it it said it needed updated. I updated it and now the game will not run. It gives this error: No changes had been made since and it ran fine then. Only one map is still able to run, but the map isn't functioning properly as everything is black. When run in debug mode it says 0 polygons, etc. (0 everything) this game was last updated in april of this year. I am assuming this is because of the thui update, but i am not sure where i would be able to find the revisions i would have to make.
  21. I will try making a window for it. If i do it this way, is it possible to set system properties (launch options to an extent) from this window for the next window? An example of this would be if i were to make this window with a button that says "Click here for fullscreen" and you click it, could it set the system property "fullscreen" to true?
  22. I would like to add a launcher to the game to allow settings to be initially set before launch. Is this possible? If so, is it possible without the professional pack?
  23. I have made a script which shows the price of an object. Everything works up to the "timer." It doesnt cause any errors, but it doesnt do what it should. I am trying to make it stop displaying the text. Here is what I have so far: if (xd==7) then context:SetBlendMode(1) context:SetColor(d) context:SetFont(font) context:DrawText("Not enough money, you need "..self.cost,50, 50) Time:GetCurrent() local stop = Time:GetCurrent() + 1 if (Time:GetCurrent()==stop) then xd = 1 end end This is located in a Script:PostRender(context) function. Any ideas?
  24. I am trying to make a door that when used changes the map. Most of the things i have been referring to have referenced Apps.lua, but i know that apps.lua no longer exists. This is what i have so far: function Script:Start() self.parent= self.entity:GetParent() end function Script:Use(parent) World:Clear() Time:Pause() return Map:Load("Maps/start.map") collectgarbage() Time:Resume() changemapname = nil World:Update() end This doesn't work, giving errors with World (isnt set), collectgarbage, etc.
×
×
  • Create New...