Nice work! That video series by Heartbeast is excellent. Bookmarked your repo to give it a closer look later.
Interested to see how the GDExtension in Godot 4 ends up working in practice.
at a very high level:
So at a high level you need openGL or Vulkan or direct3d to talk to your 3d card, give it vertices and shaders and textures.
But you need a window from the operating system to draw the results to, and you need some way to get input and play sound. You can either get that directly from the operating system or from cross platform apis like SDL2/GLFW or game engines/frameworks (Which in turn may use those apis, or something similar behind the scenes)
I don't know of anything that formal unfortunately, but I do have a bit of experience with ggez. There are some example games in the repo here, and the README.md at the base of the repo also has template that should be a good starting point.
Additionally, it's based off of the LÖVE framework, which has quite nice documentation. It targets Lua, but the concepts carry over to Rust/ggez quite well.
i think a good comparison is that bevy aims to be a full-featured, highly customizable engine, à la Godot or similar (not there yet but getting there), whereas ggez is meant to be more like LÖVE. in my experience ggez is great for making something 2d and relatively small, and for getting started quickly out of the box, like for a game jam.
> No way to store a borrower and a borrowed in the same struct.
Yeah! I had to make my type own a data structure for usability purposes, because this was not working.
I wanted to at least have a macro hide away the need to make two separate bindings, but due to hygiene rules I need to individually name the bindings.
I've got a number of basic tiles, for which I specify the sides where the river flows. The generator algorithm goes through an area in a scanline pattern (thus, only 1 or 2 known neighbors at each gen point). It checks the neighbors, constructs the river mask, and then randomly chooses a tile that matches the mask, taking into account possible rotations.
It's not rocket science, but took me some hours to nail it down properly. Also, the assets are from here (Thanks Kenney!)
Seconding learnopengl.com, excellent resource for trying to understand how rendering happens without getting confused with nitty-gritty details.
If you have access to a Windows machine, I might also recommend Frank Luna's DirectX11 book (yes, DX11, not DX12 as latter is way more complex) for the same reasoning, easily one of the best books out there for getting your feet wet in graphics programming.
You make one star phone games, https://play.google.com/store/apps/details?id=rust.zemeroth&hl=en_US&gl=US
I dont think the community needs you.
Aha! Figured it out! Apparently OpenGL does not like multithreading on OS X but it's totally fine on Windows.
Moving let mut star_map_server = StarMapServer::new(star_map_slot);
one line up out of the closure in client.rs
lets my Mac to run things :)
Game looks awesome! Great work!
I'm taking some of your comments to heart, and will implement fixes accordingly int the next few patches, but this library is meant to imitate the processing and p5.
I was thinking about making it a bit of both, make all the functions available both in the non-multi-threaded and easier global syntax, and duplicate the functions into the impl of the Canvas struct and have people who want to use multiple canvases or multi-threading use those functions, what do you think about that? (I'm realy interested in getting your opinion about it...)
I will definitely have to make a multi-threading and multi-canvas module on the future if I want to build a game engine using this library...
I noticed the Color::RED, do you think I should enum a few dozen colors for general purpose use or is it okay to keep it rgba/rgb/grayscale based for now?
I'm changing some functions to take in more generic types and will change the abs function.
Thank you very much for your input!
Using chromium on Ubuntu 20.04. Devblog 86 works fine though.
Here's the url I get from the post:
https://veloren.net/devblog-87/
Here's what I see:
https://i.imgur.com/XcW1uHK.png
I don't even see it in the "Latest development updates" page.
Maybe a caching issue of some sort somewhere ? I'm in France.
I don't see it on my phone either.
EDIT: working now :-) prob a cache issue
Use pacman -Ss freetype
to search for the freetype package. It's not called freetype2
. I'm not at my windows computer to check the proper name.
https://wiki.archlinux.org/index.php/Pacman#Querying_package_databases
What kind of 2D scenes? Tiled might be flexible enough for your needs and, according to the docs, it supports JSON so well that you can use it instead of the native TMX format for your authoritative copies:
> The JSON format is most common additional file format supported by Tiled. It can be used instead of TMX since Tiled can also open JSON maps and tilesets and the format supports all Tiled features. Especially in the browser and when using JavaScript in general, the JSON format is easier to load. > > The JSON format is currently the only additional format supported for tilesets.