Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Jul 2003
Offline Last Active Oct 14 2016 12:47 PM

#5284379 Isometric art projected on 3D shapes

Posted by on 30 March 2016 - 05:55 PM

Pretty much, yes. Also, you can cram more detail into the scene without drastically increasing the face count. And because the scene is handled as a 3D scene, you can take advantage of all the usual 3D tricks: frustum culling, occlusion culling, render batching, etc... To increase performance, and shader tricks such as normal mapping to increase render quality.

#5284374 Isometric art projected on 3D shapes

Posted by on 30 March 2016 - 05:40 PM

Here is another shot of a wall piece.


You can see that the wall model is UV mapped to 'snip' out the rendered texture. Now, here is a shot with another wall piece tiled in adjacent to that one:


The rendered wall pieces are constructed such that they present a repeating tile pattern, so that when wall pieces are placed on a grid adjacent to each other, the rendered patterns form a seamless image. By placing different wall pieces, entire dungeons can be built.

#5284369 Isometric art projected on 3D shapes

Posted by on 30 March 2016 - 05:27 PM

I reckon they would use geometry that matches the rendered geometry as closely as possible, not limiting themselves just to cubes. Here is an example from one of my own projects:


You can see that the geometry that is actually being rendered is much simpler than the geometry used to construct the rendered tiles of the wall and floor. It's a single plane, in the case of the floor.

I've learned that the most important thing is that you match the silhouette of the rendered geometry as close as you can. If you look at The spherical newell cap on the wall to the left in that screenshot, you can see a small crescent of white. That is caused by part of the wall background being projected by mistake onto the sphere, and receiving lighting from the sphere portion rather than from the more dimly-lit top of the wall. Adjustments to the silhouette of the impostor geometry can help to mitigate that sort of thing.

#5283948 Is death to intense for kid players (<13 years old)

Posted by on 28 March 2016 - 05:00 PM

Kids can cope. If their parents have been doing their jobs, then kids of 12 or 13 should already know about death.

#5283854 Why does it look so beautiful and how could I make it in-game?

Posted by on 28 March 2016 - 09:12 AM

If all voxels have the same geometry(cube) and AO doesn't depend on lighting, wouldn't it be possible to bake AO for a single voxel and reuse it for all? E.g. bake normal edge AO and 90 degree angle AO and just somehow calculate where to put it. Might be some more edge cases, but idea stays the same. This way we could get high quality AO without sacrificing performance.

The issue with this is that AO depends on a cube's surroundings. Now, I reckon you could pre-calculate the AO for all the possible surroundings patterns. Say, if your occlusion rays extend no more than 5 cubes away, you could pre-calculate the AO for a given cube using all possible 11x11x11 neighborhood patterns and attempt to build a look-up table. But the larger your AO neighborhood becomes, the more difficult this becomes.

#5283650 Help with game error log

Posted by on 26 March 2016 - 07:54 PM

Seems like a problem for Blizzard technical support.

#5282018 Why does it look so beautiful and how could I make it in-game?

Posted by on 19 March 2016 - 10:27 AM

It's also possible to bake AO to vertex colors, rather than requiring a dedicated full-scene texture. For example, see this journal post by eppo. It does require some care and consideration when constructing your meshes, taking care to add more vertex detail to areas where AO shading is likely to be prominent, in order to more accurately confine the shading to the proper regions.

In cases where your vertex color defines the color of the voxel, then you would bake the AO term to the alpha channel, then use the alpha channel in a mix or blend operation to blend with shadow color.

#5274461 Looking for an engine for a 2d action RPG.

Posted by on 05 February 2016 - 10:07 AM

What makes you say that?

Going through the list:
1. Unity is a 3d engine, not 2d. You can fake 2d in it, if you're doing a sidescroller, but that's still faking it *and* this isn't a sidescroller.
2. Using sprites for *everything* in Unity is just not going to happen. And I do mean *everything*. I gave two links on what we're trying to make it look like, more or less. We'd lose Unity about the point we made a sprite and tried to tell it that's the floor.

I don't think you really understand the difference between 3D and 2D. Hint: in this day and age, they're the same. You're going to use the exact same techniques (drawing quads mapped with textures) to draw a sprite as you would to draw, say, a 3D clump of grass. It's just textures and geometry, the only difference being spatial placement. 2D usually places all of the geometry on a single plane, and uses draw order to sort. If there is a 3D engine out there that CAN'T support this kind of thing, I'd be surprised.

3. Real-time combat, at least, it can do. In fact, I reckon it'd be a lot harder to do turn-based combat in Unity than real-time.
4. Now, I didn't spend much time in Unity last time I tried game development (I never got a team together, and moved to Unreal while I was waiting), but I couldn't find one person who could tell me how to give an object multiple hitboxes. And funny,I just got off Steam where I was trying an FPS made in Unity. Oddly, they didn't have headshots, a nearly universal FPS trope. Kinda makes me think multiple hitboxes is impossible in Unity, or at the very least is so hard to do that the devs of that game couldn't figure it out.
5. This might not be impossible, but the entire system would need to be completely built from the ground up in Unity. There isn't even a basic framework present for the existence of stats. In fact, there's no framework available for any RPG mechanics. Or the mechanics of any other genre, really. That isn't a problem if you're making a simplistic mobile "game" that barely has any mechanics, but for a REAL game, you'll want a more specialized engine.

You do realize that you're going to have to do a lot of the work yourself, right? Engines are not intended to be specific solutions for any one person's particular needs. So, yes, you'll probably have to build your particular system from the ground up if you use Unity. Same if you use Unreal, or CryEngine, or any other out of the box engine. They're built for the general case, not the specific. I strongly suspect you're not going to have much luck finding a pre-made solution that ticks every checkbox on your list, and you'll end up having to build your own solution.

#5273708 Rpg Inventory gui

Posted by on 01 February 2016 - 12:36 PM

Diablo 2, path of exile, etc..., the inventory placement isn't very 'smart'. It probably isn't going to, by default, pack the items most efficiently. Especially since the player controls the order in which they are placed, and the optimal would require rearranging previously placed items. You can make the assumption that players are going to have to perform some manual inventory shuffling; that's actually a (small) part of the genre. It presents them a small optimization problem they need to tackle as part of their decision making. Can I fit more stuff? Do I need to portal back to town now? With that in mind, it's quite simple to just start at the top left corner and work your way down the column. Test to see if the item can fit right there (ie, are there enough empty squares to the right and below it to fit the item?). A brute force test is sufficient. If no spot is found, start at the top of the next column and work downward. If you reach the last column, and find no space for it, you play the annoying "I have no room" voice effect and drop the thing back on the ground.


This simple method should work well enough.  It will result in, for example, a 2x3 piece of armor being placed preferably in the top 3 rows of the inventory, and if a 2x2 helmet is picked up, it will end up in the 2 rows beneath it (if empty). 1x1 objects will 'fill in' the empty spaces from left to right. Are there better ways? Maybe. Doesn't matter. IMO, you can meet player expectations by simply emulating the games that came before.

#5273296 3D Model Terrain Collision

Posted by on 29 January 2016 - 07:36 PM

Just as a sort of aside, is your player character going to be 'grounded'? That is, will it walk on the ground, or can it fly? I ask, because if grounded then there are alternatives to always performing a collision check against the world geometry. For example, constructing a navigation mesh from the world geometry, a la Recast. Such a library will analyze the world geometry and construct a mesh, such that the mesh represents all areas of the world that an agent of the specified height/radius could possibly be located without colliding with any of the bounding geometry. If a point is located on the mesh (and the Recast library provides functions to test this) then you know that the agent can be placed at that point without colliding. Given the other benefits of a nav mesh (path-finding) this is the technique I use the most for grounded characters.

#5272423 How to do seamless editing on multiple variants of a texture?

Posted by on 23 January 2016 - 08:08 PM

You might take a look at this blog post from the Path of Exile developers. It details a technique they used in PoE, that utilizes Wang tiles. With Wang tiles, the edges of texture variants are made to match up with specific other edges, so that the tiles can be combined in different patterns. With Wang tile sets, it is possible to tile the plane to infinity without repeating any given pattern.

#5271884 Pathfinding and Databases

Posted by on 19 January 2016 - 01:24 PM

Just to add a bit to the pile-on: a common problem for novices is learning to differentiate what they think is a huge amount of memory usage from what the computer thinks is a huge amount. It sounds like you might be making a text-based MUD. In terms relative to modern RAM capacity, such a thing is extremely light-weight. On modern multi-gigabyte systems, you could likely have hundreds of thousands, if not millions, of rooms resident in RAM. I'd posit that you could at least have as many rooms loaded as you could conceivably create and flesh-out within the next five years or more, barring large-scale procedural generation.

I can remember working on MUDS in the 90s that had hundreds of rooms, took many hours to explore, and could be held entirely within the paltry RAM capacities of the day. Imagine how much you can do now.

#5267693 Replacing ECS with component based architecture, or traditional OOP, or somet...

Posted by on 23 December 2015 - 03:07 PM

OP: I think where some of your confusion comes from is the boilerplate code that frameworks such as EntityX use under the hood in order to implement their behavior. Part of the complexity involves structuring an object based on some bit of data that describes the structure of that object. For example, it is easy enough to 'compose' an object using concrete members to create an aggregate class:

struct Thing
  Position pos;
  Orientation orient;
  Velocity vel;
  OtherData d1;
  SomeMoreData d2;
Such structure is enforced at compile-time, making ad-hoc object description cumbersome. Such a composition structure can be every bit as rigid as a deep hierarchy tree, which also is enforced at compile-time.

Composition frameworks build a system where an aggregate object can be described at run-time, instanced at run-time from a data description. Objects in these frameworks are ad-hoc in nature, and quite often instanced through a system that reads a data file in some format, and populates a generic container with a list of components. The structure of the object is not determined at compile time. Due to the flexibility of such a system, quite a bit of seemingly-complex boilerplate code is necessary. That is what EntityX and others offer: they write the boilerplate so you don't have to.

Essentially, such a framework needs to implement a few standard behaviors. 1) Construct an aggregate object from a descriptor of components. 2) Facilitate communication between objects and components (ie, via event passing or some other scheme) 3) Handle update/render/etc... main loop functionality 4) Provide tools for object lifetime management, instancing, serializing, etc...

While the concepts of a composition-based framework are relatively simple, the concrete execution of them in C++ quite often involves some fairly complex code. Additionally, such a system is STILL probably going to make extensive use of inheritance. For example, an object that implements the basic container for a list of components works well if all components inherit from a base Component class, to enable storing them in a single vector. Objects that can receive events work well if they inherit from some sort of base EventReceiver class, so that the core systems can hand off an event to an object without caring about its ultimate type.

#5267561 How Does One Program A Voxel Editor?

Posted by on 22 December 2015 - 05:19 PM

Create the voxel renderer first. That'll help you learn more about voxels. The editor will be essentially your renderer plus a bunch of UI and UX related stuff that has very, very little to do with actual voxels. After writing the voxel renderer, you may find that another voxel editor suits your purposes well, thus saving you the actual effort of writing your own editor.

#5265313 Where to learn to create a graphic framework for Lua?

Posted by on 07 December 2015 - 12:54 PM

I mainly work with programming and am very eager to learn more deep relationships between programming languages, compilers and hardware. Therefore, I prefer to only have to do the Lua programming part of the framework with least external manipulation such as wrapping a specially structured DLL and using the C API.

The problem is that Lua CAN'T do any of what you want (window management, etc...) without being bound to other code, usually written in C or C++. Out of the box, Lua only offers the basic language constructs and a few utility libraries (table, string, math, etc...) which, themselves, are written as C modules bound and exposed to Lua. That is what libraries such as Love2D offer: utility code, useful for games, that is already bound and exposed to Lua.

That's not to say that I refuse to learn it and do it, though I am quite lost on your answer... I am going a bit too deep than I am confident with as I never actually received any formal education in computer science, but rather self-taught to program well. I mean the best I could do is install Love2D and Lua using installers since I barely understood a video for manual installation of Lua, yet the main reason I am asking this question is really to see if anyone could link me to a tutorial of this part of computer science, preferably specialized in creating a graphic framework for Lua.

There probably isn't a specialized tutorial for creating graphic libraries specifically for Lua, since it's actually 2 questions: 1) creating a graphic library, and 2) binding it to Lua. Really, with enough work, just about any graphical library can be bound to Lua.

Like the main reason I am doing this is that even for a popular language such as Java I only know of a library called batik that allows svg loading, manipulation and drawing, to which there is not many tutorials, and for a embedded language like Lua which is less popular I am surprised a library like Love2D even exists, but it doesn't support vector graphics. Therefore, I thought I would aim, possibly too high, to learn of graphic frameworks and create my own simple one for vector graphics in Lua.

Read the Programming in Lua text. It talks specifically about binding external libraries to Lua. Additionally, there are third-party tools and resources that can make the job easier, though many of them have slipped away into obsolescence. But before you go confusing yourself too much more, just read PIL. Seriously, it's useful.