Page 3 of 3 FirstFirst 123
Results 41 to 48 of 48
  1. #41
    My point was that in "def update(self):" you're in complete control of all state of the program (if not using threads). X may be modified before or after the execution of your function but only you can modify it inside it.

    But yeah, I don't like generators neither.



  2. #42
    Member WKnight02's Avatar
    Join Date
    Aug 2017
    Location
    Earth
    Posts
    128
    Originally Posted by elmeunick9 View Post
    My point was that in "def update(self):" you're in complete control of all state of the program (if not using threads). X may be modified before or after the execution of your function but only you can modify it inside it.
    In a nutshell, you could write a shitty coroutine/generator allowing outside variable modification, when any object's member can also be accessed from outside and would put your "controlled state" out of order



  3. #43
    Originally Posted by WKnight02 View Post
    In a nutshell, you could write a shitty coroutine/generator allowing outside variable modification, when any object's member can also be accessed from outside and would put your "controlled state" out of order
    And that's exactly why I don't like them. If you don't ever use them in your project, then you can garatee this controlled state. But, well, after all I supose it's just a matter of preferences.



  4. #44
    Member WKnight02's Avatar
    Join Date
    Aug 2017
    Location
    Earth
    Posts
    128
    Originally Posted by elmeunick9 View Post
    And that's exactly why I don't like them. If you don't ever use them in your project, then you can garatee this controlled state. But, well, after all I supose it's just a matter of preferences.
    But what I meant is that even with an object oriented state controller you can access its inner variables from outside (Python's lack of private/protected/public). Not that its bad, but the problem is exactly the same, and the fix relies on your ability to write code that makes sense.

    Indeed it seems like a matter of preferences. So I implemented something people could prefer in place of an other system, I think it will be a good point in the long run.

    Also, the system is currently hybrid: you can work full callback, and/or use coroutines. Pick what you prefer



  5. #45
    Member Benny_Flex's Avatar
    Join Date
    Mar 2009
    Location
    Vancouver
    Posts
    338
    @WKnight02 Thank you for sharing the .blend. If I understand well you link a python script to an alway brick instead of using the logic bricks?

    I am eager to see more.



  6. #46
    Member WKnight02's Avatar
    Join Date
    Aug 2017
    Location
    Earth
    Posts
    128
    Originally Posted by Benny_Flex View Post
    @WKnight02 Thank you for sharing the .blend. If I understand well you link a python script to an alway brick instead of using the logic bricks?

    I am eager to see more.
    I'm happy to see you interested !

    Basically, the thing is that I am trying to propose a way to make your game using Python only, using a higher level API than what is currently available. But as of now, the BGE needs at least an always brick and a Python controller to trigger any script. But once the framework entry point is executed, everything can flow in Python.

    I'm currently trying to make a demo for the BGMC, but I hate doing game assets lol. So I don't know if I'll come up on time, but I will certainly have something to show !



  7. #47
    Member BluePrintRandom's Avatar
    Join Date
    Jul 2008
    Location
    NoCal Usa
    Posts
    18,333
    go with sintel assets WKinght
    also Jonny Blacks dead project assets -

    1 original - https://blenderartists.org/forum/sho...etc&highlight=

    Current / https://opengameart.org/content/3rd-...er-sci-fi-pack
    Last edited by BluePrintRandom; 16-Nov-17 at 21:21.
    Break it and remake it - Wrectified
    If you cut off a head, the hydra grows back two.
    "headless upbge"



  8. #48
    Member WKnight02's Avatar
    Join Date
    Aug 2017
    Location
    Earth
    Posts
    128
    Originally Posted by BluePrintRandom View Post
    go with sintel assets WKinght
    also Jonny Blacks dead project assets -

    1 original - https://blenderartists.org/forum/sho...etc&highlight=

    Current / https://opengameart.org/content/3rd-...er-sci-fi-pack
    Thanks for the resources ! Although I was more looking for a Tron ambiance

    -----------------------------------
    UPDATE NOTES

    Ok, so trying to keep the weekly devlog, this week was mostly about house cleaning of the code. I also tried to make something for BGMC 26, and it made me learn some few things about bgez:

    1. Despite having thought about stages and logic execution that would be scene-specific, some transition behaviour were undefined: stage transition for example is not quite possible as things are right now. The question is how we should see a stage, should I allow multiple stages objects to be running at once, or making it so there is only one stage at any time. Also I need to manage the libloading/libfree between the stages, I just didn't implement it before hand. Time to do it this week !

    2. The event system is not so bad, but it's really feeling like JS when using it, which in my opinion is not a really a good point. I need to iron it out a bit to understand how to properly use it. Right now it gets things done, its really useful, but I've been using it a bit in a silly way, so the blame is on me as a user.

    3. The framework allowed me to think about how the game should play, and not really how to implement it, so that's exactly what I was aiming for ! Success there.

    With this in mind, I think I know where to work from now on:

    - Continue for a bit my BGMC game in order to get to the point where I need stage loading, so that I can encounter the "right problems" in order to implement a good way of managing libloaded resources.

    - Keep thinking about the pattern I'm using where each manager functions are triggered once per scene, from the same object. This is a good idea in the way that it allows to have access to the context of each scene, but the filtering is a bit weird to do. From entities its as easy as:
    Code:
    def post_draw(self, scene):
        if scene is self.scene:
             print("myScene!")
    But in other cases its not really clear for me how to correctly use it, its definetly usable, but it feels a bit weird. I think its just a matter of finding the right way to think about it.

    - The past points are the rather boring stuff. In order to have a bit of fun, I'm also thinking about gameobject serialization. The idea is that we can't really store gameobjects, although we can store some defining properties, like position, scale, speed, gameprops, and maybe other user values. I'm looking at it.

    - Also, networking. Thanks to the event system I implemented last week or so, and some Python builtins modules such as "selectors" and "struct", I really feel like it is at hand's reach ! Although I still prefer to really smooth out the things that would need it before working on networking, being as close as bgez is now is really tempting me to think about it. I would expect some first iteration during the next month.

    -----------------------------------
    BGMC 26 - Prototype:

    Thread: https://blenderartists.org/forum/sho...C-26-Prototype
    Last edited by WKnight02; 20-Nov-17 at 19:18.



Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •