smoth's junk. - Page 27

smoth's junk.

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: smoth's junk.

Post by Forboding Angel »

Image

Image
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: smoth's junk.

Post by Beherith »

Smart thinking, smoth. Did it result in a noticable decrease in luagc load?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post by smoth »

Image

yeah, I know, the shadows need to be flipped with the barrels. Bugger off I am allowed to be lazy.
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: smoth's junk.

Post by danil_kalina »

nice!
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post 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.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: smoth's junk.

Post by bobthedinosaur »

having them share a uv would allow for some modular unit building.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: smoth's junk.

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post by smoth »

Image

in between packing. Progress etc.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post by smoth »

Image
Off to bed.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post by smoth »

Image

and done, not really all that bad, spent maybe a few hours on it.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post by smoth »

Image
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post by smoth »

file for anarchid
Attachments
splitbarrel.7z
(19.96 KiB) Downloaded 4 times
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: smoth's junk.

Post 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).
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: smoth's junk.

Post by smoth »

It already is :)
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: smoth's junk.

Post by dansan »

Ah - it looks nicely balanced (weight wise) now. I couldn't grasp that before :)
Post Reply

Return to “Art & Modelling”