droqen's forum-shaped notebook

DevLogs => Active Projects => Topic started by: droqen on June 03, 2023, 07:11:27 AM

Title: [amb] Score Engine
Post by: droqen on June 03, 2023, 07:11:27 AM
I'm starting a new project this morning. At its simplest, I want this to be a game about . . . score. Multiple players share space, influenced and incentivized by the score engine. That's really the heart of a multiplayer game! For now, I think I'll start with a simple "SNAKE" control scheme.

Ah, but I really really really don't want this to have the vibe of an "io" game. So we'll see how to get away from that. The point of this game isn't actually the competition, but the social dynamic, the complex social fabric, produced...
Title: Re: [amb] Score Engine
Post by: droqen on June 03, 2023, 07:41:22 AM
Something I've run into is that I have some concepts I re-use, often. The camera, the player-object that can be controlled, etc. The method for creating these each time is relatively involved, spanning many lines across multiple files. I wish there was a better method! Or, I wish I was more empowered to simplify this workflow!

Godot's custom nodes and prefabs are great, self-contained things that allow me to simplify something functional into a node of highly reduced complexity (both of implementation and within the hierarchy) once I have it working.

Even if I were to make a `make_x` function, I'd have to set up messages in ambient.toml and subscriptions in client and server. Is there a way some large concept could be defined all in one place?
Title: Re: [amb] Score Engine
Post by: droqen on June 03, 2023, 09:38:29 AM
Whoo. Okay, so I quickly threw together a lot of code without testing it first, and I'm past the point of celebrating every successful build.

. . . Well, maybe not quite past that point ;) Anyway, if all goes well I'll have players that spawn, and can move around, and can collect coins. Oh, wait, but I haven't made or spawned any coins. Hold on, stop the presses!
Title: Re: [amb] Score Engine
Post by: droqen on June 03, 2023, 09:46:51 AM
REPORT:
Forgot several imports (as usual).
Left out a semicolon.
Forgot to cast some ints to floats.
Forgot to give types to parameters of a function (oops).
Forgot to give an entity a component at spawn-time, so set_component threw an error (that's almost nice, but kinda glitchy).
Forgot to call a function that I defined myself.
Title: Re: [amb] Score Engine
Post by: droqen on June 03, 2023, 09:47:11 AM
I also made the player move way too fast, but it did run at last :)

edit :: OH NO. I didn't disable autoemojification of my text smilies. Horrible
Title: Re: [amb] Score Engine
Post by: droqen on June 03, 2023, 10:28:02 AM
(https://i.imgur.com/nBRSOvg.png)
Title: Re: [amb] Score Engine
Post by: droqen on June 03, 2023, 10:28:26 AM
Players have separately tracked "points" values and I finally can do some basic string manipulation in Rust! That's a win.
Title: Re: [amb] Score Engine
Post by: droqen on June 04, 2023, 07:15:27 AM
---
Changing gears to produce a more interesting 'system' to observe and react to. Ultimately still going to come back to score engine. First: BOIDS
Title: Re: [amb] Score Engine
Post by: droqen on June 04, 2023, 10:14:18 AM
It works, it works! I did get stuck: Implementing boids went well ("swimmingly," one might say, ha ha ha), but i couldn't figure out how to implement a slider for controlling boids parameters. That seemed like a very cool thing to potentially be able to do, so I'll have to ask Fredrik about it tomorrow.
Title: Re: [amb] Score Engine
Post by: droqen on June 05, 2023, 07:27:42 AM
* expose server->client component as message?
Title: Re: [amb] Score Engine
Post by: droqen on June 05, 2023, 07:29:13 AM
* clientside raycast issue? (future)

* try making concepts https://ambientrun.github.io/Ambient/reference/project.html#concepts--concepts

* try React with Hooks, if I find a good video send to Fredrik

* Windows Forms https://ambientrun.github.io/Ambient/reference/ui.html#layout
---- bottomup Flow
---- topdown Dock
Title: Re: [amb] Score Engine
Post by: droqen on June 05, 2023, 07:41:17 AM
* positioning 3d objects - import from Blender, or build out a simple object placement tool
Blender - we want to have that anyway

     * quaternion math, rotation in local space

* build your own editor for each game

use glam https://docs.rs/glam/latest/glam/
*** get quaternion (https://docs.rs/glam/latest/glam/f32/struct.Quat.html#method.from_rotation_arc) from difference between two rotations
*** get rotation from difference between two points

* joints?
https://docs.rs/ambient_api/latest/ambient_api/prelude/physics/index.html
https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxguide/Manual/Joints.html
Title: Re: [amb] Score Engine
Post by: droqen on June 05, 2023, 08:09:29 AM
* cargo toml at root of directory containing projects, that makes one target directory, you'll only get 1.5GB once
* Rust "workspace"