cocon

Forum Replies Created

Viewing 15 posts - 226 through 240 (of 342 total)
  • Author
    Posts
  • in reply to: List Extensions > A clever way to filter lists. #7480

    cocon
    Participant

    After of revisiting this idea, I noticed that this actually leads to functional programming concept such as LINQ etc. From what I guess Monkey 2 will feature LINQ in the future, so I won’t plan to do a re-implementation of that. However only as an evolution of the first example, this is more of a prototype for exploring the concept further. This time I took it a step further to use Extension methods to the List class rather than writing “service classes”, this way the API becomes fluent and natural. Perhaps in the future if I get any further ideas with this it will justify the creation of a library.

    The most possible future plan in mind, is to port some little game examples (perhaps some bananas) to this style of programming and see in real terms what are the benefits. 🙂

    in reply to: Fixed Shooter #7474

    cocon
    Participant

    Nicely done!

    in reply to: Pocket Invaders anybody? #7366

    cocon
    Participant

    Great!

    in reply to: i_editor #7171

    cocon
    Participant

    I want to write an interpreter too for educational purposes.

    I have put on some study in it a few weeks now (first time ever) and I have completed the required knowledge about the tokenizer and the semantic model. The most tricky part is how to convert the token list to the semantic model… All of the implementations available use recursive function calls, which I dislike. Otherwise I will fall back to the most classic approach, peeking and checking…

    in reply to: gles3.0 vs gles2.0 for mx23d #7122

    cocon
    Participant

    A renderer API wrapper has to be made in this case, so the implementation is more flexible. This approach was done in Microsoft XNA because at that moment in time, they wanted to support both XBOX and Windows DX9.

    I have also studied a little about the source code of BGFX, it follows the same approach of API virtualization, meaning that you can create vertex buffers and stuff, and getting the low level feeling. But you don’t care whether actually the implementation behind the scenes is OpenGL or DirectX, rather than only you care about the deployment platform.

    in reply to: i_editor #6980

    cocon
    Participant

    Looks like an interesting concept, have  you written an interpreter for this?

    in reply to: sort of vague auto-ish shader idea #6966

    cocon
    Participant

    So this basically tells that if you write a special parser that understands specific source patterns, or comment tags, you would generate custom vertex attributes dynamically.

    in reply to: Mojox textview, selecting with shift behaviour #6942

    cocon
    Participant

    Yes, the reason is that the boolean condition that would allow the fix happen, is valid only for repeat events. Specifically is the way that modifier keys are processed.

    After examining these *.monkey2 files in order to understand the inner workings: view, window, app, textview. The best fix for this problem, is this one.

    Unfortunately I have to bypass the event mechanism and do a dirty hack (ignore the event checks) and rely on the Keyboard class. I am not proud of the solution, but it will work for now, until I find something else better better. 🙂

     

    P.S. Some notes on this subject _________________________________________________

    Regarding the proper “textview solution” would be fixed like this: app.monkey2 line 720

    Either by creating a new important event KeyPress (which captures both states of Down and Repeat) or the significance of Key.Repeat would be changed (changing it’s bitwise value) if it makes any sense to do so:

    I don’t know if these proposals are good or not but I though it a good opportunity to throw the ideas, and see what happens.

    in reply to: Using large XML data – 3Mbyte file #6851

    cocon
    Participant

    I would definitely be sure that 3MB is a reasonable size and that the TinyXML is solid.

    Just out of curiosity if you parse the XML file with another programming language what will happen?
    https://www.tutorialspoint.com/python/python_xml_processing.htm

    P.S. I don’t know also if there is an encoding issue as well, is the file UTF8?

    in reply to: Instancing entities with components #6850

    cocon
    Participant

    Code is from muscle memory, unfortunately is not a perfect design, as design flaws occur they will have to be solved on the spot.

    For example, just now I added “Name” + “Owner” on the IComponent.
    The reason is that for example acquiring a nitro boost component, will increase the speed of movement component. This means that the “nitro compo” will send message to the “movement compo”.

    in reply to: today I have been doing 3d physics (dynamics) #6844

    cocon
    Participant

    Very nice! Not to mention that I am a huge fan of ODE.

    in reply to: today i haz bin perlin #6757

    cocon
    Participant

    Nice one.

    in reply to: Miscellaneous Procedural Generation Code #6756

    cocon
    Participant

    This looks good.

    in reply to: Try, Catch Errors #6544

    cocon
    Participant

    Good one.

    in reply to: Is there any way to do ternary expression? #6517

    cocon
    Participant

    From what I see it’s called an “If Expression”

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