Ethernaut

Forum Replies Created

Viewing 15 posts - 136 through 150 (of 288 total)
  • Author
    Posts
  • in reply to: Component system for Mojo3D #11192

    Ethernaut
    Participant

    I apologize, the examples I have are kinda terrible and were made only for my own testing. There are classes within classes that are not necessary. My bad, I blame my own incompetence. Will try to add something more informative when I have time.

    That said, my take on it is to put more emphasis on the data than on the code.

    It may help to know that I want to design both the assets and the scenes themselves from within a 3D software (SideFX Houdini is the best candidate so far, but it can be Blender, Maya, etc.), export everything to FBX and Json files, and use M2 code to load and run the scenes, occasionally creating new components as M2 code and attaching said components to entities from within Houdini.

    if it sounds too complicated, it isn’t: The assets are already being created in Houdini, so instancing them in a separate 3D scene and making a few scripts to export stuff out is the next logical step, and is actually a simpler pipeline (from an artist’s perspective) than doing everything in code.

    As for the other question, “What’s the point of components”?… components are little bits of functionality added to entities. You can create complex behaviors by combining multiple small components (instead of subclassing and inheriting everything, OO style). For instance (not actual code!):

    Entity “Dude”
    | Component: “Transform”
    | Component: “Sprite Render”
    | Component: “Collider”
    | Component: “Platformer Movement”
    | Component: “Character stats”
    | Component: “Player_Input”

    This is your main character. To make an enemy, simply make a new entity and add those components:

    Entity “BadDude”
    | Component: “Transform”
    | Component: “Sprite Render”
    | Component: “Collider”
    | Component: “Platformer Movement”
    | Component: “Character stats”
    | Component: “Cause Damage to Stats on Collision”
    | Component: “AI_Input”

    As you can see, we re-used a few components, but added a couple different ones. The “Platformer Movement” component always looks for an “Input” component, so in one case it is controlled by a human, on the other it is controlled by AI, yet the actual platforming (Jumping, colliding, etc.) is independent from where the input is coming from.

    Which components are used can easily be defined in an external editor, and reloaded from the engine at any time, allowing quick testing and iterations.

    Adam, I understand your stance, and certainly considered it in the past. But this approach feels right to me, and is actually quite popular in game engines these days. I also get to leverage my experience in film animation pipelines, where your data is your gold and all editing is done in 3D editors, which I’m very familiar with.

    Hope that clarifies it for you even if you still don’t agree, which I totally respect 🙂
    Cheers!

    in reply to: Component system for Mojo3D #11168

    Ethernaut
    Participant

    Not sure how happy you’ll be about this (hopefully happy!) but I actually started on a component system for mojo3d

    Very happy, considering everything I make by myself tends to be 178.3% slower and 451% more bug infested, on average.

    It does mean I have to rewrite a bunch of stuff (again, since I had originally started something similar for Monkey-X!), but that’s Ok, I feel like I can probably add extra features on top of this and keep things cleaner that way.

    I’ll definitely want to add serialization at some point. I was playing with bringing 3D models from Houdini today (for my game project, not included in the Github repo), and not recompiling every time I make a tiny change is way more pleasant!

    Whatever you can do to make life easier in this regard is welcome, like always offering an optional New() constructor without arguments. The other thing I had to do on my system to make deserialization possible is being able to refer to objects by name. So Thing like Materials, Textures, GameObjects, Components, etc., can all be referred to by unique names, so you can set an Entity’s parent by name, for instance, or a material can refer to an existing texture by name, etc.

    Or I can keep this stuff “on top” like it is now.
    Cheers!

    in reply to: Worried #11111

    Ethernaut
    Participant

    I’d hate to see Monkey go.
    I’m a veteran CG artist with an interest in programming, and have been using Monkey since its first iteration.

    I tried a lot of other solutions – Unity3D, Construct, Haxe, Nim, etc. – but Monkey was the only one that had the blend of simplicity, flexibility and usability “out-of-the-box” I wanted. It also offered the opportunity to deepen my programming knowledge in a somewhat friendly way, despite being rough around the edges.

    I feel like Monkey2 is very close to find its footing, but in a reality filled with mature Game Engines and Middleware created by relatively large teams, I wonder what would it take to cross that threshold.

    If I had to pick one, and only one, thing to work on before calling it quits, it would be an organized effort to “open up” the language to more developers. Mark has put an admirable effort into Monkey, but it’s too hard for a single person to compete in the current game/app development arena.

    Cheers.

    in reply to: Reflecting multiple constructors #11103

    Ethernaut
    Participant

    Thanks!

    in reply to: Ted2Go IDE #11086

    Ethernaut
    Participant

    Tried collapsing the root and expanding it. Works fine with this:

    "exclude":["*.buildv*","*products*"]

    But does not like when I add files that start with dots, like this:

    "exclude":["*.buildv*","*products*",".git"]

    This initially works after I alt+tab, but if i collapse the root and expand again, all filters are ignored. I can alt+tab again and the filters are reapplied, but now all files in subfolders disappear. 🙁

    Also tried with other macOS and Linux hidden files, like “.DS_Store”, and ran into the same problems.

    Thanks!

    <edit>

    This works. I just can’t use the dot in the beginning of the filename…

    "exclude":["*.buildv*","*products*","*DS*"]

    But somehow this doesn’t work, and causes the same problems as before…

    "exclude":["*.buildv*","*products*","*DS*","*git*"]

    in reply to: Ted2Go IDE #11078

    Ethernaut
    Participant

    This kind of filtering is incredibly useful, but it’s not working well for me.

    Behavior is kinda random… sometimes the filter is not applied until I switch away from ted2Go, then back. Sometimes the filter is applied when alt+tab switching, but all files under subfolders disappear.

    I’m also confused with the explanation for the use of *. You say that *filter checks for text that starts with filter, but your example project.json file has the string *.products, which doesn’t seem to work. Shouldn’t it be .products* if you want to check for strings that end with .products? I mean, until regexp is supported.

    Cheers.

    in reply to: Ted2Go IDE #10854

    Ethernaut
    Participant

    Tested the latest dev branch for a few minutes, crash seems fixed now. Thanks!

    in reply to: Ted2Go IDE #10846

    Ethernaut
    Participant

    Definitely crashing within a few seconds on MacOS. Seems to be related to the error hilighting since it happens as soon as I hover the error red line in the document.

    I launched a debug build from the command line and got this (I removed any file paths in the error):

    Attempt to invoke method on null instance
    {{!DEBUG!}}
    >?????:Void();/home/ … /Ted2Go/view/HintView.monkey2;33;533590191
    >?????:Void();/home/… /monkey2/modules/std/time/timer.monkey2;38;530998829
    period:Double=0.55555555555555558
    timeout:Double=200.16928584955556
    now:Double=200.17998897400003
    sleep:Double=-0.010703124444461309

    in reply to: Load/save persistent data on mobile targets? #10837

    Ethernaut
    Participant

    Maybe I’m oversimplifying here, but isn’t it enough to create a text file in a folder where the main monkey file is, then just:

    From then on, simply use SaveString and LoadString with the file asset, like this:

    myFile.txt is copied to the build folder when you build the app, and “lives” with the app from now on, allowing persistent data to be saved and loaded. The original file is unaltered when the app saves the string, since it now saves over the copy in the build folder instead of the original.

    (never tried it on mobile, but should work, shouldn’t it?)

    in reply to: Structs and reflection #10810

    Ethernaut
    Participant

    Sweet! Works now.

    I remember something about serialization not recognizing generics, and I definitely see it not working.It also fails on Enum types, apparently. The way I’m gonna work around it is having properties that return arrays or other values, instead of generic classes and structs, so that instead of:

    I’ll do:

    Or I can create ToArray() and FromArray() method extensions to classes and structs I know I’ll use anyway, like Vec3f, etc.

    Gonna work on loading now. Will post Serialize/Deserialize code to archives once it works well (I already have it handling arrays, yay!).

    Monkey2 is a lot of fun. Cheers!

    in reply to: Structs and reflection #10786

    Ethernaut
    Participant

    Thanks Mark!

    Things are working nicely, but I’ve ran into a problem that may be more related to how inheritance works than to reflection… in the following code, I can’t serialize the objects coming from a stack with the correct extended type. They end up all being serialized as “BaseClass”, even though one of them is “ExtendedClass”.

    Is there a way to cast them as i iterate through the stack?

    in reply to: Powered by Monkey 2 logo. #10724

    Ethernaut
    Participant

    Yeah, the chin ended up looking like a nose (and the double chin like the normal chin!), so it looks like he has a big nose and is sadly looking down… 🙂 Will fix when I find some time.

    P.S. I hope you don’t mind us… monkeying…with your logo.

    in reply to: Structs and reflection #10717

    Ethernaut
    Participant

    Found it. The property that wasn’t working returns a struct “NonsenseStruct”, but it sets a String property in that struct, instead of setting the struct itself.
    Changing it to this works:

    in reply to: Structs and reflection #10716

    Ethernaut
    Participant

    So close! This code almost works with the latest dev branch. The goal is to print out all settable properties, recursively.
    Only when we uncomment the “BrandNewName” property, which returns a struct, it fails. Can’t see why, since the Color property also returns a struct, yet that one works perfectly.

    This will spit out the following string:

    Sorry for all the Monty Python references.

    in reply to: Powered by Monkey 2 logo. #10687

    Ethernaut
    Participant

    Managed to make a super quick cleanup monkey drawing… styling is still kinda “meh”, and I just went along with the same “monkey walking from the side” idea (again, super quick), but hopefully feels more clean and distinctive.

Viewing 15 posts - 136 through 150 (of 288 total)