As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

[Game Dev] I don't have a publisher. What I do have are a very particular set of skills.

1535456585992

Posts

  • rembrandtqeinsteinrembrandtqeinstein Registered User regular
    (Unity Stuff)
    I wanted to make a scriptable object that fired its on change event in response to its data being modified in the editor. Like everything else it was more complicated than I anticipated.

    To help anyone who is as clueless as I am about this stuff I made a "tutorial" package with a README and everything: https://www.dropbox.com/s/mfv7o2u7fijl5au/scriptableObjectEventsWithRuntimeEditingPOC.unitypackage?dl=1

    If anyone has questions, or if this helps or if you know of a much easier way to do this please let me know.

  • templewulftemplewulf The Team Chump USARegistered User regular
    (Unity Stuff)
    I wanted to make a scriptable object that fired its on change event in response to its data being modified in the editor. Like everything else it was more complicated than I anticipated.

    To help anyone who is as clueless as I am about this stuff I made a "tutorial" package with a README and everything: https://www.dropbox.com/s/mfv7o2u7fijl5au/scriptableObjectEventsWithRuntimeEditingPOC.unitypackage?dl=1

    If anyone has questions, or if this helps or if you know of a much easier way to do this please let me know.

    Is this a way to have accessor functionality in the inspector, since Unity definitely won't do it themselves?

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • rembrandtqeinsteinrembrandtqeinstein Registered User regular
    edited February 2019
    templewulf wrote: »
    (Unity Stuff)
    I wanted to make a scriptable object that fired its on change event in response to its data being modified in the editor. Like everything else it was more complicated than I anticipated.

    To help anyone who is as clueless as I am about this stuff I made a "tutorial" package with a README and everything: https://www.dropbox.com/s/mfv7o2u7fijl5au/scriptableObjectEventsWithRuntimeEditingPOC.unitypackage?dl=1

    If anyone has questions, or if this helps or if you know of a much easier way to do this please let me know.

    Is this a way to have accessor functionality in the inspector, since Unity definitely won't do it themselves?

    If you just want private member vars to show up in the inspector you can use [SerializeField]

    But if you want to anything fancier a custom inspector is the way to go and as you can see in that example for a straightforward case like mine the code is fairly trivial

    If you want to do "holy shit its an engine within the engine" stuff then it gets a lot more involved

    this Unite '17 Seoul talk shows how to use scriptable objects as delegates and the Adventure Game Tutorial shows how to use property drawers but unfortunately does not explain the code very well

    rembrandtqeinstein on
  • templewulftemplewulf The Team Chump USARegistered User regular
    templewulf wrote: »
    (Unity Stuff)
    I wanted to make a scriptable object that fired its on change event in response to its data being modified in the editor. Like everything else it was more complicated than I anticipated.

    To help anyone who is as clueless as I am about this stuff I made a "tutorial" package with a README and everything: https://www.dropbox.com/s/mfv7o2u7fijl5au/scriptableObjectEventsWithRuntimeEditingPOC.unitypackage?dl=1

    If anyone has questions, or if this helps or if you know of a much easier way to do this please let me know.

    Is this a way to have accessor functionality in the inspector, since Unity definitely won't do it themselves?

    If you just want private member vars to show up in the inspector you can use [SerializeField]

    But if you want to anything fancier a custom inspector is the way to go and as you can see in that example for a straightforward case like mine the code is fairly trivial

    If you want to do "holy shit its an engine within the engine" stuff then it gets a lot more involved

    this Unite '17 Seoul talk shows how to use scriptable objects as delegates and the Adventure Game Tutorial shows how to use property drawers but unfortunately does not explain the code very well

    A lot of my game flow and editor code is actually based on the Adventure Game Tutorial! I love their reactor idea, but they had a lot of brittle dependencies. I moved some things around, added some dependency injection (i.e. pass parameters into initializers), and now it's a lot more flexible.

    I like the code you have in the package, but I can't find a scene with a health slider MonoBehaviour in it. I just have an empty* SampleScene and an empty scriptable-object-test-scene.

    *empty aside from the camera objects.

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • rembrandtqeinsteinrembrandtqeinstein Registered User regular
    templewulf wrote: »
    templewulf wrote: »
    (Unity Stuff)
    I wanted to make a scriptable object that fired its on change event in response to its data being modified in the editor. Like everything else it was more complicated than I anticipated.

    To help anyone who is as clueless as I am about this stuff I made a "tutorial" package with a README and everything: https://www.dropbox.com/s/mfv7o2u7fijl5au/scriptableObjectEventsWithRuntimeEditingPOC.unitypackage?dl=1

    If anyone has questions, or if this helps or if you know of a much easier way to do this please let me know.

    Is this a way to have accessor functionality in the inspector, since Unity definitely won't do it themselves?

    If you just want private member vars to show up in the inspector you can use [SerializeField]

    But if you want to anything fancier a custom inspector is the way to go and as you can see in that example for a straightforward case like mine the code is fairly trivial

    If you want to do "holy shit its an engine within the engine" stuff then it gets a lot more involved

    this Unite '17 Seoul talk shows how to use scriptable objects as delegates and the Adventure Game Tutorial shows how to use property drawers but unfortunately does not explain the code very well

    A lot of my game flow and editor code is actually based on the Adventure Game Tutorial! I love their reactor idea, but they had a lot of brittle dependencies. I moved some things around, added some dependency injection (i.e. pass parameters into initializers), and now it's a lot more flexible.

    I like the code you have in the package, but I can't find a scene with a health slider MonoBehaviour in it. I just have an empty* SampleScene and an empty scriptable-object-test-scene.

    *empty aside from the camera objects.

    I think I failed to select the scene when I made the package, updated readme to indicate you need to set the initial health value

    new one is up and appears to work https://www.dropbox.com/s/n92vxuu8hcpuzby/scriptableObjectEventsWithRuntimeEditingPOC.unitypackage?dl=1

  • eelektrikeelektrik Southern CaliforniaRegistered User regular
    Still just messing with moving and shooting, now inside a rotating icosahedron mesh I made using code.

    https://youtu.be/f9MxGLtvuUU

    (She/Her)
  • KoopahTroopahKoopahTroopah The koopas, the troopas. Philadelphia, PARegistered User regular
    edited February 2019
    New Intro-To-Code Humble Bundle. Pretty sweet. Lots of Python, Unity, and HTML/CSS tutorials including Bootstrap and Angular. Some other smaller tuts on Blender, Phaser, SQL, and JavaScript.

    https://www.humblebundle.com/software/intro-to-code-bundle

    $1:
    • Learn Python Programming by Making a Game - MSRP: $50.00
    • Intro to Game Development (Unity) - MSRP: $50.00
    • Numpy (Python) Matrices and Vectors - MSRP: $50.00
    • Learn HTML and CSS by creating a Responsive Company Website - MSRP: $50.00
    • The Complete Responsive Web Design Course (HTML & CSS) - MSRP: $50.00
    BTA:
    • VR Projects (Unity) - Flying Platform Experience - MSRP: $50.00
    • Create a Road Crossing Game with Phaser 3 - MSRP: $99.00
    • Create a Spanish Teaching Game with Phaser 3 - MSRP: $50.00
    • Learn Angular (JavaScript) by Creating a Web Application - MSRP: $50.00
    • Blender for Beginners - Craft Low-Poly Game Assets - MSRP: $50.00
    • Create Your First 3D Game (Unity) - MSRP: $50.00
    • JavaScript Programming - Learn by Making a Mobile Game - MSRP: $50.00
    • Beginning SQL - Store and Query Your Data - MSRP: $50.00
    $25:
    • Procedural Content Generation with Unity - MSRP: $50.00
    • VR Projects (Unity) - 360 Photo Experience - MSRP: $50.00
    • Build a Virtual Pet Game with Phaser 3 - MSRP: $50.00
    • Python Image Processing - Make Instagram-Style Filters - MSRP: $50.00
    • Create a Raspberry Pi Smart Security Camera - MSRP: $50.00 (This one seems random?)
    • The Complete Artificial Neural Network Course - MSRP: $99.00
    • RPG Game Development (Unity) - Turn-Based Battle Systems - MSRP: $50.00
    • Audio Effects and Soundtracks in Unity Games - MSRP: $50.00
    • Data Manipulation with Pandas (Python) - MSRP: $50.00
    • The Complete Guide to Bootstrap 4 (Web Dev) - MSRP: $50.00
    • Discover jQuery - Create Interactive Websites - MSRP: $50.00
    • Create an RPG Town with NPCs and Dialogs (Unity) - MSRP: $50.00

    KoopahTroopah on
  • Dronus86Dronus86 Now with cheese!Registered User regular
    Zek is expressing very well something I'm struggling with right now too. I'm feeling very unmotivated and super bummed about a project I've been working on because the reality of the task set in.

    I have no art experience. I have no art talent. I have no art skill. I am not someone who can do art. But this game idea I had would require more than a little and its turned into a motivation killer for me. I keep thinking about it and just sputtering out, because I don't even know where to begin the gargantuan task of making art assets for my game. I know, logically, that I should 'just do it' but even that is overwhelming for me to consider.

    How does one start to.. art?

    Look at me. Look at me. Look at how large the monster inside me has become.
    Crunch Crunch! Munch Munch! Chomp Chomp! Gulp!
  • KhavallKhavall British ColumbiaRegistered User regular
    Dronus86 wrote: »
    Zek is expressing very well something I'm struggling with right now too. I'm feeling very unmotivated and super bummed about a project I've been working on because the reality of the task set in.

    I have no art experience. I have no art talent. I have no art skill. I am not someone who can do art. But this game idea I had would require more than a little and its turned into a motivation killer for me. I keep thinking about it and just sputtering out, because I don't even know where to begin the gargantuan task of making art assets for my game. I know, logically, that I should 'just do it' but even that is overwhelming for me to consider.

    How does one start to.. art?

    To start with, use placeholders. Download shit from wherever on the internet, use free asset store packs, steal sprites, whatever. If art isn't your thing, you can always focus on the game stuff and save art for later. This will also have the effect of making you know exactly what art you need (e.g. if you decide that there's something that just doesn't work or isn't needed, you don't need to make art for it!). Also, every once in a while there are free asset packs that will go on sale (there was a humble bundle a while back, for instance, Kenny's stuff on itch.io is pretty good for $30 to start, etc.).

    Secondly, stylize. Stylize stylize stylize. Thomas Was Alone looks just fine and it's literally boxes. Learn the extreme basics of art and see what you can get away with.

    If you finish a game that plays well and feels great and has an art style that just needs touch up in the end, then you can start thinking about buying art or commissioning art. And at that point, if it's something you're thinking of making money on, you could then go to a publisher. But don't let a paralysis over art keep you from making the game - do the stuff that you can with what you have first.

  • Dronus86Dronus86 Now with cheese!Registered User regular
    edited February 2019
    I figured that was probably the best advice. I'll just power through it and try to ignore the itching need to have something to show people.

    Dronus86 on
    Look at me. Look at me. Look at how large the monster inside me has become.
    Crunch Crunch! Munch Munch! Chomp Chomp! Gulp!
  • rembrandtqeinsteinrembrandtqeinstein Registered User regular
    Dronus86 wrote: »
    Zek is expressing very well something I'm struggling with right now too. I'm feeling very unmotivated and super bummed about a project I've been working on because the reality of the task set in.

    I have no art experience. I have no art talent. I have no art skill. I am not someone who can do art. But this game idea I had would require more than a little and its turned into a motivation killer for me. I keep thinking about it and just sputtering out, because I don't even know where to begin the gargantuan task of making art assets for my game. I know, logically, that I should 'just do it' but even that is overwhelming for me to consider.

    How does one start to.. art?

    Consistency is worth much more than "quality". If everything in your game has a matching style that goes much further toward pulling in the player regardless of the graphics themselves. Think about what games you like that have a relatively simple presentation or get inspiration from games in previous generations. Remember that back in ancient times this 2600rgb-pitfall-screenshot.jpg sold for $50 retail it was a huge success.


    Its a meme by now but look at the "Juice it or Lose it" video about how to add responsiveness to simple graphics. Make games first and worry about how it looks later.

  • KupiKupi Registered User regular
    I look at it this way: the distribution of art skill is a pyramid. The largest number of people in a single tier are at the bottom. There are fewer people than that in the next tier, and fewer still in the next, and so on. The encouraging consequence of that distribution is that you don't have to raise your ability by much to exceed a large number of people. You're still going to have to put in an effort, but the first couple steps will put you ahead of the largest number of competitors (if you want to think of them like that).

    To put it another way, don't compare yourself to the objective possibility space, compare yourself to the actual competition. And don't forget to include everyone who ever said "Oh, I'm not really capable of that" and never tried.

    My favorite musical instrument is the air-raid siren.
  • KupiKupi Registered User regular
    Kupi's Weekly Friday Status Report

    Oh, boy. So last week I said I was going to make objects in my game solid. And today... they're solid.

    The first step was to implement the "depenetration" phase. While the collision detection system itself will make a best effort to keep solid objects from overlapping one another, that doesn't necessary stop some braying jackass* from grabbing an object's Position component and wrenching it into some kind of invalid state. The system has to account for that, so just in case we wind up in that situation, the collision detection system finds every overlap of two objects with a "Blocking" interaction between their respective layers, checks them for overlap, and then pushes them in the direction of the best nearby surface normal until, at least in the first revision of the phase, it found no more collisions or hit a configurable limit on the number of iterations. That was suitable to get it up to looking like this:

    https://www.youtube.com/watch?v=O5IMqnLWTO8

    However, having just the depenetration phases left in some of the same problems that you've probably heard of with other collision detection systems-- namely, that objects could move through solid objects if they were moving at terrific speed. And I didn't want the collision detection system to delegate the concept of "not moving through solid objects" to other systems, which would require me to remember to actually implement and debug such behavior each time. So, I moved on to the next step, which ws making sure that objects that block one another stop mid-frame and recalculate their velocity. I think the specifics of all the math I'm doing aren't worth recounting in detail, except to say that I had the brilliant idea at one point to let two colliding objects that are tied on Push Priority (a simplified concept of "mass" in which the volume with higher Push Priority "wins" any given collision) move as if both of them had been pushed by a volume with a velocity that was the sum of both of their velocities. This led to collision volumes coming out of a collision with more speed than they had going in, which could chain across the entire screen and kick one of my poor bugges into the next universe. As you might suppose, this played hell with the engine's bookkeeping.

    https://www.youtube.com/watch?v=qAvMf5ghAyE

    Reminded (but not necessarily newly inspired) by some performance problems, I also added a few limitations on how many interactions can happen in a single frame. Collision volumes with an interaction type of "trigger" (produce a collision event only) can only interact once per pair of volumes. And each volume tracks the number of times it's been pushed in each frame, and once it hits a configurable limit, it gets a "crushed" flag set that exempts it from all further blocking interactions. (Usually this will result in the entity getting deleted after the fact.) With the crush flag in place, I returned to the depenetration phase and let them use an infinite number of iterations, with the caveat that every depenetration iteration counts as a push, so it will eventually run out of volumes once everything that can't depenetrate gets crushed.

    So now my goal is address mankind's greatest challenge: parenting. Since my engine's entities can only have one volume of each type, but reasonable in-game entities have e.g. a body-box, a hitbox, and hurtboxes, I need the ability to tie entities together. There's also an obscure... not even an optimization, but an edge-case handler I need to add to my shape-casting engine which is unfortunately going to hit about twenty-five different code paths I thought I was done with. Hooray for changed requirements!


    * i.e. me

    My favorite musical instrument is the air-raid siren.
  • CornucopiistCornucopiist Registered User regular
    Brace yourselves! Long post coming!
    Well, actually, not that long.
    Let's start at the very beginning, a very good place to start. Last you saw me, I was advised to look into Quantum Superposition- well, no, Wavefunction Collapse. Phew. You guys have no idea how close we came to dissolving the planet.
    So, long story short, Wavefunction Collapse didn't work for me, but it got me set on Wang tiles.
    Ehrm.
    That also was not a good decision, you guys.
    First came the Unity dungeon mapper that I already showed off in the last post.
    Then, this happened:
    i2wmil48zoa4.png

    Which comes with a manually iterated spreadsheet of all those combos. Oh yeah, I went there... Now, a lot of this can be automated through copy-pasting, and find and replace. It took me about 5 hours to get to this point.
    Then I quit. I learned a lot about the concept behind corner Wang tiles, enough to start thinking about how to cheat.

    So I abandoned Wang tiles and started cheating.

    I already was generating rooms, first one big one, then at a random spot trying to grow one from big to small, then another one on another random spot, always stopping when they hit an existing room.
    Next step it draws corridors from the first to the last room. This gives nicer results than drawing them between nearest rooms!
    Then an entry and exit corridor left and right are generated.

    First I added a shadow map generator.

    So I went from this: https://www.youtube.com/watch?v=tPrt9nGrKTs&t=9s

    All the way to this, which, all right, I messed up the screen capture. I need a replacement for KVYcam...

    https://www.youtube.com/watch?v=8rszMOzS4Rg

    That one includes rules for which kind of 'corridor' can go onto which floor. It can start as a rock level, grass level, hedge level or water level. It takes two generated image textures, one floor map, one shadow map, and combines them. So the shadows get added to the map using a very quick, basic, pixel by pixel function. I then save the resulting texture.
    And now it's pumping out nice little png maps!

    Such as this one:

    myzut6wu3m98.jpg

    And this one, with a different atlas tileset.

    rpzernnaejvo.jpg


    These tilesets are really basic, just a row of 7 different base textures 128*128, and up the column slight variations on them.
    There are no rules set on how to match the tiles. What I figured out working on the Wang tiles, is that many of the combos in a complete set are pointless. You can find a dungeon generator that uses this principle, by allowing only 'matching' corner tiles. So you can go from floor tile, to tile combining floor and water, to water tiles, to combining water and deep water, deep water, and so on.
    But even that is a lot of work.
    If I get back to this, I'll try for dominos instead. Going down the tile array, for each tile I'll check if the previous tiles (west or south) form a match. If so, 'earth' can swap to 'tile to earth' or 'earth matched'. I only hit the previous tiles so that a match isn't broken by changing one of the pair later on. Most tile types don't need a match, so I won't make a smooth wall transfer into water, for example...
    It won't give me perfect seamless texturing, but I actually NEED tiles to be visible as these are meant as RPG maps.

    Anyway, that's what I did last week.

  • CornucopiistCornucopiist Registered User regular
    edited February 2019
    Update!

    So I managed to work through a few iterations.

    Now, I do a run for every tile in the array, and check if the 8 bordering tiles are wall or not (or, if water, any other tile type).
    If so, I set one of 8 booleans (w, nw, n, etc.) to true.
    I have a 'shadowholder' texture2D and for each boolean, I use a texture combination function to 'darken' a corner or side texture from one part of this atlas:

    0uw3hi75na6g.png

    There's no real reason for the whitespace except the function doesn't work unless there are 4*4 tiles in there. I already spent 4 hours figuring out that a Debug.Log in the sharp end of that function will send Unity on an infinite loop, so I was done debugging.

    The 'darken' works by checking which pixel is the darkest and keeping that for the result. I'm using only greys, so no colour issues.

    Once I've placed (or not) all 8 corners and edge shadows, I write the shadowholder to a tile on my shadow texture. That shadow texture then gets multiplied on top of the maptexture

    results:

    f1nuwtoehnxy.jpg


    The next step, though it's a bit superfluous, is to grab the maptexture tiles one by one and give them a random rotation.

    And then probably start looking at levels? I dunno, this is already way overkill.




    Cornucopiist on
  • halkunhalkun Registered User regular
    Hey Guys. If you are need of a 3D anime character generator for your games, there is a free one called "Vroid Studio" and you can import what you make into Unity. I'm making an English tutorial series (The instructions are all in Japanese). Just thought I would help :)
    https://youtu.be/jJDU81-6f3s

  • templewulftemplewulf The Team Chump USARegistered User regular
    .
    halkun wrote: »
    Hey Guys. If you are need of a 3D anime character generator for your games, there is a free one called "Vroid Studio" and you can import what you make into Unity. I'm making an English tutorial series (The instructions are all in Japanese). Just thought I would help :)
    https://youtu.be/jJDU81-6f3s

    Whoa, that's an awesome resource! Thanks for doing the translation effort

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • KoopahTroopahKoopahTroopah The koopas, the troopas. Philadelphia, PARegistered User regular
    Crossposting from the Hollow Knight thread:
    Delzhand wrote: »
    02-6-unity_parallax.1-min-compressor.gif?itok=4QUhfOej

    https://unity.com/madewith/hollow-knight

    Crazy how many parallax levels there are.

    Very cool Parallax gif, as well as a short bit of a behind the scenes with making the game in Hollow Knight.

  • MadpoetMadpoet Registered User regular
    I've been hacking together little web games and have a couple prototypes built. If I'm hosting one on a free tier Azure webapp, is there much a ne-er do well could do to cause harm, beyond crash the game?

    First one:
    Zilch Quest - The gist is it's several layers of push your luck: Going out into the world will cost resources, so you'll want to do as much combat as possible while out hunting, but all/most of your gains are lost on death. Must return to town to bank/heal. Combat is a take on Zilch (hence the name), except that you work down from 10k hp instead of up to a score.

  • IzzimachIzzimach Fighter/Mage/Chef Registered User regular

    Trying to rewrite the wall climbing code.

    It's going great.

    https://youtu.be/xCZfuvhGM-Y

  • KupiKupi Registered User regular
    Oh Goodness, I Nearly Forgot About
    Kupi's Weekly Friday Status Report
    This Week

    ... and for good reason. This week I occupied myself entirely with trivialities and micro-optimizations, rather than implementing the concept of entities with parent-child relationships, which is what I actually said I was going to do. Therefore, my punishment (and yours) is to provide more detail on my activities than I usually do.

    So, my collision detection system calculates collisions between swept volumes. One important consideration is that certain collision volumes have blocking interactions, which means that they aren't allowed to cross through each other. I could implement this with logic on individual entities to try to depenetrate from volumes they're not supposed to overlap with, but my preference is to keep this logic confined to a single system rather than having to repeatedly re-implement it.

    Since it's basically an exercise in futility to convey this verbally, here's a picture to help describe how a blocking collision plays out:

    6uri0c2s49nx.png

    Here, a circular volume begins from the position labeled "S" and moves along the black arrow. The black square has a blocking interaction with the circle and higher push priority, meaning that the square will be unaffected by the collision and the circle will be "pushed". After identifying this as a blocking interaction, the system moves the circle to the position at the end of the black arrow. Then, its velocity is reassigned to the sum of two values: the velocity of the square projected onto the surface normal (in this case, it receives the full velocity of the square since the square's velocity and the impact surface normal are in the same direction) and its previous velocity projected onto the normal to the impact normal, or the "surface direction" (these are the cyan arrows). At this point some frame-of-reference trickery occurs. The circle is moved backward by its new velocity times the time of collision within the frame. In other words, the circle is set up as though it had never collided with anything and was always moving with its newly-assigned velocity from a new start position (the magenta circle and arrow). Then the system re-tests for collisions, ignoring any that occur before the time of the collision. Since objects generally aren't moving more than 16 pixels per frame, this doesn't tend to result in too many irrelevant tests.

    What I did last weekend was address an edge case. Let's say that we have a concave polygon that's serving as a half-pipe for a mammal with attitude represented by a circular collision volume:

    2q4ccbvlml86.png

    The circle starts at the leftmost of the two black circles and moves to the right at terrific speed. It collides with the polygon early in the frame, moving to the second black circle. As before, its velocity projects onto the surface of impact and we perform our positional trickery. But notice that this creates a collision in which the circle begins the frame overlapping the polygon. We ignore that one, because the collision that kicked this whole process off occurred at sub-frame time > 0. That means we ignore the later collision with the next line segment composing the polygon, and the circle winds up overlapping the polygon. In particularly bad cases, this could result in the circle getting pushed out of the opposite side of the half-pipe, which is... unfortunate.

    My solution to this problem was to pass the current collision time all the way down the call-stack to my helper functions. Therefore, the system now supports ignoring collisions that happen before a specific time not just at the whole-volume level, but the pieces of a volume, meaning the circle would collide with the next line segment on the polygon.

    ***

    The other "problem" I solved this week sent me spinning off into the land of needless micro-optimizations, but I had some fun and learned something new while I was at it, so I'm not considering it a loss.

    In order to avoid garbage collections, I'm using a system of object pooling for basically any reference type, essentially imposing C-style memory semantics on C# objects. You allocate it, you're responsible for releasing it. Unfortunately, this leads to what I call the "capacity explosion problem". As y'all probably already know, a List is just an array with some smarts applied so it doesn't overrun its memory boundaries. If you call Add() on a List whose backing array is size 4 and already has 4 elements in it, then it goes and gets a larger array, copies everything in the old array to the new one, and switches to the new one. To you, it looks like something with infinite storage. Now, here's the thing: Lists in C# are written under the assumption that when you're done with them, you'll drop them on the floor and the garbage collector will come in later and sweep them up. I'm not using them like that; I'm sticking them back on a coatrack and pulling them back down at random. This is the concerning case: say that 100 objects all drop into, say, the same Low-Resolution Collision Grid bucket. The list they live in expands to be much larger than its normal capacity, and since C# expects you to just throw it away, it never contracts. But there's no guarantee that I'll always use the same list for large interactions. The next time, I might pick up a small list and try to stuff 100 objects into it... making that list get huge too. Eventually, every list has been the unlucky victim of the 100-object pile, such that my memory usage is the size of a 100-object list times the total number of lists I ever use. That's bad I guess?

    So I wrote my own collection classes. Lists are easy, but I've never actually had a solid grasp on how you implement a hash table / dictionary / map without using a list of lists. Well, thanks to a site called source.dot.net, which is automatically generated from Microsoft's open-source .NET Core framework code, I was finally able to wrap my head around it. I think a full explanation is beyond the scope of even a penalty post, but I'm happy with the implementation I have now. In any event, the important thing is that my collection classes also object pool their backing stores. So when a list decides to double its capacity, it only allocates if there isn't a free array of the same type in its target size. And when it contracts, it releases its backing store to the object pool for later re-use. Therefore, there should be no more large buffers than have ever been used concurrently. Implementing this system brought the RAM usage of my test application down from 61 megabytes... to 60 megabytes.

    ... well, if it turns out to be a burden on the CPU, it's easy enough to switch back to the implementation that just derives from the core library implementations.

    ***

    For this week, what I have on deck is the same thing I said I was going to do last week: implement the Parenting component and let entities treat other entities as their parents (or children).

    My favorite musical instrument is the air-raid siren.
  • CalicaCalica Registered User regular
    Izzimach wrote: »
    Trying to rewrite the wall climbing code.

    It's going great.

    https://youtu.be/xCZfuvhGM-Y

    I needed that laugh tonight; thank you :heartbeat:

  • halkunhalkun Registered User regular
    edited February 2019
    I made lesson 2 for Vroid studio that deals with the face editor and basic UV mapping. Lesson 3 will be the hair editor, which is really complex. I spent almost 10 hours editing this. My renderer broke so the encoding is a little choppy in spots.
    https://youtu.be/DW_XH5N6w_A

    halkun on
  • halkunhalkun Registered User regular
    Drat! In the latest version of Vroid Studio, the English hair editor crashes when you select the texture tab. (Japanese editor works fine). I submitted a bug report so I hope they look into it. Version 5.2 works fine, but 5.3 and 5.4 do not. I'll gear my tutorial on 5.2 for now, but it kind of throws a monkey wrench into things.

  • LilnoobsLilnoobs Alpha Queue Registered User regular
    so, since i got a new computer, I went ahead and downloaded Unreal engine. Any pointers? For reference, I'm coming from Unity.

  • KhavallKhavall British ColumbiaRegistered User regular
    Lilnoobs wrote: »
    so, since i got a new computer, I went ahead and downloaded Unreal engine. Any pointers? For reference, I'm coming from Unity.

    Yeah, you'll definitely need pointers for Unreal.


    (...because of the c++ using pointers, in case that wasn't clear)

    *ba-dump psch*

  • CornucopiistCornucopiist Registered User regular
    The absolute, unadulterated, nonsensical disinformation about ECS?

    Right here, sir.

    So, let's talk about my game Choochoo. Which, if you're a 4 year old, you should totally nag your parents to download for you. A-hem. No-one?

    ChooChoo is a game where wooden trains drive over wooden rails!

    It's built in Unity! By me. (yeah, done with exclamation marks now)

    So that means that in Unity Editor, for every scene, I have a 3d model of a landscape built in Blender. I also have about 500-1000 wooden rail objects. These all have 'components' ie. a mesh, rendercompononent, position component etc. as well as... a SCRIPT component.

    Upon starting every scene, a script on every rail will use a collider on each end to check which fellow rail is on the 'blue' end and which is on the 'yellow' end. It then sets these as variables in another script on the same rail, and deletes itself.
    Why?! you ask. Well, long story short, colliders only work on Update, and not even then every time I don't want a script that checks EVERY update whether it should check collision or not. 2000 scripts that each check a single bool every Update is hella slow.

    So now we have a thousand or so rail objects, which have 'nodes' in them. A train object has a script that will grab these nodes from the rail it is on, moves along them, and then at the end node, switches to the next rail. Meanwhile, every rail has a bunch of variables, such as if there's a train on it, if it should pause the train, the pause count, the node positions, and which rails it connects to. In memory! All the time! For all the rails!

    Well, it works.

    "But Cornucopiist," you ask, "wouldn't it be better to just keep all the nodes in a separate list in one central script? And rather than positioning game objects with scripts attached, to generate dumb meshes from that list? "

    DING!

    You now understand everything important about ECS.

    Under ECS, there would be a list of Entities, i.e. numbers
    Each Entity would have Components, i.e. railposition.
    And there would be one central script, a System, that would look at every Entity.

    Note that your Entities are in sequential numerical lists, which the System can run down very very quickly.

    At every Entity, the System will check if that Entity has a railposition Component. If not, it checks the next one.
    If so, it can do its Thing. The Thing might be to generate a blue/yellow node position, and for each of those to run through all Entities, and if any is close enough to the original railposition, generate a blue/yellow node position, and see if any match.

    But you don't have to run the System at 'start', and store nieghbour rails in a Component. Instead, you have a System that looks for Entities with the 'locomotive' Component. And on every update, it will check if that locomotive Component is on an end-node. If so, it will look for the next rail. Since ECS is super fast, going linearly down a list of entities, not keeping anything in memory, it can do that on every update for every locomotive, and there can be thousands of locomotives, and millions of rails.

    Locomotive Entities don't just have a locomotive Component. They also have a 'move' Component. The 'Move' system looks at all the Entities that have a move Component, and... moves them, i.e. changes their position Component. Some of these entities are locomotives, some are wagons. So we have a 'Wagon' system that looks at each entity with a 'wagon' Component, figures out which entity it's following, and sets its 'move' Component target' But we also have birds! Birds have a 'move' Component as well. What sets the target on that move Component? Another System!. But you get the idea. No System is keeping a list, nor are they checking it twice.

    Some Systems are only called at specific times, some at startup... they all do Things, such as the ones I described above. Except every Thing can be seen as a few simple Jobs. And the idea is that once a Job is done, there's no trace of it. No running thread, nothing in memory, nada. It makes the calculation, and it writes to the component, and it moves on down the line. Therefore it's easy to have parrallel job processing!

    So, maybe that helps you all picturing what this ECS thing is about.

    Maybe it's all a bunch of filthy lies. But it's my current state of understanding...




  • CornucopiistCornucopiist Registered User regular
    edited February 2019
    By the way, I think I managed to set Unity up for ECS.
    Using the latest beta 2019.2.0a4
    I used this url https://github.com/Unity-Technologies/EntityComponentSystemSampleshttps://github.com/Unity-Technologies/EntityComponentSystemSamples
    From there, in Samples > Packages I copied the manifest.json over to my Project > Packages folder.
    That gave me a warning for the PackageManager (oh irony) so I removed the package manager from the manifest.json file.
    Upon restart, I have 'Jobs' in the menu and Entities etc. in Visual Studio.
    Sooo... let's see how this works :)

    Edit: obviously it doesn't work. Well, it works, but Visual Studio doesn't accept the Entities.

    Instead I started in a new project. In the Package Manager, I set 'show preview' in advanced, then installed the Entities and Job system.
    Restarted the project, added the sample project (rotating cube) and opened one of the scripts.
    Changed the scope at random in the Solution explorer, Project > unloaded the project, and closed Visual Studio.
    Closed and reopened the Unity project.
    This time the solutions load properly!

    Cornucopiist on
  • KupiKupi Registered User regular
    Lilnoobs wrote: »
    so, since i got a new computer, I went ahead and downloaded Unreal engine. Any pointers? For reference, I'm coming from Unity.

    Two things: One, the Unreal Engine 4 Documentation actually has a page specifically titled "Unreal Engine 4 For Unity Developers", which will help you map some of the concepts shared between the engines to their new names. Architecturally, they're very similarly-structured.

    Second, the biggest culture shock is probably going to be Blueprint, which is UE4's custom visual scripting language. It takes a bit to get used to, especially if you've lived in a text editor your whole life like me, but eventually you'll start to see how the nodes map to code constructs. If something isn't actually in Blueprint, it's in a Blueprint-like form, so you'll need to understand it eventually. Your alternative to Blueprint is C++, which is one of my least favorite languages to work in ever, so it's a good thing that Blueprint is as usable as it is.

    My favorite musical instrument is the air-raid siren.
  • KhavallKhavall British ColumbiaRegistered User regular
    Every time I try to figure out ECS better my brain shortcuts to "Header files in c# got it" and I know that it's not quite right but also it's exactly close enough that I never learn

  • LilnoobsLilnoobs Alpha Queue Registered User regular
    Kupi wrote: »
    Lilnoobs wrote: »
    so, since i got a new computer, I went ahead and downloaded Unreal engine. Any pointers? For reference, I'm coming from Unity.

    Two things: One, the Unreal Engine 4 Documentation actually has a page specifically titled "Unreal Engine 4 For Unity Developers", which will help you map some of the concepts shared between the engines to their new names. Architecturally, they're very similarly-structured.

    Second, the biggest culture shock is probably going to be Blueprint, which is UE4's custom visual scripting language. It takes a bit to get used to, especially if you've lived in a text editor your whole life like me, but eventually you'll start to see how the nodes map to code constructs. If something isn't actually in Blueprint, it's in a Blueprint-like form, so you'll need to understand it eventually. Your alternative to Blueprint is C++, which is one of my least favorite languages to work in ever, so it's a good thing that Blueprint is as usable as it is.

    omg, that comparison document. beautiful Thank you.

    I live in the text editor, but even Unity is building assets towards visual scripting. I suppose it's not a bad wave to catch

  • CornucopiistCornucopiist Registered User regular
    ECS: the vengeance and the fury and the payback: the next generation, part four.


    So, sequel time.

    I had a HARD time getting this to work, at all, but the samples package got updated yesterday, which fixed it.

    -Make a new project in 2018.3.4f1 (feel free to test other versions)
    -In the Package manager, under 'advanced', set 'see preview packages'. Then download Burst, Jobs and Entities.
    -Close the editor
    -From https://github.com/Unity-Technologies/EntityComponentSystemSamples download the entire project as a zip.
    -Unzip 'into the project folder, overwriting Assets, Packages and Project Settings as well as all files.
    -Restart the project.
    -You should be able to open any of the scenes without missing dependencies, or scripts, or objects.
    -Visual Studio should accept all the Entities code.
    -You should be able to build (tested to Windows)

    You'll still have no idea how the code works, but at least you'll have a starting point!

  • halkunhalkun Registered User regular
    edited February 2019
    Holy cats the Japanese Vroid Studio community is awesome and I think found my niche in it. I submitted a bug report that was handled by the vroid team the next day! (The bug was actually something that got corrupted on my computer, but it was a fast turnaround!) They seemed super receptive, so I decided to submit another bug report having to do with some of the more awkward English in the hair editor. Once again they got back to me the next day and told me they are taking the feedback under advisement.

    The issue was the hair editor tries to pluralize "hair" in strange ways so I sent them this picture to help them out.

    Another cool thing is that Vroid Studio exports to a "VRM" format that is a standard binary glTF file with some strange quirks, but nothing out of spec. The glTF importing routines for Blender are a little shaky and can't rig the model right due to some of this quirkiness. Turns out, there is a Japanese plugin that imports the VRM file into blender perfectly. It can even export VRM too... kind of... That's a little flaky. As the plugin is open source, I forked a copy and fixed the English in that too. Turns out my changes were accepted by the main developer! YAY!

    (As I write this he added more English I have to go and correct now) :P

    The hair editor is pretty massive. Because the tutorial series is kind of made for absolute beginners, I made a analogy in my last video about lighting and colors that makes things more complicated then it needs to be. I'm spending time in this one making it a little better.

    Hopefully I can get word about this tool out. It's really an amazing piece of kit.

    halkun on
  • CornucopiistCornucopiist Registered User regular
    The current Humble Bundle has tons of fantasy game art (icons etc.) for people that want to dev but cannot art...

  • LilnoobsLilnoobs Alpha Queue Registered User regular
    Has anyone found a way to export Vroid Studio models with the animations?

  • EnigmedicEnigmedic Registered User regular
    There's also a bunch of random programming tutorials in another humble bundle for the next like day or so. Was wondering if anyone had any experience with zenva academy and if they are worth it or just junk.

  • KoopahTroopahKoopahTroopah The koopas, the troopas. Philadelphia, PARegistered User regular
    There's also another art assets bundle for $20 which has a ton of RPG art assets that just went live today. Highly recommend checking it out if you don't want to invest a bunch of time in art like I do.

  • eelektrikeelektrik Southern CaliforniaRegistered User regular
    Kind of ran out of steam on my D20 inside a D20 weird tilting twin-stick shooter, with difficulties in getting the camera to work well, or the shooting to consistently stick to the level surfaces changing angles. Was probably biting off more than I can chew for a first project, may come back to it later on as I still think the idea could be turned into something fun. I think what I want to try doing going forward is to make one game a month. Any kind of game. Just try and build something playable each month and learn more each time and hopefully watch my games get better each time. Think I'll spend the rest of February randomly experimenting with things, and on March 1st start working on a new project of some sort.

    (She/Her)
  • halkunhalkun Registered User regular
    edited February 2019
    Lilnoobs wrote: »
    Has anyone found a way to export Vroid Studio models with the animations?

    I'm sorry to say you can't. I'm going to go into detail about the export system in a later video, but this is one of the limitations of the application. However options do exist.

    Like I said above, the model is exported as a VRM file, which is in a slightly tweaked, but valid binary glTF format. The good news is glTF is an open and standardized 3d interchange format for video game assets. The format was designed by the OpenGL/Vulcan guys. glTF is much like Collada, which another popular interchange format. The major difference is glTF is json based, and Collada is XML.

    What makes glTF "better" is that:
    1) It's optimized for video games
    2) Is an open standard
    3) Can be converted back and forth between a binary and text form
    4) Can contain scenes as well as models.

    Collada just holds models and relies on binary dependencies, such a textures, outside the file. glTF is also not proprietary like filmbox (FBX) files are.

    Anyway animations.

    The VRM file only saves the rigging skeleton and morph targets for the face, (so you can animate it later for talking). The preview animations are part of Vroid Studio and not exported. Also, when you export, Vroid Studio "bakes in" much of model geometry and some textures. This means it's a non-trivial task to remodel parts and apply materials in your own editor without tearing apart the model a little bit. (It's not impossible though). The good news is that with the VRM import plugin for blender I'm working on with iCyP, VRM import works very well. It's better at importing VRM files than the native glTF importer. It's also much better then mess you get if you convert the glTF file to FBX and try and import that. Once you get the model into blender you can assign a Biovision Hierarchy (BVH) animation file to the rig with a little work. The process is manual as you have to link the bone in the animation file to the bone on the model's rig. It's a little tedious, bit not impossible. I'm actually in the process of learning Blender 2.8 so I'll probably be giving some tutorials on how to do that as well when I get a hang for the new system.

    Also, there is no way to import new clothes into Vroid Studio as well, but the base cloths are very modifiable in tricky ways. I'll get into that in the video after the one I'm working on. I can answer any other questions you may have about the Vroid Studio. I've been tearing it apart for the last few weeks and got a good handle on how it works.

    halkun on
  • CornucopiistCornucopiist Registered User regular
    edited February 2019
    ECS: The quickening and, after, the culling.

    Yesterday, I took the cubespawner system from the sample, and treated it like a function. So I did a 100*100*100 iteration and spawned a cube at every step.
    Spawning a million cubes goes VERY well, but the framerate was still disastrous.
    I think that might be GPU only (I'm working with integrated GPUs) and so my current working theory is that I have to use ECS to do a REALLY efficient pseudo BSP and get efficiencies from that.

    Indeed, when I was swapping out 'hero' GameObject for 'distant' Gameobjects in games where I did that, I got high efficiencies, but a CPU bottleneck.

    However, I was kind of hoping there would be some rendering advantage for ECS as well... I have to watch the demo again, and listen to what they say in the comments regarding drawing and rendering.

    Cornucopiist on
Sign In or Register to comment.