Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mobs #40

Open
22i opened this issue Apr 28, 2018 · 9 comments
Open

Add mobs #40

22i opened this issue Apr 28, 2018 · 9 comments

Comments

@22i
Copy link

22i commented Apr 28, 2018

Mobs would be epic!

@XenonLab-Studio
Copy link
Owner

@22i mobs are not planned at the moment. We want to complete the engine. Thanks to Nuitka we can release independent builds (executable binaries). This will increase performance and eventually the mobs will be inserted. Thank you.

@benmoran56
Copy link
Collaborator

For things like Mobs, we will need to do a few architectural changes and improvements first. It's not hard, but as Xenon said, it's not a current priority.

Some things we need to do before adding mobs:

  1. Make a generic character class, to track positions and other attributes for living and moving things. The player could also subclass from this.

  2. Add a system for AI. To keep it easy to modify, maybe this can be a module with various AI classes.

  3. We should have a simple scripting system. This will be useful for other things also, such as trigger events. It can be done by making a simple Script class that has certain structure. All scripts can be subclasses of that.

@trevortomesh
Copy link
Contributor

I'd be happy to work on simple mobs -- I am actually hoping to use this to allow students to write their own AI, etc.

@benmoran56
Copy link
Collaborator

That would be great. Before going forward, I would like to make some architectural changes, and implement a Scripting system. I have most of this code written already, so I will try to make the changes soon.

In the mean time, we will need to create the 3D models for the mobs. In the recent version of pyglet, loading models in obj files is supported. That might be useful here.
Or, perhaps something simpler to start with? For example, the mods could just be simple movable rectangles, with different textures?

@trevortomesh
Copy link
Contributor

Is the scripting system in python? Please say it is!

@benmoran56
Copy link
Collaborator

Yes, it is. Since it's Python, it's quite trivial to implement. This is basically all there is to it:

class Script:
    finished = False

    def update(self, scene):
        raise NotImplementedError


class ExampleScript(Script):

    def update(self, scene):
        print("Hello World")
        self.finished = True

@trevortomesh
Copy link
Contributor

That'll be awesome. I am really looking forward to using this with my students in upcoming semesters!

@trevortomesh
Copy link
Contributor

I think we should just start with a cube that can be scripted to move around the world. I tried doing something with a terrain block but I failed hard.

@benmoran56
Copy link
Collaborator

I'll try to finish the architectural changes I planned first of all. After that, it should be more easy to extend things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants