bradley-mcfadden / untitled_space_station_game Goto Github PK
View Code? Open in Web Editor NEWUsing Godot Engine to play around with
Using Godot Engine to play around with
I want to have guns in the shop that are able to be purchased. First, Guns need to be items that can be picked up from the Pickup events.
Enemy script and scene needs an overhaul.
Change type to AnimatedSprite
Make CollisionShape2D a child, not instanced in code
Reason for this change is to allow materials to easily be applied to enemies and any children of enemies.
Follow GDScript style guide where possible:
https://docs.godotengine.org/en/3.1/getting_started/scripting/gdscript/gdscript_styleguide.html#static-typing
Use tabs instead of spaces for indentation levels
Make sure continuations have two tabs to indicate the continuation
Separate functions and class definitions with two lines
One statement per line
Avoid unnecessary parentheses
One white space around operators and commas
PascalCase for classes and nodes
snake_case for functions and variables
Prepend a _ to _virtual_functions()
signals in past tense
Constants in CONSTANT_CASE
Type inference where possible like this var chevy: Car = get_node("Chevy")
This ":=" operator will infer type from an initialized value
Use safe lines to ensure ambiguous lines are type-safe
Not every script needs to extend Node, and this may be a waste of memory. Remove unnecessary Node extends and replace with something smaller, like Object.
Finish documentation in Map.gd, Drawing.gd, RoomGenerator.gd.
Add outline of neighbour rooms, and do the same for edges when entering a new room.
Add icons for chest rooms, for spawn, and for shop. Think of the icons from Gungeon for inspiration
It is a bad coding convention to have very long methods. I would like to go through all my scripts and break up long functions (see RoomGenerator.gd) for clarity's sake and ease of revisiting.
Gun inventory should track all the player's guns without creating new instances of a type of Gun each time the player switches weapons.
Gun inventory should be like a wheel that can be iterated through.
Guns with no ammo should be removed from the gun inventory.
Make an active item script that instead of the passive Item classes's effect function, on pickup a function is passed to Player that can be called. Store the function using something like:
var ref = funcref(hello_object_instance, 'hello') ref.call_func() # prints 'Hello' takes_func_ref_to_call_later(ref) # later, prints 'Hello'
Use _physics_process when one needs a framerate-independent deltatime between frames. If code needs consistent updates over time, regardless of how fast or slow time advances, this is the right place. Recurring kinematic and object transform operations should execute here.
While it is possible, to achieve the best performance, one should avoid making input checks during these callbacks. _process and _physics_process will trigger at every opportunity (they do not βrestβ by default). In contrast, *_input callbacks will trigger only on frames in which the engine has actually detected the input.
One can check for input actions within the input callbacks just the same. If one wants to use delta time, one can fetch it from the related deltatime methods as needed.
Make two new Node2D's where Coins and Bullets are contained. This will be under RoomGenerator in Hierarchy and will allow for material placements on RoomGenerator to trickle down.
Reload feature should call ReloadTimer.start() on the button press
Run the code, go back through debugger and clean any used variables up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.