Jump to content

Are you going to Lua in DU?


Saul Retav

Lua Scripting/Programming Poll  

80 members have voted

  1. 1. Do you plan on scripting in-game with Lua?

    • YES. I WILL BE THE CODE MASTER.
      35
    • Yes. I'll learn/use the basics for custom scripting.
      35
    • I don' t know. Maybe?
      7
    • No. I'd rather focus on other parts of the game.
      2
    • NO. THAT SOUNDS TOTALLY LAME.
      1
  2. 2. If you answered "YES" or "Yes" to the above, what's your level of programming experience (not-Lua specific)?

    • Master: like Yoda and the force... but programming.
      10
    • Advanced: professional or passionate hobbyist with lots of projects under your belt.
      20
    • Mid-range: junior developer or hobbyist.
      28
    • Beginner: only knows the basics.
      11
    • Total NOOB: "Wait, what's a variable?"
      5
    • *SKIP*
      6


Recommended Posts

3 hours ago, Groogy said:

No I am saying if you have access to the raw data of an SVG file and you can provide that to a render function that is all you need. [ . . . ] Most likely I would assume a bare minimum of being able to load a file yourself and tell something to render it at a specific location.

Care to explain, in detail, how that would allow you to render arbitrary things in 3D? Just specifying a location on your screen to draw something that's 2D doesn't allow you to draw arbitrary 3D shapes. You could possibly fake a limited subset of that but idk. You kinda need more support from the API than that. They did have a working Breakout clone in a video so I'm guessing they at least allow you to draw 2D primitives and animate their location. 

 

3 hours ago, Groogy said:

edit: actually thinking of it, we could reproduce 3D by implementing a software renderer by just using a single 1x1 square svg file provided we can ourselves define where it should be placed. As a sort of worst case scenario if we barely get anything. It would suck but at least something?

 

To me it seems like the overhead from that (on top of the fact that it's already running on Lua) would make drawing any kind of moving 3D shape in real time nigh impossible. I mean you're essentially emulating a rasterizer by printing dots on your screen where edges/faces of a mesh should be drawn. Even with just line segments and wireframe graphics it's a bit of a big ask, by my reckoning.

Link to comment
Share on other sites

36 minutes ago, LurkNautili said:

Care to explain, in detail, how that would allow you to render arbitrary things in 3D? Just specifying a location on your screen to draw something that's 2D doesn't allow you to draw arbitrary 3D shapes. You could possibly fake a limited subset of that but idk. You kinda need more support from the API than that. They did have a working Breakout clone in a video so I'm guessing they at least allow you to draw 2D primitives and animate their location. 

 

 

To me it seems like the overhead from that (on top of the fact that it's already running on Lua) would make drawing any kind of moving 3D shape in real time nigh impossible. I mean you're essentially emulating a rasterizer by printing dots on your screen where edges/faces of a mesh should be drawn. Even with just line segments and wireframe graphics it's a bit of a big ask, by my reckoning.

 

You can actively apply any transformation you need on anything. I.e you just translate what you would normally write in a shader to be in that code directly, it's not that big of a change. It's going to be slower sure but I doubt people were expecting to make the next Battlefield game inside of Dual Universe.

 

if you want 3D graphics, having a software renderer is good enough for most tasks I can imagine someone doing inside of a game. Lua or not, Keep in mind the default implementation of MESA on Linux is a software renderer and it works decently enough that bunch of people use it for everyday stuff. Pretty sure Lua is not really going to be a bottleneck as it being one of the top ranking languages in performance(depending on what implementation they use of course). In this case I believe it is more going to be that you are going to be competing for processing power with the actual DU game itself since the scripts will be running locally.

 

(It might not be a modern AAA game, but I could run Warcraft 3 on the software renderer Implementation through Wine)

Link to comment
Share on other sites

4 hours ago, Groogy said:

You can actively apply any transformation you need on anything. I.e you just translate what you would normally write in a shader to be in that code directly, it's not that big of a change.

In shaders you can move verticies around and color things. If all you can do is pull data from SVG and draw that as is, it's not really possible do what you assert. E.g. if you have a circle in an SVG file, how are you going to rotate that in 3D space and draw that on screen? At the very least you'd have to be able to mess with the aspect ratio of the curve, and that wouldn't be flexible enough for general purpose graphics.

 

4 hours ago, Groogy said:

if you want 3D graphics, having a software renderer is good enough for most tasks I can imagine someone doing inside of a game.

Drawing individual points as vector graphics dots is not the same as a software renderer, that's not how rasterization/rendering works, even if you run it on a CPU instead of a GPU. There's at least one extra layer of abstraction there.

 

4 hours ago, Groogy said:

Pretty sure Lua is not really going to be a bottleneck as it being one of the top ranking languages in performance(depending on what implementation they use of course).

Even this isn't entirely accurate. It's not the slowest, but just about everything that's interpreted and running on a VM is going to be slower than a language that compiles into native binaries. Java is about the fastest you can get, and it uses a whole bag of clever tricks. And even that's slower than C/C++/asm. It's not going to be as big a bottleneck as the hacky rendering workaround, but it's not negligible either.

Link to comment
Share on other sites

LurkNautili you seem to be arguing for just the sake of arguing. For one there are benchmarks showing Lua and JS implementations faster than Java because they for one isn't as heavy weight or use a VM but they just as the key to Java's speed relies on JIT compilation now days. Second what do you actually think rasterisation is? It is literally the translation of vectors/vertices into points on a screen. The whole application of transformations to convert world space to screen space and then to native unit space is the first part of that entire step. Do you mean that the scan of the vertices into fragments is not possible in Lua or something? It's not some magic voodoo that can not be achieved by us mortal humans or something.

 

There isn't much more point in talking about this, you seem to be really determined in that I am wrong and I don't have the energy to convince you otherwise. Either way if the API only supports rendering some data on a specific position, I'll probably implement a software renderer to render a logo on a screen in 3D as a good first project to learn how working with code in the game is going to work out.

Link to comment
Share on other sites

On 9/4/2017 at 2:16 PM, Shynras said:

Keep in mind that it's possible we'll need to train skills to unlock functions, so there may be another limitation that will force you to choose between lua and other careers.

 

 

Ew. That'd be disappointing.

Link to comment
Share on other sites

1 hour ago, Groogy said:

Just curious if that would be the case, how would you "grind" that skill to unlock more stuff?

you don't grind it, you just need time to re-learn it

 

NQ stated that basic skills to get started can be learned within minutes to maybe a day, but if you want to be a master in some area you'd need months to years

Link to comment
Share on other sites

On 9/5/2017 at 10:33 AM, Groogy said:

LurkNautili you seem to be arguing for just the sake of arguing. For one there are benchmarks showing Lua and JS implementations faster than Java because they for one isn't as heavy weight or use a VM but they just as the key to Java's speed relies on JIT compilation now days. Second what do you actually think rasterisation is? It is literally the translation of vectors/vertices into points on a screen. The whole application of transformations to convert world space to screen space and then to native unit space is the first part of that entire step. Do you mean that the scan of the vertices into fragments is not possible in Lua or something?

I don't argue just for the sake of it. I just don't want anyone not versed in the topics to be lead astray by misinformation, so I do my best to correct things. I have nothing against you personally, I just want to clear up a few things.

 

I'm not saying you cannot draw an image in the manner that you speak of, and you could even consider it an abstracted version of rasterization. What I'm trying to point out that if you don't design something that performance intensive with the right data structures, you're not going to have anything close to real time rendering. To make clear some implied assumptions that you appear to be missing, I'll make them explicit here.

 

Firstly, since we're dealing with a system that draws vector graphics, a dot would likely be represented by a small circle. The point of vector graphics is that it doesn't have an explicit size based on resolution, but rather it's a mathematical expression that describes the shape. You can think of it as a recipe for baking a cake, rather than a cake itself. In practice, you'll need a data structure that stores x, y, and radius at least. An "actual" rasterizer would build an image into memory. You can think of it as a contiguous block of memory containing an array of color information per pixel, e.g. VkImage with a memory backing via vkAllocateMemory & vkBindImageMemory -- of course this is simplifying a bit for the sake of brevity (it's assuming VK_IMAGE_TILING_LINEAR, for one thing, which should rarely be the case), but the point is that we're storing the image in an optimal form, rather than as a disparate collection of abstract dot/disk objects. I mean it's not impossible to store those in a fairly optimal way, but the point is that you need to access whatever data structure they're in once for every faux-pixel.

 

Secondly, since we're still talking about drawing vector graphics via an implementation of an SVG reader/drawer of some kind, the drawing algorithms need to be considered. Where an actual rasterizer differs from the type of hack you suggest is also in how they draw whatever they're trying to create. If you want to draw a 1024x1024 pixel image on screen via vector graphics dots, you'll have to call the dot draw function 2^20 times to draw all the dots, which is also slowed by the fact that you have to fetch them from where ever in memory, several bytes (r, g, b, x, y, r) each instead of just an R8G8B8 (24bit or 3 bytes) value or whatever. And again, in the case of an actual rasterizer it's one chunk of memory that you push via the swapchain onto the GPU in one I/O operation, and then tell it to draw it. 

 

The only thing you seem to be considering is the part where you figure out which dots/pixels need to be what color, which is the same algorithm for both systems and runs on the same GPU, though in our case in DU it'll be Lua rather than C/C++ (slower, even if only by a factor of between 2 to 10 in a pretty good implementation). This is only a part of what rasterization entails, however.

 

So yes, on an abstract level you can consider them equivalent, but you can't assess the performance of something based only on such a high level model -- the performance is determined by the implementation details. It's similar to how an ADT differs from an actual data structure.

 

My point being that if all Novaquark gives us is a function that draws an arbitrary spline path or basic shape primitive (ellipse, rectangle, etc.), it won't allow you to write anything close to real time graphics by "rasterization" despite the fact that the abstract model of the process is nigh equivalent.

 

 

On 9/5/2017 at 10:33 AM, Groogy said:

 It's not some magic voodoo that can not be achieved by us mortal humans or something.

Correct, it's conceptually fairly simple. But as someone who's written renderers in OpenGL and Vulkan, I have to disagree with your assessment about the feasibility, given our initial premise of drawing that through an API focused on drawing vector graphics.

 

 

On 9/5/2017 at 10:33 AM, Groogy said:

There isn't much more point in talking about this, you seem to be really determined in that I am wrong and I don't have the energy to convince you otherwise. Either way if the API only supports rendering some data on a specific position, I'll probably implement a software renderer to render a logo on a screen in 3D as a good first project to learn how working with code in the game is going to work out.

 

Again, I'm not coming at you personally or anything, and I don't argue just for the sake of it. I'm more than happy to own up to mistakes if/when I make them, but in this case I just haven't been convinced you've thought this through. Either that, or our underlying assumptions differ somehow, despite me trying to be as explicit as possible without being ridiculously verbose (I mean just look at the length of this post, for one -- explaining in detail takes way more words than people have time to read).

 

I hope this clears up some of the confusion/misunderstanding or whatever it is that's going on.

 

As for the 3D logo project... Again, totally possible for pre-rendered stills, but I'm curious to know how you plan to go about animating it. Given that the vectors that define the shape are defined in two spatial dimensions, as a perspective projection onto your screen, essentially, and the 3D-ness of it isn't available in the SVG file, it's non-trivial to manipulate that data to e.g. rotate the logo or something. There are a couple of ways to "hack" it, that I can think of, given the set of functions I'm anticipating to see from NQ, but none of them are very appealing.

 

I'm sorry if I come across as crass/rude/confrontational, I really don't mean to frustrate anyone (people skills aren't really in my forte). I just don't like leaving things unresolved, it's like an itch I'm compelled to scratch. 

Link to comment
Share on other sites

On 9/6/2017 at 11:48 AM, Lethys said:

you don't grind it, you just need time to re-learn it

 

NQ stated that basic skills to get started can be learned within minutes to maybe a day, but if you want to be a master in some area you'd need months to years

 

Yeah and grinding would be the act of increasing the characters's skill. I mean would they be locking away certain functions behind a skill level gate or something? Then the question becomes "how do you increase the programming skill"?

Or are we talking past each other here?

Link to comment
Share on other sites

We don't know yet if they lock certain skills with the system or if they go for a "you can do everything but get a higher bonus for higher skills" instead.

 

I just wanted to point out that ggrinding in the sense of "I use that skill now 500 times to get a lvl up" won't happen, as this was often confused and asked in the past 

Link to comment
Share on other sites

Have we actually had any words on that programming will be limited based on skill? That it will be a skill itself as well or are people just assuming since most else is going to be?

Link to comment
Share on other sites

On 9/8/2017 at 0:57 PM, Lethys said:

We don't know yet if they lock certain skills with the system or if they go for a "you can do everything but get a higher bonus for higher skills" instead.

 

I just wanted to point out that ggrinding in the sense of "I use that skill now 500 times to get a lvl up" won't happen, as this was often confused and asked in the past 

The idea is to have a skill training system similar to Eve's, right? Something passively going in the background, based on the passage of real time? 

Link to comment
Share on other sites

I bought my ruby founders pack from the budget I was planning to dump in to my own projects ... so I better get my head round the LUA stuff and justify it!
Just don't tell the missus!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...