• Welcome to droqen's forum-shaped notebook. Please log in.

[amb] Score Engine

Started by droqen, June 03, 2023, 07:11:27 AM

Previous topic - Next topic

droqen

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...

droqen

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?

droqen

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!

droqen

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.

droqen

#4
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


droqen

Players have separately tracked "points" values and I finally can do some basic string manipulation in Rust! That's a win.

droqen

---
Changing gears to produce a more interesting 'system' to observe and react to. Ultimately still going to come back to score engine. First: BOIDS

droqen

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.

droqen

* expose server->client component as message?

droqen

#10
* 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

droqen

#11
* 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 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

droqen

* cargo toml at root of directory containing projects, that makes one target directory, you'll only get 1.5GB once
* Rust "workspace"