-
Posts
815 -
Joined
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Alienhead
-
It's quite simple actually.. You render out your tree in max or blender or whatever you use. Front side. You then create a 'T' plane stand, 4 polys. Map the render to it, size it to match the tree. Now there's several ways to control he plane, I happened to made a Tree manager that handles it for me, I rotate the t plane to look at the main directional light, then reset it's x.z to 0. Setting the material to alpha then using Paint.net ( which i use ) or whatever image editor, lower the alpha layer to something around 2.4, just enough where the shader still picks it up for shadowing, but not quite enough to be visible on the map, again unless your really just looking for it. For more complex trees you will want to add 4 more ploys to the top of the t plane with a straight down rendering mapped to it. But for most trees you can skip this step. Now instead of rendering 1000's and 1000's of individual alpha masked planes per tree, you are only calculating 2 to 3 plans per tree. After replacing the LE veg layers with this method, my fps rose by 100. And if your not really looking for it, you can't even tell there fake. This tree is over 12k polys, most of them being alpha planes. Leadwerks really excels at high poly count, as long as you keep your surfaces down. It's not a perfect method, but it's really allowed me to build some SUPER THICK forests with full shadow.
-
Havenphillip and myself have been trying some new techniques to render full time shadowing of alphamasked materials, the ole LE veg system is fine for a few trees here and there, but when you get some 10k trees with tons of alpha planes on it and you want distant viewing without billboard clipping - the veg system slows to a crawl. Enter a new technique silhouette shadowing. It's not full proof yet, but so far I have the process working with LUA . It needs cleaning and some optimizing but this scene was rendering at 12fps with the veg system, now it looks 100% better and rendering in the 100's. More later!
-
i do see a small increase in script memory.. sorry wasn't looking at that.
-
Works as it should on my system, no memory increase when i Pause.
-
I haven't tried this yet, but I'm wondering - I have created an 8k terrain heightmap. After importing it into LE and saving the map file back out; is it safe to delete the HeightMap.bmp? Reason I'm asking is the 8k file exceeds 300mb and I would prefer not packaging that with a release.
-
Aggressive settings : collectgarbage("setpause",100); collectgarbage("setstepmul", 100); collectgarbage(); Ooo sorry, garbage collection is LUA, not C++
-
Try calling collectgarbage(), right after you resume the time. See if it returns to the value it was at when you called a time:pause. HideMenuStart(); Time::Resume(); collectgarbage(); It sorta looks like to me you continuously calling ShowMenuStart(); Time::Pause(); Is ShowMenuStart() loading or creating anything each time it's called?
-
I generally put a manual GC in my loop, on a 30 second timer I call "collectgarbage()" .. but looking at your problem this may not help you as you have the symptoms of a genuine memory leak caused by some runaway code. Are you by chance using any Point Lights set to Static only ?
-
-
I'm out of town for a few days and I don't install Steam on my work laptop so won't be able to do anything until I get back, but I'll be glad to help ya on my return.
-
Okay I went ahead and did that part of my code. Is this kinda what your looking to do ? -- do a pick local pickinfo = PickInfo() local pickradius = .1 local p = window:GetMousePosition() if (cam:Pick(p.x,p.y,pickinfo,pickradius,true)) then enginepiv:SetPosition(pickinfo.position) self.player:Point(enginepiv) self.player:SetRotation(0, self.player:GetRotation().y-180, 0) end if your using a physics controller on your player you'll need to set the self.angle to Y rotation ( SetInput() ) and not use the Point() method as shown above. I have no physics on the ant so I used the Point() method but in theory it's the same practice.
-
I'm actually working on a 5-day game jam right now which does close to what your wanting to do.. if you haven't figured it out in a day or two then I should have some code finished that you could try out.
-
You'll need an unlocked mouse pointer.. preform a simple Pick to get the location the mouse is at and rotate the player to that position. leadwerks is a full blown game engine, it can do most likely anything you wish for it to do but you'll need to know the commands and their outcome in order to select the appropriate method. https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Camera_Pick pickinfo.position will contain the location you want, you could then place a pivot or whatever there then Point() the player towards it ( on Y axis only ) .
-
I'm not 100% sure what your trying to do there.. Traditionally there is no looked-mouse support for town down game. Are you trying to install point and click-walk ability? That would be pretty easy to without a controller just using LE's homebrew pathfinding class.. which by the way works pretty damn awesomally I might add.
-
Twisted Science introduces Tv Channels gameplay modes. Throughout the gameplay of Twisted Science you'll be directed to different Tv Channels, these channels will usually have their own events transpiring. Big time thanks to havenphillip once more for his shader help.
-
-
What performance? as far as I can tell it's negligible.
-
That's the LE vegetation shader with some custom modifications made to it.
-
And a variation of the cutscene theme set. This setting uses a glaussin blur, chromatic smudge on the outer frame and a light film grain over the top of everything. Thanks to havenphillip for his work on the gluassin blur and smudge filter.
-
You are soooo right about that. Notice fake ambient on grass
-
This is some cool looking grass.. I always love cool grass and environment stuff in games.
-
I'm very close to completing my cutscene/story teller interface. I have it setup to script the scenes on queue. Player can choose options for an interactive response. So far the system goes 3 levels deep with interaction, which I think is more than enough for my needs. Meaning, a conversation with an NPC can go three responses deep before the AI loses track of what's being talked about This is all done in real-time.
-
Twisted Science ( 100 ways to kill your enemy ) #39 Fallout Exposure This alpha update started out as an addition to the weapons arsenal but took on a life of it's own. I'll briefly describe the new systems implemented. Powers ups Item pickups Buffs and de-buffs Supply crates New player action bar New player equipment: 'Breathing apparatus' New mode kill mode: 'Fallout Storm' ( explained below ) New alt-weapon: Grenade Additional demolition conditions New way to kill your enemy ( fallout exposure ) and more ! Fallout Storms Let me start with Fallout Storms, every map is divided into 2x2 square feet tiles. Every square inch of the map is monitored for damage the environment takes through gameplay. Be it bombs, blowing up cars, destroying buildings or simply tossing a grenade at an enemy. Everything in the game that does damage either by you or by the invaders is accounted for. Once an area suffers 'x' amount of damage a fallout storm in that area occurs ( think of it as nuclear winter storms ). These storms are not permanent but while they are in effect they can be devasting. When the player is in a Fallout Storm zone he will take on a Radioactive debuff, this buff will cause damage to the player over time. The debuff is not permanent. Likewise, any invader crossing into a Fallout Storm zone will take on the same debuff. The player has the advantage though! Purchasing a breathing apparatus from the city trader will allow you to move about freely inside a Fallout Storm without taking on the debuff. Your enemies don't have this privilege. Action bar Also in this update we have our Action Bar in place, when looting items from crates, or invaders the collected item will appear in your action bar. You can use the mouse scroll wheel or Alt key to highlight an action bar item and make it active for use. If you run out of slots to collect more items the collected item will be converted into cash. NOTE: You may also spend upgrade points to expand the amount of slots your action bar can hold. Buffs and De-buffs Throughout gameplay many different player buffs will popup. These buffs are always positive towards the player. An icon representing the buff type will appear to the far right of the screen, as well as a count down timer showing how much time the buff has left. Example of a buff would be 'heal over time', this particular buff will heal the player's health bar 1% every 1 second. You'll find many many types of buffs as you play through the campaign, some looted, some purchased and some appear by completing a certain task on the mission. Debuffs act the same as buffs except for one major difference, de-buffs are negative towards the player. Debuffs could include such things as 'slow down movement', 'damage of time', 'lesser reaction time' etc.. Debuffs are also displayed by an icon to the far left. Powerups and Pickups Pickups are items you'll find throughout gameplay. Either in crates, boxes, or off invaders you kill. Pickups will appear in your Action bar when collected. Pickups do not carry over to the next map so use them while you have them! Powerups act a lot like Buffs, but they are not registered to the buff bar instead they run silently as you play. Conclusion This article really just touches the major systems that have gone in this update, there's tons of minor systems and other things that went in to make these systems work as well. You'll have to discover them on your own! Many many thanks to havenphillip, the mastermind behind a lot of the effects you'll see in this video.
-
Sketch shaders havenphillip and myself have been working on for the passed week for the game Twisted Science. I really like how it's turning out and it's very inexpensive also.. So far everything is done in post rendering. havenphillip has placed himself amongst the gods with this kinda of work.
-
Over the last year and a half I've relied upon this community for support and advice as I broke myself into Leadwerks engine. During that time I've compiled a great many projects, some of which I didn't finished or were mainly used for learning blocks. Anyways, with the recent flood of requests for tutorials and example code and me having tons of projects that could be used for such matters - I thought it time to release a few. If you use Leadwerks 4.6 and Lua then this article if just for you. I've released one of what will become many projects on my website, the first is a project I worked on last year and ended up being the main building blocks for my current project I'm working on right now, Twisted Science. I've made ArmymenTD freely available for downloading off my website ( https://www.alienhead.dev ). The only requirement is you'll have to create an account and then request Leadwerks 4.6 access via the contact admin link. I had to do it this way because I didn't want the people from itch.io grabbing my code and using it against me during GameJams. The project contains over 20k lines of code and is fully runnable and editable. I'll be putting up more and more of my earlier projects as the year goes on. Thanks for the community support and I hope this helps you in some way or another.
- 1 reply
-
- 3