
Gonan
Members-
Posts
186 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Gonan
-
I noticed, there is a download count on downloads part of the website, but the games have a views count. Can a downloads counter be added to the Games site? There is a download count on the Steam Workshop that I liked, but we can no longer publish games there, from beta 3.3. Anyone else think this is a good idea, sorry there is no dislike if you don't. But that's another option that could be useful.
-
I added this function to Noise.Lua function Script:CleanUp() if self.source ~= nil then self.source:Stop() end end and before reloading maps in app.lua i make sure my sound (music and announcements), which are not part of the map, but have been added to a pivot created in App.Lua, are cleared up. --Handle map change if changemapname~=nil then --Clear all entities if self.my1a ~= nil then if self.my1a.script ~= nil then self.my1a.script:CleanUp() end self.my1a = nil end if self.crawlerbetplaced ~= nil then if self.crawlerbetplaced.script ~= nil then self.crawlerbetplaced.script:CleanUp() end self.crawlerbetplaced = nil end if self.zombiebetplaced ~= nil then if self.zombiebetplaced.script ~= nil then self.zombiebetplaced.script:CleanUp() end self.zombiebetplaced = nil end self.world:Clear() I then reload the next map and re-create the pivots and attach the sounds like this. if self.my1a == nil then self.my1a = Pivot:Create() end self.my1a:SetScript("Scripts/Objects/Sound/Noise.lua") self.my1a.script:SetSoundFile("Sound/Music/my1a.wav") self.my1a.script:SetUp() -- complete initialisation and play. I had to make some more functions in noise.lua function Script:Start() end function Script:Initialise() self.source = Source:Create() self.source:SetVolume(self.volume/100) self.source:SetPitch(self.pitch) self.source:SetLoopMode(self.loop) self.source:SetRange(self.range) self.source:SetPosition(self.entity:GetPosition(true)) end function Script:SetUp() local sound = Sound:Load(self.setsoundfile) if sound~=nil then self.source:SetSound(sound) if self.playing==true and self.enabled==true then if App:GetMusic() then self.source:Play() else self.playing=false end end sound:Release() sound=nil end end function Script:Play()--in if self.enabled and self.playing == false then self.source:Play() self.playing = true end self.component:CallOutputs("Play") end function Script:Enable()--in self.enabled=true end function Script:Disable()--in self.enabled=false end function Script:UpdatePhysics() if self.loop then if App:GetMusic() then self:Play() else self:Pause() end else self:Play() end end function Script:Pause()--in self.source:Pause() self.playing = false end function Script:SetSoundFile(soundpath) self.setsoundfile = soundpath self:Initialise() end function Script:OneHit() self.playing=false self.loop=false end OneHit stops the sound looping. The code in Start() has been split in 2 and the first part put in an Initialise function. The second half put in SetUp() This gives me the control to make the sound occur when other functions of app.lua are being processed. I also avoid using the flowgraph editor, relying on code and calls to App: functions. I can now add more maps without having to add the music and announcer sounds or pivots to each map.
-
Are you running windows or linux? The requirements for Leadwerks for windows is OpenGL 4.0 compatible card, and yours is 4.2 so if your running windows the card should be fine. For linux and nvidia cards need to use the nvida driver. There is a warning in the Leadwerks system requirements about using intel drivers as they dont support OpenGL 4.0 on linux. If you can say what your OS and driver version is, you are more likely to get a relevant answer, there are some posts in the forums about supported drivers too. http://www.leadwerks.com/werkspace/page/drivers
-
Just tried it and it worked great, added comment --skybox_texture.mat to app.lua and it then included the Skybox setting, that I had put in Scene Root.
-
As all scripts are scanned and exported, and programmatically generated content is not exported, can we create a myexports.lua. Even if myexports.lua isn't attached to any maps or entities I presume it will still get scanned and exported. So my question is what is the minimum code that I need to put into myexports.lua to make the export scanner include content that has been programmatically referenced elsewhere in the program. Do I have to code every file used, or can I code a path to include all files, and will that include subfolders and their files too? eg. if subfolders were not automatically added. Would the following work or would every programmatically referenced file need to be listed. -- helper for publishing local soundexp="Sound/Player" -- entire contents of Player folder added to export local soundexpFootsteps="Sound/Footsteps" local soundexpFottstepsConcrete="Sound/Footsteps/Concrete" local zombiesounds="AddOns/Zombie Character Pack/*.wav" -- just the .wav files added to the export -- or would this be required to specify each individual file local zombiesounds1="Addons/Zombie Character Pack/alert.wav" local zombesounds2="Addons/Zombie Character Pack/idle.wav"
-
Something happened with after yesterdays beta, the text displays on the empty map, have sharpened up and are no longer blocky, and the grey colour has gone for the deleted text, and is now black, so I guess its been fixed.
-
So my first display screen is an empty map with a camera. On it I'm setting up the HUD, and giving some basic instructions using white text on black background. I prompt for the user to enter their initials, and press return to start. I display the initials as they hit each key A-Z. The problem I'm having though, is if the user keys the wrong initials, and presses delete or backspace, I need to blank out the initials that have been displayed with DrawText. The problem is the output on the display is cumulative. So displaying blanks over the initials changes nothing. So I thought, I know , Ill be really clever and use SetColor(0,0,0,1) to redraw the old initials in black before i clear them down. (I was implementing the backspace and delete key to completely reset all the initials typed in, not just the last key) Unfortunately the SetColor(0,0,0,1) just writes grey text on black, its better than nothing, but I was wondering how anyone else would black out the initials typed in error.
-
Materiels folder, Effects, Invisible.mat Just drag it onto your trigger box, that will make it transparent.
-
What's the biggest development challenge you face?
Gonan replied to Josh's topic in General Discussion
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. -
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.
-
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.
-
What's the biggest development challenge you face?
Gonan replied to Josh's topic in General Discussion
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? -
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.
-
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.
-
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?
-
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.
-
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.
-
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?
-
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
-
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.
-
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.
-
Publish loosing weapon fixed confirmed in latest beta 3.3
Gonan replied to Gonan's topic in General Discussion
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. -
Publish loosing weapon fixed confirmed in latest beta 3.3
Gonan replied to Gonan's topic in General Discussion
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. -
Publish loosing weapon fixed confirmed in latest beta 3.3
Gonan replied to Gonan's topic in General Discussion
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.