Page 27 of 37

Re: smoth's junk.

Posted: 16 Dec 2013, 14:11
by Forboding Angel
Image

Image

Re: smoth's junk.

Posted: 26 Dec 2013, 06:24
by smoth
Since the lua garbage collector has been a hot topic lately. I wanted to look at a few areas that I knew were massively abusing the concatenation command in lua.

I decided to do a bit of code cleanup.

Image
The code that sets all the images for the spring commands:
BAD: Each time a unit was created, it would build all image strings.
BETTER: Each image setting is built at initialize and just pulled on unit created from a prebuilt table



Image
The code that sets all the custom tool tips:
BAD: Each time a unit was created, it would build that unit's tooltip and then build the tool tip for each build entry(assuming there was a set of units to build)
BETTER: Tooltips are built at initialize. Now units assign tooltips from a prebuilt table.



Image
The research tree code:
BAD: on each time the mouse cursor is over an item to display the tooltip, it would generate the tool tips.
BETTER: Tooltips are built at initialize. Now it just grabs the tooltip from a reference table.

Re: smoth's junk.

Posted: 26 Dec 2013, 11:46
by Beherith
Smart thinking, smoth. Did it result in a noticable decrease in luagc load?

Re: smoth's junk.

Posted: 26 Dec 2013, 15:15
by smoth
Not yet but I always felt gundam ran slower than projects like BA. I always wondered if it was my sloppy code or all the 512x512 textures and high poly models with high piece count. Then I got to thinking about strings and immutability (an area I am not 100 % on ) anyway each point in a concatenation supposedly creates a string in memory. When these are cleaned out I dunno. So I decided to go through my code to try and clean up areas of frequent use.

I don't think this is going to result in any performance increase. It may but I doubt it. The main thought is a cleaner code makes a happier smoth. My work right now is going to be by and large code clean up. Because after that, the in game manual/unit guide and making my unit script and ability handler more powerful befor I start looking at having my Halloween project use the rts core

Re: smoth's junk.

Posted: 01 Jan 2014, 00:06
by smoth
So I took my units and put them in the same uv space.

Image
Image

I am not 100% sure that it will not cause performance issues but honestly, I don't really think it will. So all that extra space will eventually belong to other unit parts.

Anyway, yeah, this is neat and a recent advance

Re: smoth's junk.

Posted: 01 Jan 2014, 09:12
by smoth
Image

yeah, I know, the shadows need to be flipped with the barrels. Bugger off I am allowed to be lazy.

Re: smoth's junk.

Posted: 01 Jan 2014, 10:15
by danil_kalina
nice!

Re: smoth's junk.

Posted: 11 Jan 2014, 07:23
by smoth
Image

I managed to squeeze in a bit of time to work on the uv map. Green space is laid out and scaled the rest is not yet worked out.

Re: smoth's junk.

Posted: 12 Jan 2014, 20:50
by bobthedinosaur
having them share a uv would allow for some modular unit building.

Re: smoth's junk.

Posted: 13 Jan 2014, 00:28
by PicassoCT
You know i shared that dream- and then i got into modelling and scripting. And i realized -its a fucking nightmare to make real modular units.

You have slots^(pieces-1) combinations. And they all have to animate meaningfull. Even if it just wriggles, and although that might come as a suprise- nobody ever posts that one, awesome looking borderlines gun.
So computers can generate functional objects.

But they dont create extraordinary functional objects.

Smoths approach, as much as i hate not waving the redflag, provoking the bull, is good. Some basic, well animated walkers, and tanks. And modify with a certain collection of turrets to your hearts delight.

Re: smoth's junk.

Posted: 13 Jan 2014, 01:16
by smoth
I eventually intend on trying to look into presureline's piece attachment in concert with my materials work. It might really be one of those "OMG IT WAS SO SIMPLE ALL ALONG" bits. I am just not sure. Even so, if I added it, it would not really be for players to decide, it would be to expedite content creation. That is what the GBS is about, a sort of toolkit to create what I want. I mean when I put a new unit it, at this point I pretty much just build a model and write a def. That is HUGELY easy! Of course some stuff will require custom anims... but that is also why the script builds it's self.(in a suboptimal way right now.. lolol).

In my game I want a single player with missions and for that I need a really flexible system. The singleplayer is just going to be for story establishment. I hope I can go into at least a few alternate paths. I also wish I was better at drawing because doing all the talking head art is going to be hard.. then again I'll probably just use meme faces for the time being TROLOLOLOLOL etc.

I really only have spent maybe 6-8 months on this stuff, the rest of the past 2 years have been travel, sickness and prep for my move(Which should be happening in march, yay!). That is what has been going on the better part of the past day. I mean I am trying to get a bit of work on the little dino but I don't even have a chicken walk script yet. I could purloin zpocks one he gave fang I suppose but I want to write it myself so I can get better at animation.

Re: smoth's junk.

Posted: 13 Jan 2014, 03:10
by smoth
Image

in between packing. Progress etc.

Re: smoth's junk.

Posted: 13 Jan 2014, 07:13
by smoth
Image
Off to bed.

Re: smoth's junk.

Posted: 14 Jan 2014, 05:58
by smoth
Image

and done, not really all that bad, spent maybe a few hours on it.

Re: smoth's junk.

Posted: 14 Jan 2014, 07:08
by smoth
Image

Re: smoth's junk.

Posted: 14 Jan 2014, 19:56
by smoth
file for anarchid

Re: smoth's junk.

Posted: 15 Jan 2014, 05:55
by smoth
https://www.youtube.com/watch?v=ASUYc4zoLYQ


Just me dicking around with animation. Not even close to done. I was going to do it in upspring but meh it is more fun this way.

Re: smoth's junk.

Posted: 15 Jan 2014, 11:40
by Beherith
Really nice work on the Dino, smoth!

Also, if you are ever interested in making models share UV space, hit me up, its easier than you think. All it really takes is to photoshop the textures onto a single canvas, then do a linear tranformation of the UV space (I have shared scripts on this site that can do this easily for both .obj and .s3o, but it is trivially doable for .obj, it can even be done in excel).

Re: smoth's junk.

Posted: 15 Jan 2014, 15:01
by smoth
It already is :)

Re: smoth's junk.

Posted: 15 Jan 2014, 20:38
by dansan
Ah - it looks nicely balanced (weight wise) now. I couldn't grasp that before :)