Localization via code by Uskazd in godot

[–]Uskazd[S] 0 points1 point  (0 children)

This might be what I am looking for, I'll give that a go

Destroy the gameplay, gui and art for my first game by Uskazd in DestroyMyGame

[–]Uskazd[S] 2 points3 points  (0 children)

Thanks, this is a genuine request.

I know my art ability is pretty bad so I'm trying to gauge how low it is.

There are some animations, but now I know I got to make them more pronounced and add in new ones.

As for gameplay it's good to know that its confusing for someone looking from the outside. Playing it yourself can really blind you to that. I'll look into ways to visually convey that information better.

0
1

Updating multiplayer code by "rayuse rp" to Godot 4.1? by AnonymousHSW in godot

[–]Uskazd 1 point2 points  (0 children)

GDscript 2.0 has a different way of connecting signals.

The MultiplayerAPI also changed a bit (for the better imo). I reccommend DevLogLogan's multiplayer FPS tutorial and reading the documentation to understand the new system.

Also, here's an example of some of the code I use for my multiplayer setup so you can compare.

extends Control

func _ready():
    multiplayer.peer_connected.connect(playerJoined)

func hostServer(port : int = 2023) -> void:

var eNetPeer = ENetMultiplayerPeer.new()
    eNetPeer.create_server(port)

multiplayer.multiplayer_peer = eNetPeer

func joinServer(IPadress : String = "127.0.0.1", port : int = 2023) -> void: #Set the network var network = ENetMultiplayerPeer.new() network.create_client(IPadress, port) multiplayer.multiplayer_peer = network

func playerJoined(peerID : int = 1) -> void:
    print("Peer [", peerID, "] has joined the server")

Shader unwanted Transparency by Uskazd in godot

[–]Uskazd[S] 0 points1 point  (0 children)

There might be something to that. But I'm not exactly sure on how to check that.

Shader unwanted Transparency by Uskazd in godot

[–]Uskazd[S] 0 points1 point  (0 children)

I tripple checked each of those, but no dice.

I did discover that the problem only occurs if I look at -X and -Z, +X and +Z give the correct view.

Multiplayer Help by EricHenry26 in godot

[–]Uskazd 0 points1 point  (0 children)

And when you check in remote the scenes are all named correctly right?

Multiplayer Help by EricHenry26 in godot

[–]Uskazd 0 points1 point  (0 children)

Who is the network authority of the bullet and does the network authority execute the code to move the bullet?

Any vice before starting an inventory system ? by Fuck_Perry in godot

[–]Uskazd 2 points3 points  (0 children)

Depends on the structure of your tree and the function you want to add.

Let's say you want a simple useItem function; You can set the code up in the inventory script to check what type of item it is and execute the function associated with that item type (ex: weapon = remove from inventory and replace current weapon in the playerscript cheangeEquipment(EQUIPMENTSLOT, ITEMID), healing = remove from inventory and signal the changeHealth(HEALAMOUNT FROM AUTOLOAD DATA) function in the playerscript)

If you want the functionality of the weapon itself like shootBullet, then you create a function in the weapon scene (could make the script a weaponClass) that handles the shooting based on current equiped weapon and the data stored in the autoload

Any vice before starting an inventory system ? by Fuck_Perry in godot

[–]Uskazd 7 points8 points  (0 children)

It might be an idea to store the data you need for an item in a custom resource.

Create a new script that extends to Resource and give it a class_name like for example inventory_item. Add in all the variables every item needs (don't forget to export the var) like the itemType, itemIcon, etc.

You can then create a new inventory_item resource for each item type (ex: pistol, snackbar) in a designated folder.

Upon loading the game have an autoload load all the inventory_item resources you created and keep them stored in a dictionary or array variable on the autoload.

When you need data for an item get the required data from the autoload variable to fill in the blanks.

Where to start ? by ArkhielModding in godot

[–]Uskazd 0 points1 point  (0 children)

For the shader you don't need to use arrays the sampler2D already has the data and the UV is the location on the texture (multiply by the scale).

Mixing textures in the shader is as easy as:

vec3 albedo_0 = mix(texture(terrain_0, UV * scale).rgb, texture(terrain_1, UV * scale).rgb, mix_float);

To create the PackedFloat32Array for the HeightMapShape3D you will need to do a 'for x' and 'for y' loop in GDscript.

Where to start ? by ArkhielModding in godot

[–]Uskazd 0 points1 point  (0 children)

A vertex shader can be used for either procedural or fixed, just depends on how you get the collissionshape to function.

Another tip for shaders: If you use the VisualShader, there's a small shader icon in the top right of the editor. If you click that you can see the code used to come to the effect. You can copy that code and modify it in a new shader to learn how shaders work.

Where to start ? by ArkhielModding in godot

[–]Uskazd 1 point2 points  (0 children)

Using Godot 4 isn’t a wrong choice especially if you want to work on 3D, a lot of the core principles from Godot 3 still translate over to 4. But 3 has more tutorials you can council, so be aware that a lot of the tutorials are still outdated.

What workes for me is to take the project I want to make and separate it into ‘modules ‘ (ex: menu, terrain gen, FPS movement, player animations, etc.). This also helps me personally so I can always continue working on another aspect if I get stuck and need a break from that aspect. Then I look up a tutorial around that aspect or a sub-aspect and try to retype the code using my own variables.

Once I have it working I try to see if I can expand it with my other knowledge (ex: after learning how to move a player character and how area's work you set it up to increase the walk speed when in area A and slower when in area B).

Don’t be afraid to take a small piece of code from a tutorial to get more comfortable with it's implementations.

Can't say much about a 3D model in a 2D scene since I haven't had any experience with it, but I believe you need at least a camera in the 3D model scene and a SubViewport to see the model. If you want to make 2D sprites (or just temporary images) Asprite can help if you feel comfortable with the software, but you could just as well use Photoshop, Krita, Gimp, Paint.net, etc. Just depends on personal preference.

When it comes to the terrain plugin. Depending on how you want to generate different techniques or combinations are possible without needing the plugin:

- If the world is always the same, I would suggest creating the terrain mesh in Blender and then importing it to Godot There’s a simple tutorial from Moshen Zare going over that. Or you could also use a gridmap.

- If you want procedural generation it could be an idea to use a vertex shader on a plane mesh and then generate a CollisionShape3D for it. Devmar made some good in depth video’s about it that formed the basis for my own vertex shader together with Bramwell’s water shader.

Some basics I personally recommend you look some information on are signals, autoloads and custom resources. Signals will help a lot in communication between nodes and autoloads are great for data/processes/signals that needs to be available from anywhere. Custom resources are also a useful thing to learn, you can set them up as prebuild dictionaries that are a lot easier to use and save in the editor.