Monkey 2 examples github

About Monkey 2 Forums Monkey 2 Programming Help Monkey 2 examples github

This topic contains 23 replies, has 9 voices, and was last updated by  Novoitch 1 year, 10 months ago.

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
  • #7824


    The gui things I was working on and got distracted. I wanted to continue on it later. I have not been doing a lot with monkey 2 for a while now. I hope to find tutorials or anything for the monkey 2 gui features in the future and learn then. Or when I have some motivation to spend more time to learn it. Until that I just make my own things like I always did. At the moment I use Monkey 1 if I want to make something new.

    I am not an expert/good programmer. Mostly just for fun and future investement. I use a lower case style naming for everything and the compiler has not been telling me to do it differently. I have not had problems so far. This might change in the future though.

    I know my programming is not the best 🙂 I noticed from a book recently that I converted code from it into something that was 5 or 6 times as big to do the same thing. I hope to get better at it. But this might take a decade or two 🙂

    I posted the examples here becourse I always have a difficult time starting in a new language. I know I can not be the only one.

    Feedback is apreciated though! Makes me spend more time thinking things over.



    @pakz : would you be ok if you examples are taken as a base for docs samples?



    Sure no problem. Use what you need.



    I started a new repository for monkey2 mojo3d.

    I hope to start filling it up.

    Btw – With the release of monkey2 1.1.05b there is a new debugger rule that might cause some of my older code(2d rep) to not compile anymore. I need to check everything and fix this. It has to do with methods needed to be renamed into functions.



    Hello Pakz

    I never used 3d in my codes and i am actually learning it with mojo3d.

    But I got a lot of problem, and now, I don’t find the way to apply a texture to a model from a .png image.

    Can you make a sample about textures?



    I have not gotten to learn that myself yet. I can not say when I can make this. I am sure the examples for mojo3d that are included with monkey2 must show how to do this. If not, you might be better of posting a request for an example in the main forum here. I did that once and a example was supplied real quick after that(that is the best option I think)

    I have still to fix/check everything I made before so that it works with the latest release. Have not have the time for that yet.

    When I get some time a lot more code will start to get added in the github repo. Just not have had the time yet.



    I spend about an hour or so trying to get my head around assets but I have not been able to load anything. I seem not to understand how assets work.



    Thanks for your answer

    I found a way looking at “Monkey2-v1.1.06/modules/mojo3d/tests/water.monkey2”:

    => I replaced waterMaterial type by PbrMaterial.

    => I removed the normals textures loading and removed the velocity declaration.

    => Changed “waterMaterial.ColorTexture=Texture.ColorTexture( Color.SeaGreen )” by “waterMaterial.ColorTexture=Texture.Load( “image.png”,TextureFlags.WrapST|TextureFlags.FilterMipmap )”

    => Changed “waterMaterial.Roughness=0” by “waterMaterial.RoughnessFactor=0”

    I then got a working code wich create a large box with a custom texture of “image.png”.

    But applying a texture from an image stay dark in my mind: “how do we get the texture from a code created image? have we to use an image from a file or is there an other way?” I need it to do procedural textural ( e.g. for an animated tv screen )

    Hoping my question is not ridiculous, I will think about that and if I really find nothing, then I will check the main forum.



    Feeling stupid:

    10 min after the previous post, I checked the mojo library: image have a texture property

    Just loading “image.png” with no shader and set ” waterMaterial.ColorTexture=image.Texture” works nice.

Viewing 9 posts - 16 through 24 (of 24 total)

You must be logged in to reply to this topic.