Coder Social home page Coder Social logo

godotlevelelementsoneditortree's Introduction

Compose game elements on editor tree

Wouldn't it be nice to have a bunch of enemies, and a bunch of bullets and compose them on level design time on the editor?

That's my goal with this project.

What can I expect?

A prof of concept. Just wandering about Godot Game engine, trying to figure out how to compose a level with maximising the options with the developed resources.

The state, thought is far from finish and it is not working. I am facing here some problems and asking for help to figure out how this can be acomplished.

What has been done then?

There are a couple of enemy types, coupe of weapons and those are meant to be spawn dynamically and also configurable in level design time.

Discarted paths

Node.duplicate()

This methods has been actively discouraged by Godot developers

Besides some references are lost on spawning process.

Current strategy

Ok, now that we know what didn't work, what's the current approach?

PackedScene.instance()

It took me awhile until I was able to instance a packed scene from a child node. This can be found in res://core/Library.gd but this has also some caveats.

Didn't you mention Level design?

This approach has the problem that all work with the fine tune of our enemies and bullets in level design phase are lost.

It also took me a while to figure out how to copy those scripts variables to the new instance.

But this only solve part of the problem.

Those configurations that aren't part of the script variables are lost.

Copying all parameters can be drawbacks unexpected. So far I have only code to copy Script variables and Collision layers and mask (Enemies were blowing up themselves before that)

Other nodes that we add, in order to configure our game element in the scene are also lost.

I did tried to instance all subnodes but this is not a direct path since our subscenes can be made of other subscenes and those aren't ment to instantiate again. This can be accomplished but I can't think in any free problem way.

Licence

All code and files that don't belong to Godot are under CC0 licence.

godotlevelelementsoneditortree's People

Contributors

texaco avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar Karol Tomaszewski avatar

Forkers

boyquotes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.