Return to “Dev Logs”


Friday, May 5, 2017

Friday, May 5, 2017

Been a longgg week. The leadup to the LTDemo showing at LSU last Friday involved the typical intense sprint, followed by the typical intense binge-sleep. Last Friday feels like only yesterday thanks to all that sleep (oh how the great Bank of Sleep always collects...with interest..)

Although it was, in fact, a great 'week' for progress, it was a total and complete failure with respect to my goals from last week. For that I'm thankful!


LTDemo Using 'Real' Systems: Nope. 0%. This was my goal from last week, and I achieved precisely 0% of it. With the showing approaching, I asked myself...would I rather show the same thing with architectural changes? Or would I rather show something better? After all this 'boring' ECS work this month, my self-control simply wasn't there. I worked on things that I wanted to work on. And I'm happy I felt good!

Improvements in Ship Generator + 'Fighter' Specialized Algorithm: Things were getting confusing in the demo with every ship looking (roughly) similar, regardless of scale. To that end, I sketched out a basic 'fighter' generating algorithm, which is fairly rigid at the moment, but does produce things that look more like fighters than the other, 'generic' ship algorithm.

The fighter generator, although simple, is an important step in the generating algorithms: it's the first to use sub-generators for coherence. In particular, the fighter generator leverages a 'wing' generator for obvious reasons. As I move toward more coherent ship generation, I expect more and more of my generating will be factored out into 'component' sub-generators. Cargo bay generator. Engine generator. Cockpit generator. Solar panel array generator (station). This has always been the plan, it's just the first time I'm actually working on it (and the first time I've worked on ship algorithms in...a long time)!

Beam Weapons: I wanted capital ships to be fearsome. So I banged out some beam weapon code and a new shader (assuming, correctly, that I could do better than the old one). It's been quite some time since beam weapons were working in LT (did you...notice that...? Mining lasers, sure...but when's the last time you saw a beam weapon in the update videos? :heh: ) It turned out nicely. The initial balancing was...quite poor. It was not a fun time to be a fighter pilot, despite your fancy new fighter ship design :ghost: (Part of that was that I forgot to put a range cap on the beams...yikes... :ghost: )

Factions & NPC AI: Factions were loosely-implemented in the LTDemo already, but I wanted a less-loose implementation so that I could expand the gameplay. Factions in the demo now have unique ship designs, their own credit account for spawning new ships, a tech level and a spawn zone. NPC AI now (more) intelligently selects enemy targets based on distance, firepower, etc, and will of course only attack enemy faction assets. Combat AI was split up into distinct maneuvering, target selection, and firing sections, and generally improved.

A note on how this relates to the 'real' LT: you may notice that some of these things, in particular, some of the faction elements, are not in line with how things are supposed to work in Limit Theory. In, shall we say, 'real LT', factions don't have spawn zones. Factions can't just spawn assets by spending credits. There's no such thing as a 'tech level,' only explicit technologies. Although factions do have unique designs, they are supposed to be influenced by factional style traits, which don't yet exist. And, perhaps most importantly, factions in LT aren't first-class things in the way that they are in the demo. They're abstractions created by NPC or human players to manage projects, assets, etc. Behind every faction in LT is someone leading it; the faction is not an autonomous entity. All of these things I have simplified solely for the sake of implementation into LTDemo, but that does not mean that the mechanics for 'real' LT have changed :)

These additions to factions, by the way, have put me very, very close to having some awesome new gameplay available in the demo, involving growing your own faction by defending successfully against enemy attacks, purchasing new AI ships from your factional credit pool, upgrading weapon technology, etc.

LTDemo -> Real LT, or <void> -> Real LT?: The continued development of the demo begs the question: do I try to build up functionality in the demo and, over time, smoothly transition that functionality to match the gameplay mechanics of Limit Theory? Or am I better off regardling and building Limit Theory separately (by separate I mean...separate Lua scripts; of course they will always share the same engine and utilities), so as to focus on building things as they are intended to be from the beginning? For now I have no great answer, as there are still a great deal of variables in flux...which brings me to my next point...

'Startling' LuaJIT Investigations: For technical reasons, I haven't been able to run LuaJIT in 'verbose' debug output mode until this week. Basically to do so I needed my engine to be built as a shared library (.so / .dll) rather than an executable, which required some build infrastructure tweaks -- more on that in the next segment.

Upon finally having this option available to me, I was able to acquire detailed information about the JIT part of LuaJIT. I won't explain it all, because it's highly-technical. But the short story is: LJ is currently helping me very little compared to what it could be doing. I'm basically killing much of the 'JIT' ability of LJ due to some of the things I do in Lua, meaning that most of my Lua code is being run through a standard interpreter. That's bad. And slow. It also explains my observation a few weeks ago that turning off the JIT engine didn't impact performance very much.

This is actually a welcome development in my ongoing quest to harness LuaJIT. Clearly, it is not nearly as 'flexible' as I had thought. There are certain very basic things that cause LJ to abort potential optimizations. Now that I'm aware, I can do a much better job of avoiding them. I've already significantly pumped up performance of the demo by working to eliminate JIT aborts. But much work remains if I'm to get full utilization of LJ. This is good news. It also means that I will need to re-evaluate the C / Lua split. Drawing that line, as I explained before, is crucial. But if I've been operating under false assumptions about LJ performance (and I have), this might mean that LJ can handle more of the work than I anticipated.

In the extreme case, it could mean I don't need any C ECS or any gameplay-related code living in C (highly unlikely). In the worst case it means everything stays the same :P Either way, the discovery necessitates that I move 'maximize LJ utilization' in front of 'build and integrate C systems for efficient gameplay code,' as I won't be making well-informed choices concerning which systems to build until I've mastered LJ -- or at least significantly reduced the interpreter fallbacks, which are currently happening way too frequently.

New Build System: Minor news. Born out of frustration with how difficult it is to maintain my builds accross all projects & platforms, I spent a few hours writing a Lua script that works as a build system that's custom-tailored to my needs. No more Makefiles (yes, I wrote Makefiles previously, because :ugeek: ), no more .bat files calling the MSVC command-line tools (yes, again, :ugeek: ). One Lua script that does it all directly. And yes, I know about CMake (LT used to use it), SCons, premake, etc. But it didn't take long at all to whip out something that is optimal for my needs :geek:

Other than convenience, the big news here is that I can easily create new sub-libraries for code that doesn't belong in the LT Core, but doesn't belong in LJ either. Gameplay systems match that description perfectly!

Upgraded Website: This one was actually all Talvieno, to whom I gave the task of 'modernizing' the LT homepage a bit by replacing the pictures with more recent ones. He did that and much more. As usual, Nathan has gone above and beyond :)

Check out the new look for our homepage! (Refresh if you don't see the changes. We're still working on caching issues :ghost: )
((Addendum by Talvieno: You may need to ctrl+f5 or shift+f5 (depending on the browser) if you don't see the changes/the pages look odd.))


Obviously it was quite a scattered week. Big, but scattered. I'd actually like to do it again. By that, I mean I'd like another week of this. I want to improve LTDemo a bit more; write some of that gameplay code that I've been wanting to write in spite of not having it running on the 'real' C systems. I want to continue investigating LJ, because those investigations may reveal that I don't actually need to run as many things on the C systems as I thought. And maybe some new generating algorithms! That was fun work.

In short, my brain needs a break from all that big, architectural work that happened over the past few weeks. It was draining. I had some fun this week with LT. I'd like to have some more fun in the coming week :) Consider it a mini-vacation. Except that it's equally (if not more, due to unexpected discoveries...) productive as my non-vacation work :monkey:


PS ~ Oh yeah, and I brought back the color grading post-fx. Forgot to mention that. Everything's a bit prettier now (plus systems have their unique 'mood' since the grading table is generated procedurally for each system).

Hello again! Talvieno here, welcoming you to this week's edition of "What the heck did Josh just say".

First off, I'm going to talk about the fact that Josh is mentioning working on LTDemo. Wut? LTDemo? Not LT 1.0? Josh is off the beaten path again, isn't he? ...actually, not at all. See, in programming, putting work into a demo program means that you're also essentially putting that work into everything else that needs it: transferring working code between programs is as easy as copy+paste, and working on just what you're working on at the time on lets you prune out complications and distractions. In other words: Josh may be spending time on the "LT Demo", but the work he puts into it ultimately goes into (and gets us closer to) LT 1.0.

In the same way, Josh is working on the fighter generator first so that he can use this code elsewhere; it's a small "stepping stone" toward making beautiful capital ships. I'd like to point out, though, that Josh hasn't put much work into it so far by his own admission; he's not spending silly amounts of time on graphical elements. In fact, he's been working on gameplay elements as well. LT now has working factions, and the AI has greatly improved.

Going forward, he may now merge everything into the new and improved "LT 1.0"... or he may continue doing what he has been. He's at the point where he could go either way. More on that in future updates. :)

Regarding LuaJIT: Essentially, what all of this mumbo jumbo means is that Josh isn't using LuaJIT to its true potential, and he plans on rectifying that to squeeze as much performance out of it as possible - which means a more interactive, immersive, living world for us.

tl;dr: Josh has been working on performance improvements, and re-implementing gameplay. We're getting back to where we were before - but at an acceptable frame rate this time.
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Friday, May 5, 2017

Although there haven't been that many major visible changes, I figured I'd make a gallery for this week's log anyway. Main new things to notice are the per-system color grading, fighter ships, and beam weapons.

I know the fighters don't look great, but they're clearly fighters and they do have variation. That was a 30-minute algorithm (hey remember the old 7-minute station algorithm? Heh, guess I'm losing my touch.. :ghost: ). Lots more fun to be had there :)

Limit Theory Devlog Gallery ~ May 5, 2017

Some favorites:
Image Image Image
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Re: Friday, May 5, 2017

Loving the new website! Go Talv!

I'm glad you were able to work on some of the more tangible things in the demo this week, Josh. Getting out of the abstract ECS and architecture stuff for a while can make it all the more worthwhile to dive back in with a new perspective. :thumbup:
Libertas per Technica

Re: Friday, May 5, 2017

I'm very impressed with the new website and how easy it is to navigate.

I am a bit concerned though. It would seem that the LT demo may be taking away from actual development time of Real LT. I see that the demo is helping to address some of the technical issues that the new structure has and I approve of using the demo to sort these issues out prior to moving forward with LT.

What really concerns me though, is that at some point development on the demo will need to be cut so that development on Real LT can continue. Remember those past 4 years where you had made so much progress on gameplay mechanics and AI interactions? Would it be possible to start porting those features over to the LuaJit engine now as opposed to later? I'm not trying to sound bossy or entitled, I just want a reality check on where we are headed and how working on the demo gets us closer to LT beta and later 1.0.

Re: Friday, May 5, 2017

As a programmer, I understand Josh's side forrays into the LT demo, and it's actually beneficial for LT's progress in more than one way.

First off, when you've been dealing with complex low-level stuff, it just feels great to code some small and easy but very visual things. I often implement a small but visual feature after breaking my head on a problem for some days, because the instant gratification is good for my mental stamina, improving productivity. And on top off that, the feature is nice in itself.
(see: beam lasers)

Second, he's not actually doing 'useless things' for LT. The stuff he added there is gonna be in the game after all. Just because it's a different version doesn't mean everything needs to be rewritten for the final game.
Warning: do not ask about physics unless you really want to know about physics.
The LT IRC / Alternate link || The REKT Wiki || PUDDING

Re: Friday, May 5, 2017

JoshParnell wrote: LTDemo -> Real LT, or <void> -> Real LT?: The continued development of the demo begs the question: do I try to build up functionality in the demo and, over time, smoothly transition that functionality to match the gameplay mechanics of Limit Theory? Or am I better off regarding and building Limit Theory separately (by separate I mean...separate Lua scripts; of course they will always share the same engine and utilities), so as to focus on building things as they are intended to be from the beginning? For now I have no great answer, as there are still a great deal of variables in flux...which brings me to my next point...
I'm curious about these two points specifically. Because as I said, and as Josh admitted, there are things in the demo (such as ship respawns and such) that aren't going to be in LT 1.0. And I'd still like to see old functionality (custom UI/HUD, game economy, mining) added to the demo, or have the demo scrapped and just work on LT the game.

The demo helps with the tech LT will eventually use and keeps Josh motivated. Both are good things. But when I hear that Josh is added gameplay features to the demo which won't be in LT 1.0 I begin to feel uneasy.

Re: Friday, May 5, 2017

I wouldn't be concerned about that in terms of time wastage. Typically, if I implement 'gameplay' that is in the demo but won't be in LT, it means that the gameplay is a simplified, quick-and-dirty version of what would be in LT.

For example spawning. That's not even really a feature so much as a lack of a feature :P There was no dev time wasted on that. Basically all of the differences that I named were trivial in terms of dev time. And yes, there's still lots of old work to be brought over. Nothing I'm doing at the moment is intended to overlap or replace any of the old mechanics that were hammered into place.

I think I'm pretty much decided on doing the iterative approach of moving the demo step-by-step toward 'real LT' functionality. I got a taste of how dangerous it is to not have a fun, playable game-in-progress toward the end of LTC++. I need to make sure that doesn't happen again :ghost:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Online Now

Users browsing this forum: No registered users and 1 guest