-
Posts
27 -
Joined
-
Last visited
Recent Profile Visitors
2,346 profile views
tomis13lack's Achievements
Newbie (1/14)
6
Reputation
-
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!
-
Leadwerks.h: No such file or directory
tomis13lack replied to tomis13lack's topic in General Discussion
weird - i'll try remaking the project -
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.
-
Any way to check if game is loading in C++?
tomis13lack replied to tomis13lack's topic in Programming
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, -
Any variable or function I can call to check if it is loading? Trying to make a conditional for a loading screen
-
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
-
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.
-
I know C++ and Lua but I have no idea where to go from there
tomis13lack replied to tomis13lack's topic in Programming
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++? -
Add Do...While loops to the C++ tutorial API.
tomis13lack replied to tomis13lack's topic in Suggestion Box
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 -
**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) }
-
I know C++ and Lua but I have no idea where to go from there
tomis13lack replied to tomis13lack's topic in Programming
While I am asking, i should probably ask about loading screens as well. I have absolutely no idea how to create one of those. -
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?
-
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