Ethernaut

Forum Replies Created

Viewing 15 posts - 226 through 240 (of 288 total)
  • Author
    Posts
  • in reply to: How fast does monkey2 compile? #7079

    Ethernaut
    Participant

    I often get a slowish first compile, but then it gets really fast (under 2 seconds) for subsequent changes/compiles, unless I make major changes that affect several source files. That’s about the same I was getting when changing Unity scripts.

    I’m on a 2.5Ghz, quad core i7 Macbook.

    Out of curiosity, how do you count all the lines of code in a lot of imported files?

    <edit>
    Figured it! Running this command line at the root directory of your project will do the trick.
    find . -name “*.monkey2” | xargs wc -l

    in reply to: LoadAnimImage missing? #7077

    Ethernaut
    Participant

    Tested, works here. Here’s a sample usage with a 5 frame 32×32 sprite (160×32 sprite sheet, no border or padding):
    (requires previously posted LoadSpriteSheet function)

    [/crayon]
    in reply to: LoadAnimImage missing? #7072

    Ethernaut
    Participant

    Here ya go:

     

    The “padding” and “border” arguments are designed to work with the way Aseprite exports sprite sheets. I haven’t tested this out of my framework, but it looks like it should work. Let me know.

    I think I based this on some code someone posted on the Monkey-X forum. It’s been too long, can’t remember now…

    in reply to: Ted2Go IDE #6953

    Ethernaut
    Participant

    Oh, and Hezkore’s icons look great! I love simple, monochrome icons. 🙂

    in reply to: Ted2Go IDE #6951

    Ethernaut
    Participant

    Hi Nerobot,

    Ted2Go looks great, and I’ve been wanting to use Ted or Ted2Go for a while, but I haven’t been able to yet, primarily because the text editing process itself is a bit jarring, since it doesn’t follow well established shortcut conventions on Mac OS. It would be incredible if it followed these conventions (same as Xcode or Sublime Text on MacOS):

    File:
    Command + W – Close tab (Should work now accoring to the menu, but doesn’t do anything on my machine)
    Command + T – New Tab (Same as Command+N, New file)

    Text navigation:
    Command + Right – Go to end of line
    Command + Left – Go to beginning of line
    Command + Up – Go to top of document
    Command + down – Go to bottom of document
    Alt + Right – Go to next word
    Alt + Left – Go to previous word
    (All of those should be combined with shift to perform selections, i.e. Shift+Alt+Right = Select next word)

    Build system:
    Command + B – Build and run with current settings
    Command + Shift + B – Just build
    Command + R – Run last built app

    Miscellaneous:
    Command + Shift + Z – Redo
    Command + Comma – Preferences
    Command + ForwardSlash – Toggle comments on/off

    None of these are currently assigned or work correctly on my MacOS laptop. In addition, there are other minor things I noticed:

    – Text cursor is almost invisible, very hard to find at a glance.
    – Would it be hard to hilight the current line where the cursor is with a color slightly different from the background?
    – Cursor is different in txt files and monkey2 files, is that intentional?
    – A button in the toolbar to quickly toggle debug/release would be great!
    – Indentation lines would be amazing! Here’s an attached example of how that looks like in Sublime Text 3.

    Thanks for this project! I’ll definitely drop some donation money once I can use it!
    Cheers.

    Attachments:
    in reply to: Struct still crashes in some cases #6865

    Ethernaut
    Participant

    <edit>
    Never mind, works fine now. Thanks Mark!!!

    in reply to: Mark – App Icons OSX & Windows #6864

    Ethernaut
    Participant

    I agree that it needs to be “built-in”.

    But for now, you can swap the icon without any extra software. If you already have the .icns file, simply right click the app, select “Show Package Contents”, navigate to the resources folder and drop the icon files there. Make sure it is named exactly like the executable file inside the MacOS folder, only with .icns extension instead.

    One catch: usually MacOS won’t refresh the icon right away, even if you kill finder and relaunch. One quick way to check if it’s correct is to simply copy or move the app to a different folder, it should then display the updated icon.

    in reply to: Instancing entities with components #6858

    Ethernaut
    Participant

    I’m temporarily going back to creating the gameplay elements through code, like in the “Class Enemy” example in the original post.

    Pros: Doable right now, and super easy to create instances (“New Enemy(x,y)”, etc.).

    If I want to share the same instance of a component on all entities, I can simply make it a global in that new class. I tried instancing many entities sharing the same SpriteRenderer component, and it worked very well. Each entity passes its own state to the sprite renderer, which will draw different animation frames according to the current entity’s state.

    Cons: Not very flexible from a game design perspective, can’t create new gameplay elements through a visual editor if those elements’ classes don’t already exist in code. Requires re-compiling every time a new class is added.

    This attempt made me really appreciate all the under-the-hood effort that goes towards making game design easier in large engines like Unity, but at the same time I feel like I’m learning a lot.

    I’ll try again in the future, for now I just want to move forward with what I have. Deep copying and Serialization would be great items to be included in Monkey2’s road map, with practical game development of complex projects in mind.

    Cheers!

    in reply to: Instancing entities with components #6813

    Ethernaut
    Participant

    Thanks for the replies!

    Out of curiosity, what’s missing from the current Reflection system? I’ve only dabbled in it, but it seems like you can access all fields from a class. Couldn’t a serializer be written with the current available features?

    try using structs but as Mark suggests put the struct in another file (ideally on its own) why having its own “compilation unit” should help is just one of the “delights” of c++

    I tried, still get the same compiler error. Also tried “New AppInstance” to make sure Image was initialized, no luck.

    in reply to: Struct still crashes in some cases #6797

    Ethernaut
    Participant

    Yeah, this doesn’t even compile, so I think it’s something else. There’s no App.Run in this minimal example, but when I first ran into it I had a proper AppInstance.

    in reply to: Mark – thoughts on help (with example) #6771

    Ethernaut
    Participant

    The main thing I’d like to see in M2’s docs are very simple snippets/examples for all major classes, functions and language features. Searching the forum after “that example I remember someone posted a while ago”  is frustrating, and will only get worse as more people post more often in the forums.

    Once more content is in the docs, a better search system would also come in handy (the current one expands the tree view on the side for all results at the same time, resulting in lots of scrolling).

    Thanks!

    in reply to: Json question #6419

    Ethernaut
    Participant

    Thanks, that is helpful. This looks a bit more neat.

    I had t add the line “Local obj := c.Value.ToObject()” which essentially casts the JsonValue as an object, so functionally it’s not that different, but it’s easier to read.

    in reply to: Json question #6409

    Ethernaut
    Participant

    1.I’m trying to get rid of the casting. Is there a way to iterate the JsonObjects directly, instead of JsonValues? Which led me to…

    2.I was wondering if there’s something wrong with JsonObject.All. I get an error when I try to use it instead of JsonObject.ToObject() (which returns a map)

    Thanks.

    in reply to: Playing with shaders #6401

    Ethernaut
    Participant

    This is really cool!
    I still can’t wrap my head around GL shaders, though… the syntax is fine, but I can never understand how the stuff happening in the shader gets passed to the graphics card… like, are there pre-determined variables that do pre-determined things the driver expects that I’m supposed to use?

    in reply to: New game: Rainbow Closets #6315

    Ethernaut
    Participant

    Love the “sliced” graphics!

    Not a fan of the rotated isometric controls. Would much prefer if “up” simply went up, instead of up/right in screen space. I know this is correct in relation to world space, but since the character moves in 8 directions I would have preferred more direct controls.

    Can you give more details? Plain Monkey2, used existing libraries, etc.
    Cheers!

Viewing 15 posts - 226 through 240 (of 288 total)