Jump to content

Slimwaffle

Members
  • Content Count

    245
  • Joined

  • Last visited

Community Reputation

45 Excellent

About Slimwaffle

  • Rank
    Advanced Member

Recent Profile Visitors

2,568 profile views
  1. Hey guys and girls. I haven't posted here in a while because my project has moved elsewhere. I wanted to come back for a bit and just give back to some of you guys that helped me out. I'm going to leave a zip here with a collection of lua scripts from the earlier leadwerks version of my project. I haven't touched any of this code in a few months as I'm not even using lua anymore. But I hope that you guys find something useful in here or get some ideas from some of the code. Some of the scripts are unfinished things I was experimenting with. But from memory there are HUD, Inventory and Crafting panel scripts that only use simple draw to screen and detect mouse position commands, that you guys might find useful. Anyway enjoy guys and girls I hope this helps someone. Scripts.zip
  2. What is really weird is that if I take everything with the name waffles on it out of my project. Take out source and projects folders. And add back in the waffles.werk and waffles.exe. And use the publish button as standalone it works. But doing it this way it isn't compatible with visual studio. Which means I can't seperate my data folder into smaller zipped folders. (Which lets me have smaller updates when patching).
  3. I just restarted. The game .exe still isn't running outside the engine and visual studio still isn't showing the leadwerks packages. I am using visual studio 2017. Could that be the issue?
  4. I all of a sudden get this error. fatal error C1083: Cannot open include file: 'Leadwerks.h': No such file or directory (compiling source file ..\..\Source\main.cpp) Also at the same exact time. My game won't run. Windows says it doesn't have a valid digital signature. This is really weird because both were working only an hour ago just fine. No changes since.
  5. I think it might be the navigation being broken. A blank small project works fine. But I remember reading in the forums there was a bug where if you changed the world size or terrain size (something like that) it breaks the navigation. And I did this in my game because I was making a massive open world game. The navigation does appear to be broken because enemies often don't know where to run or move to (and glitch out). And I have noticed these crashes are happening when they glitch out. I have also noticed having more then 1 or two enemies causes the scene to become overloaded very quickly. But this could be because the Leadwerks is 32 bit and isn't able to access more ram.
  6. There is literally nothing specific going on. I have been trying for months to narrow this down. It happens at random and they are doing different things. One that does happen a lot. Enemies will run in place because of the broken navigation. Then after a while they will glitch out collide with the terrain and then the game will crash. But that is only one of many causes. It honestly feels like simply having enemies in my project causes the crash.
  7. Bump
  8. I was able to fix this issue. There was a windows update that messed everything up for me. I had to use event viewer to find the culprit and adjust the registry to fix the problem.
  9. I am just wondering if anyone else is all of a sudden experiencing crazy crashes. I haven't changed anything in my game since Friday. It was working fine then. Now all of a sudden I am getting blue screen of death when I try to play it. And I even get this playing the game in the leadwerks editor. But everything else on my computer runs and plays fine. And its really frustrating me because just a couple of days ago it was fine. And now its not and I haven't changed anything.
  10. I did notice something. Josh mentioned high DPI would make things small. There is a way around this and it comes down to how the individual leadwerks user writes their code. I will explain what I mean. Instead of using pixel sizes you want to use divisions of the screen size. For example instead of saying context:DrawImage(self.label, bx + (bsx / 2 ) - (150), by - 50, 300, 50) you want it to look like this; x = (context:GetWidth() - context:GetWidth()) y = (context:GetHeight() - context:GetHeight()) sx = (context:GetWidth() /10) sy = (context:GetHeight() /20) context:DrawImage(self.label, x, y, sx, sy) I understand in these two examples the are different sizes and co-ordinates. But it is to just illustrate what I am referring to. Because if you make all your sizes based of screen size the same way you would with co-ordinates for printing, Everything you print to screen will always take up the same amount of screen size regardless of resolution. You can't expect everything to resize if you don't first tell everything to resize. So with this in mind I would like to see support for HIGH DPI. Because its really badly needed. And resizing is something that is easy for the programmer to implement into their project.
  11. This is the script I would prefer to have working crash free if at all possible. SCAI.lua
  12. I don't think its a bone reference thing. Because it even does it while using default crawler prefab.And I tried a very basic script that I wrote where all that was in if was; if player is inside this distance run to random position. I tried debug mode but its unusable my game won't even run in debug. It hits 2fps and stays there in debug mode. Which is weird because I have a pretty decent pc and my gpu is the nvidia 1080. I don't think nil checks will help because I have already tried bare bones code that simply says re-position if player is in range. Using this method I was able to get the crashes from every minute or so up to around the 5-10 minute mark. Also something to point out using this method the game would run longer with fewer crashes but it would also experience a different kind of crash that wasn't so random. Where my game just kept getting slower and slower as more spawned in and then it crashes. I noticed there was a collectgarbage command. Is this something that only works in debug? What is the correct way to use this? I was thinking it might help if I use it in the update world function.
  13. I was wondering if anyone is able to help me. So I have had an issue for months now with Enemies crashing my game. Regardless of the models/animations I use. Regardless of the scripts or code I use (I have tried the Default, The HUD elements ai script and about 4 variations I have made myself). Simply having enemies in my project causes crashes. I have tried running my game without enemies and it runs perfectly. But even if I set them to run away instead of attacking, simply having enemy characters causes the game to crash. I would really love and appreciate some help fixing this because its an issue that makes my game unplayable and the only major bug I have left to fix.
  14. ok so to my understanding. There is a folder called projects with a folder inside that for windows or linux. Open the windows folder and you will find a file with the title of your project with the .sln extension. You want to open this in visual studio. This file uses an interpreter to call your main.lua script to run. And if you want to make a c++ project. Just don't use this code and instead launch a main.cpp. What I am wanting to know is how can I use the interpreter to pass a value from a lua script to a c++ script? This way I can do a check at the start of the game to see if an achievement has been triggered. Or would it be possible to say write to a file then read from a file? SO for example; if you kill 100 enemies the lua script writes to a file on line one the word "true". Then when first running the game before the lua stuff kicks in. The c++ reads line 1 from file and triggers achievement if true. Then continues through the list to trigger the game.
  15. Ohh yeah I understand the steam stuff and documentation. I want to know if there is a way to trigger it using lua. My game only uses c++ when first launching the game and then swaps to lua Is there a way I can maybe pass a value from lua to a global in c++. So that when the game first runs it checks the globals and triggers achievements?
×
×
  • Create New...