Jump to content

Gonan

Members
  • Posts

    185
  • Joined

  • Last visited

Everything posted by Gonan

  1. Materiels folder, Effects, Invisible.mat Just drag it onto your trigger box, that will make it transparent.
  2. Thanks YouGrove, I am taking things right back to basics. I created a platform as a map and added 10 zombie type 1 to it. I gave the all different colours and names to match. No longer prefabs. I used the idle cry timer to kill off the zombies using setmode("dying"), one by one, and released them when they died. When last zombie dies, many bits of the entities report themselves as deleting in the log, I then press 1 and the level is reloaded by setting changemapname to "ten". The remaining elements of the scene then report as deleting, ie the platfrom mat tex and 2 shaders. If i force a map reload before the last zombie dies, the world.clear takes over and the same number of lines are reported in the log but in a different sequence, starting with the monsterai.lua. I also call AnimationManager:ClearAnimations() just before releasing the dead entity. And I divided the radius by 300 in GetEntityNeighbors to minimise the size of the table. So now I can reload a map with 10 zombies about 48 times before it crashes. My only clue is that the next entry I would expect to be written into the log is Loading shader "C:/Users/pro1/Documents/Leadwerks/Projects/MaxCharactersTest/Shaders/Lighting/ambientlight.shader"... I've run it in debug mode and video memory usage starts at 23mb after the first level is cleared, 17mb and just before it crashes 25mb and 19mb when the 48th level is cleared. Using the same code but with a level with 30 prefab zombies, still causes the crash after the 4th level. And the next expected line in the log is the same as above, ambientlight.shader, is also missing. Also worth of note is the entity entries are not showing as deleting in the output log. I tried reducing the number of prefabs from 30 to 20 to 15 to 9 and the entity deleting line never show in the log. So I named each prefab entity, and the entity deleting lines reappear. I saved one of the zombies as a prefab, tried again, and the entity deleting lines are still appearing. But if I then create a new zombie from the saved prefab, I get the same results as when I used the prefab from AddOns. So maybe not using prefabs is the answer. No, I can have 30 non prefabs and the deleting entries for zombies appear in the log, but alas they still crash after 4 reloads. The animation does however does look smoother with non prefabs, don't know why.
  3. In latest Beta 3.3 update, the Game Player no longer loads, I had to revert to the previous 3,3 release version, then it loaded ok.
  4. Running 3.3 Beta, looks like you can no longer select GAME as the type when using Menu ->WORKSHOP ->Publish File... The Type: field allows Map, Material, Model, Prefab, Script, Shader, Sound and Texture. Is that the end of publishing free games onto the Leadwerks Steam Workshop, and we now use http://www.leadwerks.com/werkspace/page/games and use the Add Game button. If this is correct, is there a new publishing document that explains how to use the entries, like what do you actually put in background and download boxes, there is a 19.53mb limit applied to attachments, what would you expect to be attached? An example game publish workflow would be quite handy. Also there is no visibility options like public\friends\private, as this was steam infrastructure. So presumably its now public, even on the first publish. Is there going to be a similar site to Games, like Reported issues, using visiblity private/leadwerks users/admins for providing examples that fail, which would make it easier for Josh or fellow Leadwerks users to see the issues we sometimes experience.
  5. Aversion to adding complexity and progressing with the game, when you are not sure why things break. My first two games have been using LUA, but when things go wrong, I tend to get bogged down trying to understand why. In LOSW for instance, I had to limit the number of Crawlers and Zombies and number of Levels, as it would crash, mainly when loading a new level, where I had over 120 characters loaded in total, during previous levels. So to debug, I created a simple large box, a camera, pulled it back to view the scene, and added crawlers and zombies, No FPS player. I set up the return key to load the next level. Basically the world cleared, and map reloaded. Depending on how many characters had been put into the scene, would cause the same crash after 120. So I thought must be a leak somewhere, so I added a bit of logic to the dead status, that lowers the entity into the ground and then, sets its target to nil, and releases it, and it disappears. This didn't fix the limit of 120. The problem now is I end up going down all sorts of blind alleys, like creating a map with just Root, and testing lines of code with the collectgarbage("count"), what I need is a method of clearing a level, all of its memory and structures, and being able to load the next level. I could live with 120 within a level but its a bit restrictive across multiple levels. I've even tried a "collect" after loading the empty map between levels, made no difference. So now I am wondering how do I live with these limitations, do I have to write some game status out to a file, end the program, and reload the program from a .bat file, which reads in the status and creates a new level, to continue. Is there some tidying up code that needs to clean up all the assets loaded in a Map. Is there an array/buffer/stack overflow causing the crash, should it be possible to unload a map collect garbage and load another level, without causing the crash after 120 characters have been loaded? Has anyone else found a cure?
  6. I added this bit of code to MonsterAI.lua make the end of the setmode function look like this elseif mode=="dying" then self.entity:Stop() self.animationmanager:SetAnimationSequence("Death",0.04,300,1,self,self.EndDeath) elseif mode=="dead" then self.entity:SetCollisionType(0) self.entity:SetMass(0) self.entity:SetShape(nil) self.entity:SetPhysicsMode(Entity.RigidBodyPhysics) if self.target ~=nil then self.target = nil end self.deadtime=Time:GetCurrent() end the end of the UpdatePhysics to look like this elseif self.mode=="attack" then if self.attackbegan~=nil then if t-self.attackbegan>self.attackdelay then if self.target.entity:GetDistance(self.entity)<1.5 then self.attackbegan=nil self.target:Hurt(self.damage) end end end local pos = self.entity:GetPosition() local targetpos = self.target.entity:GetPosition() local dx=targetpos.x-pos.x local dz=targetpos.z-pos.z self.entity:AlignToVector(-dx,0,-dz) elseif self.mode=="dead" then if t>self.deadtime+1000 then self.entity:SetPosition(self.entity:GetPosition().x,self.entity:GetPosition().y-0.01,self.entity:GetPosition().z) end if t>self.deadtime+2000 then self.enabled=false self.entity:Release() end end You should also add Script.deadtime=0 to the list of Private values at the top of the .lua file When your monster is killed, it lies dead for 1 second, then sinks into the ground for the next second and the release causes it to disappear.
  7. Look for backups under the Documents\Leadwerks\Backup folder. They are named with the original name plus -backupxx.map where xx is a sequence number. This is just a simple folder for taking backups of all your maps, so if you used the same map name in two or more projects, they may be for entirely different maps, use the modified date to select the appropriate backup and just copy it back into your original project, rename it to suit, and then open it to make sure its what you need. After using Leadwerks for several hundreds of hours, you may need to perform some house keeping on this folder, I would suggest not keeping more than 3000 files in a single folder to maintain good performance.
  8. Hi, I was wondering what difference is made if you have a prefab loaded into a map and make a change, like its Team entry in the Script tab, you are informed that the entity will no longer be a prefab. Under what circumstances would there be a benefit to saving a new prefab. Is there any performance advantage from saving a new prefab and using it, rather than changing the original prefab multiple times on each new instance of the entity?
  9. Create an API for use in Lua or C++ to allow users to get the top 10 scores and gamer tags who scored them. When you get a Game Over screen, the users score could be in the top 10, if it is post it to the workshop site. For security and prevent tampering, the data could be stored as a simple table, using builtin fields such as the Author of the game, the Name of the game to identify the game; the steam handle of the player, and would rely on a score provided by the game. A web viewer to the workshop would allow you to check the top 10 players and their scores. Across any game published onto steam. The amount of storage used would be minimal. Optional use a local table to keep your own leader-board in AppData. This would not be uploadable to the workshop site, due to the possibility of tampering.
  10. Create an API for use in Lua or C++ to allow users to get the top 10 scores and gamer tags who scored them. When you get a Game Over screen, the users score could be in the top 10, if it is post it to the workshop site. For security and prevent tampering, the data could be stored as a simple table, using builtin fields such as the Author of the game, the Name of the game to identify the game; the steam handle of the player, and would rely on a score provided by the game. A web viewer to the workshop would allow you to check the top 10 players and their scores. Across any game published onto steam. The amount of storage used would be minimal. Optional use a local table to keep your own leader-board in AppData. This would not be uploadable to the workshop site, due to the possibility of tampering.
  11. I deleted some old games that I had put up to test, then it seemed to get much further, failing to publish a file called "." . I successfully published after I also made the .jpg screen shot a lower resolution and removed use of one of the other workshop assets terrain, as I was only using the snow, which I replaced with white diffuse and used the assets that came with Leadwerks for the other parts of the mat. Are there any limits to the amount of storage used on the workshop per individual, for Leadwerks as a whole, or a limit to how many assets, or items that can be published? If so what are the limits?
  12. Its Christmas time, good will to all men, but what about Zombies and Crawlers, well for Christmas this year they have decided to have a massive fight, to find out who is the best. You don't take sides, but see an chance to have some fun with their altercation. You are neutral, and can not hurt a Zombie or Crawler, but you can get in their way, or push past them when they are fighting on the edge, sorry, excuse me, oops, oh dear; some may fall off, of course being a neutral you wouldn't have another motive, like placing a wager on the outcome. You would - shame on you. Well once you put aside any moral issues, you have 3 rounds to get your pot of points from 10000 to over 15000, if you manage to do this you get the bonus level which is another go at the 3rd level, to try and boost your score even higher. During each round you start by quickly working out who is going to win and walk into one of the plinths next to you to pick the winning team. You only have 5 seconds to make that choice, and as you do so the amount you can bet is diminishing. 5000 to 0. Is it suitable to play at Christmas parties? Well you may need to turn the volume down, as Crawlers and Zombies do make a lot of noise when the are fighting. Make up your own rules, like the highest and lowest scores pull a Christmas cracker. Merry Christmas and Happy Holidays
  13. Thanks Josh, is the original game publishing still working for everyone or is it just me having issues, I've been unable to publish any game to the workshop for over a week. Using latest Beta 3.3. I've posted a screen shot for the game ok. I fill in the publish game form, and a few seconds after pressing publish the form refreshes with just the Public and Game boxes still containing data.
  14. I have bought the zombie pack, and created atestzombie, freinds and admims only, this time I didn't assign a starting weapon to the FPSPlayer, I laid out the FPSWeapon pack pickup items. If I play in the editor it works, I can pick up any or all of the weapons, no problem. When I publish to the steam workshop and subscribe, I can see all the weapons laid out, but can not pick any up. Using leadwerks 3.3 latest beta. Vanilla project no scripts changed from those supplied. Items added to the start.map just crates, a barrel, zombies and weapons all items are prefabs, and a couple of CSG boxes. Turned off Nav Obstacle on all items that had it ticked, and Built a Navmesh. In the published game, the only way to kill the zombies is to lure them to your block, jump across to their block and lure them back, they fail to make the jump to the slightly higher level, and fall between the platforms.
  15. Revisited Steam Broadcast today, set to public view and played MidnightPatrol. Seemed to be working as normal for most of the time. It didn't seem to affect the game play, but did crash a couple of times, after playing for a while, which it also does when not using the steam beta.
  16. If you create a simple level, such as the one published on the steam workshop to friends and admins, ATEST33BETA A, and use the Project Manager Publish to desktop, the game will run but no weapon will be held by the FPSPlayer. Also if you add a weapon from the FPS Player pack, into the level, you can not pickup the weapon. If you run from the leadwerks editor the game runs correctly. This was created using the latest beta version of Leadwerks 3.3 with the publish to steam fix to display the initial weapon. if you empty data.zip or delete it, and copy the project folders into the published desktop folder, the game works correctly.
  17. I have created ATEST33BETA A, a game available to friends and admins, published to the steam workshop. I have added an M4 from the FPS Weapon Pack to the level. The weapon can be picked up and used sucessfully when running from the leadwerks editor, but can not be picked up if you run from the Game Player. This was created using the Leadwerks 3.3 beta version after the fix that will display the starting weapon.
  18. I will create a new bug report for the FPS weapon pack, I couldn't comment on how successful the previous fix was because the bug report was closed following the new build. I will create another bug report for the publish to desktop data.zip contents making the starting weapon disappear.
  19. Btw, found the runtime parameters -fullscreen +screenheight 1080 +screenwidth 1920 -sandbox which can be used with the .exe in the publish to desktop version to enable Lua sandbox mode, and full screen, sandbox works even with Lua only games so the handling of the parameter must be internal in leadwerks as I could not find it referred to in the project .Lua files. Is the list of built in runtime parameters documented, the nearest I have found is in System::GetProperty(), but that doesn't mention -sandbox.
  20. So to summarise we have 2 issues, 1) publishing to desktop, data.zip contents cause problems with displaying weapons. 2) publishing to steam workshop - FPS Weapon Pack items can not be picked up.
  21. Findings of publishing with fps weapon pack, adding Pickup M4 to the scene. Running under the editor works. Publishing to the desktop - no weapon is displayed, unless the data.zip file is emptied, and the project folders copied in. Also note the Lua sandboxing is disabled when running in this way. Publishing to steam workshop, "atest33beatupdate", friends and admins only, the initial weapon works and displays, the M4 displays but cannot be picked up by running over it or pressing "E". This was still using the latest 3.3 beta.
  22. 1 Follow this topic var FAVE_TEMPLATE = new Template( " Unfollow this topic If you unfollow this topic you will no longer receive any notifications "); published atestmap shows no weapon, works ok in editor, beta 3.3. Josh has fixed the issue of publishing to Steam, with an update available in the beta version. Thanks Josh. I have created another test map, friends and admins only, and published to steam using the menu workshop>Publish File as a game and the weapon now stays visable. My previously publicly published game MidnightPatrol once again works as expected. I did not need to republish it. Using the Project Manager, Publish to a desktop folder, still looses the weapon display. If I remove the contents of the zip file and copy the project subfolders into the published desktop folder, then the display returns. As soon as I create a zip file with any contents in the folder, the problem re-appears. Even if that content bears no relation to the game. I think this would mean if you wanted to publish a stand alone version to non Leadwerks users you would not be able to use items that need to be protected in the data.zip with a password, like assets in addons folders. I'll check with the FPS weapon pack tomorrow.
  23. Another Leadwerks user has also tried this on another pc using leadwerks 3.3 release, same issue. No weapon displays on publish. The other user doesn't have the FPS Weapon pack. Also tried unencrypted on my pc, same result. If I add the item pickups from the FPS weapon pack, I can't pick them up in the published to desktop version. I have managed to find and work around one anomaly by adding this line to FPSPlayer.lua. System:Print("Checking self.weaponfile "..self.weaponfile) in the start function just before if self.weaponfile~="" then located in the start function around line 200, running in the editor gives the value set in the Script Weapon entry, with extra path folders. Running it from the editor gives. Checking self.weaponfile Prefabs/Weapons/autopistolslot6.pfb which is Prefabs/Weapons/ added to the text put in the Weapon entry on the FPSPlayer.Lua Script tab for the Player object in the Scene. Running it from the Published desktop folder gives Checking self.weaponfile So I then added self.weaponfile="Prefabs/Weapons/autopistolslot6.pfb" one line before the added System:Print line. Now the autopistol same output is displayed when running from the Published desktop folder, and the weapon is displayed and works. However the weapons from the FPS weapons pack, will still not pick up. Earlier I also tried modifying the empty quotes in this line to Script.weaponfile="Prefabs/Weapons/autopistolslot6.pfb" --path "Weapon" "Prefab (*.pfb):pfb|Prefabs" This still showed as an empty string in the debug output, which to me implies the Weapon entry in the Script tab is not being exported when Publishing. Will check/debug some more tomorrow. Ok thanks Josh just seen your new post 12:45 AM.
  24. This is not looking good for me now, gone back to release 3.3, updated atestmap in project manager 19 new files. Deleted an re-added the crawlers, copied the sound character folder from MyGame and it work in editor but still fails to display the weapon when publish to desktop. Made an even simpler map, a box, with Fpsplayer on it, added autopistol.pfb. worked in editor,no weapon in publish to desktop. Tried changing the FPSweapon slot to 5. saved a new weapon.pfb same result.
×
×
  • Create New...