Jump to content

reepblue

Developers
  • Posts

    2,503
  • Joined

  • Last visited

Everything posted by reepblue

  1. Leaks of games happen, and they still happen. You can spend months and months working on your game, only for a server attack or the wrong person to share it with their buddies; which then goes public accidentally, (or intentional). Having an unintended work in progress build out there can give people the wrong idea about your game because there are people out there who think the development process is pretty straight forward. Let's take a look at the Half-Life 2 leak. The game, and the entire engine code was leaked and the entire thing was very unstable, It was also found out that all those were scripted, and broke when you actually play them. A lot of doubts and concerns about the game were made as they felt like they were lied to after seeing videos and screenshots not representing the leak at all. Of course, this later on generated a community of it's own, but that's a rare scenario. Since Leadwerks is far more stable than a Source Engine build from 2003, you can have months of playable work leaked. If you indeed plan to sell your game on Steam or Desura, you most likely don't want you're game freely available. So how can we prevent this? If you already got a SteamAppID from Valve after a successful Greenlight campaign, there is nothing to worry as users need a key to access your game. But what about if all to your game is dev textures, rough code, and programmer art? If you only have the indie edition, or only use Lua scripts for your game, you can use the Game Launcher, and set your game to "Friends-Only". For games written in C++, or have a modified application, we can't do that as our program does not get uploaded to the workshop. With the Standard Edition of Leadwerks however, we can use more of the Steamworks API. A friend of mine was talking to me about how an old Source mod use to detect if an invalid Steam user tried to boot the mod, it would not boot. Once I heard this, I was eager to see if I could get a similar system to work. Every Steam user has a public unique ID that comes in many different forms. Steam and games use this to gather information about the user, among other things. In this case, we are going going to focus on the 64bit FriendID number. Thanks to the Leadwerks API, we can access Steamworks features without our game being on Steam! Let's us first start with creating a bool function under the main.cpp. bool CheckSteamID() { if (Steamworks::Initialize()) { } System::Print("Error: Failed to initialize Steam."); return false; } So far so good! We make it a bool function so if we are not a fail to load Steamworks, or have the wrong ID, it will return false and close the program. Now let's get the users ID number with: uint64_t user = Steamworks::GetUserID(); As I said before, SteamID's come in various forms. The easiest to get is the 64 bit FriendID which appears in profile urls such as http://steamcommunity.com/profiles/76561197996502882/ As you can see, my SteamID is 76561197996502882. For the rest of this article, I'm gonna use mine in place of where you should put yours. A way to get yours is to go on a site such as http://ihavenfi.net/steamid. Popping in the STEAM_0:0:******** format after putting your ID-less profile URL will give you your FriendID. Remember, these numbers are public, they aren't like credit card numbers, or anything. So let's continue! For this example, I'm going to use My SteamID. So let's make a simple if statement comparing the account trying to play this game with a hard coded value. bool CheckSteamID() { if (Steamworks::Initialize()) { uint64_t user = Steamworks::GetUserID(); if (user == 76561197996502882) // Me! { return true; } else { System::Print("Error: Invaild SteamID!"); return false; } System::Print("Error: Failed to initialize Steam."); return false; } With this code, (and I hope you replaced the SteamID), your game will only work for you if you're logged into your account. But you need beta testers, and what about the other developers? Let's Continue by adding more IDs! As another example, let's grab Josh's SteamID. After all, he's the CEO and should be able to play any LE game he wants. Although his profile is private, we can still grab the ID-less URL which is: http://steamcommunity.com/id/Josh Pop it in the converter and we get: STEAM 0:0:6085996. Let's pop that value in again and we finally have his FriendID which is: 76561197972437720 Now let's edit that if statement. if (user == 76561197996502882 // Me! || user == 76561197972437720) // Josh { return true; } Now, Josh can play our game if he's logged into his Steam account. The best way to get ID's is to make a Steam Group for your testers this way you have all the profiles listed that you need to code in. We're not done yet, we still need to call this function near the start of the main function. if (!CheckSteamID()) return 0; Just make sure you comment that out when your game does get to be on steam, or when it releases elsewhere with a different DRM measure if you desire. With this somewhat messy way, you can restrict your games to certain steam accounts without having your games on steam during development. As a bonus, let's welcome the user in the console to make the tester feel they're special. Put this before the function returns true. std::string username = Steamworks::GetUserName(user); System::Print("Hello there, " + username + "!"); And that's it! There is most likely other ways of doing this, but this way is the simplest and easiest. If you hard code FriendIDs, and use the stand-alone publishing for beta builds, your game is just a bunch of unplayable bites and bits if it falls into the wrong hands!
  2. Not saying they should be prefabs, but mainly a working functional way with-in the editor. Maybe you can have a similar format as pfb, but they auto break their instance on creation. Store these in the steamapp folder and have the editor read the files from that directory instead of the users game.
  3. I've been experimenting with dragging and dropping pivots with scripts already attached to them. It worked out really well minus the dialog box showing up when you edit the object. I then just created all the Leadwerks objects one by one and saved them to prefabs, and seems to be faster and easier than the traditional way. Decals and Point lights benefit the most from this method. I've attached my prefabs to give you an idea what I mean. Again, only downside to this is that dialog box. Maybe in the future have all the objects on the left sidebar and if the user holds down on the button/icon, then drags from the button to the scene, the object will be dropped in. If it's just clicked, then it would act like it does now. ObjectPrefabs.zip
  4. reepblue

    Thinking

    I used to play with LEGO all the time! I loved making cities and skyscrapers. I still to this day wish to make a minifigure scale metropolis.
  5. Thanks for fixing the screen position bug and adding apply rules to the decal entity. It really prevents this kind of stuff now with movable objects. https://dl.dropboxusercontent.com/u/16218991/screenshots/Leadwerks/Bugs/decalbug2.png The decal tool feels really solid now!
  6. With mp3 support comes royalties. Leadwerks is advertised to be a royalty free engine, meaning that no additional costs have to be made when you're game ships. If Leadwerks had mp3 support, people would not be able to freely publish their games as they can now. .ogg support is something that has been requested numerous times so join the club. I've read on older posts that people got it implemented with their projects, but I never could myself.
  7. I'm sure. I copied and pasted the decal shader folder of the Common folder even after today's beta update. Here are the shaders along with the older diffuse shader from July 28th. decalshaders.zip
  8. Using the latest shaders, if place a decal on the floor at the map origin, the decal will appear fine. If you move it around, you'll see it move with the decal placement plus a little bit of distance from the map origin. If you place it too far from the map origin, the decal will not appear. The old shader does not do this.
  9. Was this not suppose to be in there yet? It would explain the spam of warnings. I'm really glad to see that such thing is coming soon, but I'm a little bit sad because I've just finished my stuff, and this sounds like it will be a better option. I was able to fix the conflict by putting my classes under a namespace, so my stuff still works for the time being.
  10. Very nice. Will it work with textures that are drawn on the context? I can't wait to play with it! Also, I've noticed some GUI stuff in the library. Is it a WIP, or is it actually functional? Only noticed it because my code broke because of these new conflicts. Gonna look for more surprises!
  11. Thanks to macklebee, the correct answer is to use the count/getnodes function like: unsigned int xo = System::GetGraphicsMode(System::CountGraphicsModes() - 1).x; unsigned int yo = System::GetGraphicsMode(System::CountGraphicsModes() - 1).y; Then, use those int values for x and y. In this case, I need it to be a char to save to an XML file. namespace patch { template < typename T > std::string to_string(const T& n) { std::ostringstream stm; stm << n; return stm.str(); } } std::string sx = patch::to_string(xo); char const *pchar_resX = sx.c_str(); std::string sy = patch::to_string(yo); char const *pchar_resY = sy.c_str();
  12. With my application, if a settings file does not exist, the main function creates one, and fills it with default values. One of these is to grab the main screen res of the user's monitor. In Windows, I can do: unsigned int width = GetSystemMetrics(SM_CXSCREEN); unsigned int height = GetSystemMetrics(SM_CYSCREEN); However, since my HDD with Ubuntu on it died, I can't test the linux variant I've found on the internet. #include <X11/Xlib.h> Display* disp = XOpenDisplay(NULL); Screen* scrn = DefaultScreenOfDisplay(disp); unsigned int width = scrn->width; unsigned int height = scrn->height; Is this correct/will work, or is there a different/better way? I tried using the Count/GetGraphicsModes function, and although it did work on my Linux machine, it did not work on my Windows Machine, and I've read that it's not perfect. Thanks.
  13. I think amount of linux users will go up once Steam Machines and Steam Links release with the SteamOS out of beta. No matter what, if Leadwerks runs on all (the big ones) three PC operating systems, anyone with an OpenGL4 card can purchase the editor and play our games; and that's really neat.
  14. Most likely not, I would just wait until it's officially supported before thinking about building for OSX.
  15. I know that there is a tool under "Steam\steamapps\common\Leadwerks Game Engine\Tools" called fbx2mdl. It's an old school console program that the editor uses. If you use a batch program to launch it with pause, it will tell you its parameters. Sadly, this is the only tool that gives you help with compile parameters except VTFCmd, but ALL Valve/Source tools do. Not sure it can decompile mdl to fbx if that's what you want.
  16. Thanks, I'm always happy to hear when my work inspires others. Thanks, hopefully no one will find my code too terrible.
  17. Issue with me is that I need the toolset, hence a re-download of VS2013.
  18. I also think CSG use this type of collision. If you look at the CSG in-game (which get turned into models), you can see the triangles on the faces. For models, I personally would not use it.
  19. Thank you for the answer. I understand that only true nerds care about what version of IDE they use, but I figure I'll ask in-case someone down the road has a similar question. I might need VS2013 still anyway due to some ties I still have left with the Source Engine. I'll still try the toolset solution that Roland suggested because why not? I just gotta hope it does not fail to install something like it has the last two times.
  20. After the release of the Vectronic Demo, I started to seek out how to make the game to be able to stand-alone without any additional launchers, batches, or required installations. Shortly after my last blog post, Josh informed me about Inno Setup, and it answered my questions about providing OpenAL if the user did not already have it installed. More about that here. I haven't played with it yet, but it gave me insurance about packaging it up for the final release down the road. Alternatively, Steamworks is also an option, but I'm not touching anything Steamworks related until I get a App ID for the game. With the Leadwerks Game Launcher, users can edit basic settings such as "Resolution" and "Fullscreen" and any settings that may come in the future. As a stand alone game, it would not have easy to use game launcher, hence a menu with a settings feature is required. I didn't want to make a launcher, as they are kind of unpopular, and OS exclusive. (You'll have to build a launcher for each platform.) I wanted something already in the application, and can be compiled on multiple platforms minus a few edits here and there. I also wanted most settings to be real time so players can adjust their settings to their likings without needing to restart the game. One thing I really liked about developing mods for the older branch of Source was the gameui system it had. It was simple, reusable, and out of the way. You could edit the res files to customize it if you wish, but it's stock files was enough to get you started; even release with. I wanted my UI to be based on this. Only reason why they retired this UI system in favor of their hell of a client based UI system starting with Left 4 Dead, (I played with it, it was not fun) was due to Console/Controller support. Yes, the Xbox360 controller does work in the old UI, but when you open it's panels, you better have a mouse near by! However, with things like the Steam Controller, and the fact that Leadwerks is mostly PC based anyway, this UI design will certainly do. To make it reusable, the UI would have be modified outside of the source code. Changing fonts, colors, titles should not require a recompile. Also, such things like the start map, and background map should also be able to be changed outside of the source. No matter what game it is, it should work. Finally, to make it out of the way, the entire system would be written in C++, and not interfere with any game logic written in Lua. However, from Lua scripts, you should be able to communicate with it in case you wish the application to disconnect you from a map, or shutdown the application entirely. From lua, you should also be able to grab boolean states like if the app is paused, connected (in-map playing) or disconnected, and not in any map if needed. So that was the goal, and 3-4 weeks later, the goal was completed with a few bonuses such as a precache list for loading models/prefabs onto memory, a very basic save system, and in dev mode (which is also enabled in debug mode), information about what version of the engine you're running and map name is printed in the top right corner when paused. (Something Source does which I liked.) (Could not use media tags due to them being Unlisted) I'm very happy of the results. Not only this necessary element for a stand alone is done, but this will make my testers happy as they no longer need to edit batch files to configure their settings! I believe that this is necessary, and anyone should be able to have it. After a few more bug fixes, I'll upload the Source files to GitHub along with application releases so even people with the indie version can use it. Only thing I did not test was the application on Linux since the hard drive in my Linux machine finally died after 7 years of service. Knew it was coming, but still a set back. Hence another reason why I want to make it public, so that it works on all supported platforms and gets more optimized over time. I'm not the best programmer in the world, so every little thing helps! I'll talk more about this when I put it up. There is a lot of technical stuff about it,
  21. Very cool, good luck. I recall doing a similar concept on Source a while back with antlions.
  22. Without VS2013 installed, only Visual Studio 2015 (v140) and Visual Studio 2015 - Windows XP (v140_xp) are the only options under Platform Toolset. Is there a way to install just the needed toolset from the installer, don't wish to have two IDEs installed if I don't need too. Whoops, I guess not. Still any information of this being soon, someday, or never would be nice.
  23. I loaded up my demo map to add some decals, and I found out that my models with bones have shrunk down. Might be similar to this http://www.leadwerks.com/werkspace/topic/12680-models-and-their-bones-slowly-rotate-with-each-saveload/ However, the rotation stayed the same indicating that fix is still working. As you can see, the scale is suppose to be 1.0, but here, it's 0.993 for X,Y, and Z. It also seems to be the root node that does this, the children don't scale down separately, only with the root. Oh, it's also not selected red because of a shader gotcha that I've made, that's something I did.
  24. So, are you thinking about adding a function to the World/Time class to remove the step of disabling the world from updating in the loop if paused is set to true? Will old methods still work?
  25. reepblue

    Windows 10?

    Not only that, but the XBone was less powerful and more expensive than the PS4, and came with something that no one wanted. Also, it's DRM policy on games. It also required people to always be connected to the internet which would be an issue with people with slow/limited internet access. Sales have been climbing since new management with it being kinectless and $349USD. No one really switched to 8 until 8,1 really. As time goes on, (and when it becomes more of a complete OS) more people will adopt Win10. Again, I'm more than positive that MS tracked and recorded your actions with Windows 8. It even had a back door, and I think a back door was installed in a Windows Update for 7. Just because now they are "admitting" to it, now it's suddenly a hot topic. It's nothing new, we've should have had this discussion 3 years ago. We live in this day in age, it sucks, but we are not fully under big brother yet. You still have a choice of what you decide to use. No one is forcing anyone to upgrade to Win10. If you don't like where Windows is going, now is the time to warm up to a new OS before your 7 or 8.1 stops being supported. I know my next machine isn't gonna run Windows, and I've been using the OS since I was 4. My next machine is most likely run Ubuntu, I just hope by the time I abandon Windows, more and better software will be available. I'm pretty much able to do everything I do on Windows with Ubuntu, minus Illustrator. I'm also interested in building a Hackintosh at some point just for fun. So, besides the whole big privacy festival, Leadwerks runs fine as it did with Win8.1; although now that does not seem to be the real reason why people are not upgrading, but I may as well put that out there.
×
×
  • Create New...