Giter Site home page Giter Site logo

hopson97 / open-builder Goto Github PK

View Code? Open in Web Editor NEW
690.0 33.0 81.0 14.48 MB

Open "Minecraft-like" game with multiplayer support and Lua scripting support for the both client and server

Home Page: https://github.com/Hopson97/open-builder/projects/3

License: GNU General Public License v3.0

CMake 9.92% Shell 1.37% Batchfile 0.22% Python 0.25% Lua 5.42% GLSL 1.20% C++ 80.97% C 0.65%
cpp opengl sfml enet minecraft voxel game lua scripting youtube-series

open-builder's Introduction

As of ~April 2020, I stopped working on this project for several reasons.

The way I created this was quite "over done" to the point it got hard to work out how to add new features, perhaps due to trying to be an engine rather than a game. However, I am interested in one day revisiting this concept, however perhaps in a different repository rather than this one.

Open Builder

Linux C/C++ CI macOS C/C++ CI

Open source Minecraft-like voxel sandbox game with multiplayer support.

More information about the project can be found in the Open Builder Wiki

This was made mostly for a YouTube series which can be found here: Lets Code A Multiplayer Voxel Game

Compiling/ Running

Windows With Visual Studio

MacOS With CMake

Linux With CMake

Project Structure

A quick overview of the code and project structure can be found in the wiki article:

Project Structure

Contributing

Please see main article here:

Contributing

Screenshots

Terrain gen:

player

Early screenshot: player

Similar Projects

This project was heavily influenced by the following projects:

Minetest

Another open source voxel sandbox game, one of the original ones. Also created using C++, and also has multiplayer support.

Website - GitHub

Terasolgy

Open source multiplayer voxel sandbox game created using Java like the original minecraft.

Website - GitHub

Craft

Minecraft clone created by Fogleman in C.

Website - GitHub

Special Thanks

D3PSI - Added GitHub actions, and created the install.sh file to automate the installation process on Linux systems

CalvinSpace - Created a lot of the textures for the blocks

History

Originally, this was going to be a Zombie game, but I got very bored of that very quickly, and so changed the project to be a voxel game instead.

As a result of this, the code was created for the zombie game, so when I decided to switch over, the code got messy very quickly.

To combat this, I did a massive refactor in just over 2 weeks, re-creating large parts of the project.

The before-refactor-project can be found here

The commit that adds the refactored code can be found here

open-builder's People

Contributors

badcomoc avatar bluppie05 avatar by77er avatar caseymcc avatar chillerdragon avatar connorjwalker avatar d3psi avatar filippalusinski avatar georgew79 avatar gml16 avatar grant-rez avatar grossodev avatar hectorpeeters avatar hopson97 avatar human-0 avatar janvanbouwel avatar kdotjpg avatar kiroma avatar liz3 avatar lostquasar avatar mendoza avatar pmauldin avatar qookei avatar rehwinkel avatar remuzel avatar romanwojciechowski avatar ruixel avatar underdiskdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-builder's Issues

Item support

Describe your suggestion

Adds support for items in the game, as in things the player is able to store in their inventory and hold.

This is a pretty huge thing covering a lot of areas

As far as I can work out, there are 6 item types (Anyone think of anymore?)

  1. Voxel items - Things that are able to placed in the world
  2. Tool items - Things that have some kind ability
  3. Materials - Things that have no ability, and cannot be placed, but can be used as a crafting recipe
  4. Consumables - Things the player is able to consume, (potions, food etc)
  5. Ammo - Things that are used by tools somehow

However, some items would have some overlap in these categories (Eg a "wood" block is both a material and a voxel), so would need some way to deal with this.

On top of this, every time would need to have some kind of "GUI" representation as well, so the player is able to see it in their inventory.

Some item types would be able to be automatically created from other things, for example adding a new voxel type to the game would add a corresponding item.

Implementations ideas [optional]

Create/ Register item types in Lua, somehow automatically does the rest behind the scenes? Not sure

Ray inaccuracy when selecting/breaking blocks

Bug Name

Ray inaccuracy when breaking/placing blocks

Describe the bug

When a user points their camera to the edge of a block, sometimes the ray goes past it and chooses the block behind it. This is most obvious with the new selection box feature, and can cause flickering when picking between the two.

To Reproduce

Clone and compile, find a block nearby and move your cursor to the edges of the blocks.

Expected behavior

The block in-front of the camera should be highlighted, yet it's not. ๐Ÿค”

Screenshots

https://imgur.com/a/LmxHNIW

Desktop (please complete the following information):

Windows, compiled with VS

Additional context

none

Mouse behaviour when unlocking mouse

Originally, after unlocking mouse, the mouse gets teleported back, even when it is not in the window.

After #25 this still happens but only if the y-position is below the top border of the window. The fps camera also moves to the side because the last mouse position doesn't update

Reproduce: press L key, move mouse off window, press L key again. If mouse is above top border, nothing happens, when mouse moves down, it gets teleported onto the screen and the camera jerks.

This is a fix for this.

Discussion: Big client refactor

What I want to do is refactor a lot of the client code.

Right now basically the entire client game is handled by a single class that can found here:client.h

This is slowly becoming/ is a God Object/ God Class, meaning it is responsible for way too much.


It works fine, and I am low key afraid to change it as right now it is pretty easy to do things, but of course this can rapidly get out of hand.

It has the following responsibilities, all to do with gameplay:

  1. Connect the client to the server
  2. Handles player input
  3. Handles incoming network packets from the server
  4. Handles sending outgoing packets to the server
  5. Loads all the shaders of the game
  6. Handles chunks
  7. Renders players of the world
  8. Renders the world itself

Although this works, I feel it is doing a bit too much and so want to find a way (if possible) to split out the responsibility a bit, as eventually, this would just become a huge multi-thousand line class.

What I propose is some kind of refactor, with the intent to be that the rendering, netcode, world code etc should be split out as their own class.

This would also make it easier to delegate responsibilities in the client lua code.

For example, right now it simply wouldn't be possible to make a button for a main menu that creates a new world*, whereas if this is done correctly it could be pretty easily done while not violating things like SOLID or whatever.


*where create a new world:

  1. Pop main menu gui
  2. Push loading GUI
  3. Starts a local server
  4. Connects the client to the server
  5. (Maybe have a callback to detect the client has successfully connected to the server?)
  6. Pop loading GUI
  7. Push HUD/In-Game GUI
  8. Etc?

The steps listed above seems like a good initial goal for this, which I am currently working on.

Definitely open to ideas on how to achieve more maintainability for the client code, which is what this issue is for :)

(And later, server code)


Other ideas/ Notes (just 1 for now lol):

Opening a chest, how could this work?

  1. Player right clicks a chest
  2. Server receives a "block interaction event"
  3. Server sees it is a chest
  4. Server sends back request to client to open the "chest GUI"

Make the client not launch until server is ready

Suggestion Title

Make client not launch until server has finished starting

Describe your suggestion

Right now there is a 500ms dselay in the launchBoth function in main.cpp, but sometimes this means the server has not finished setting up before the client has launched, meaning the client doesn't connect

Work Arounds

There are 3 work around for the time being:

Build and run in release modd

This will make the world generation faster, meaning the server will actually be ready before the client starts.

sh scripts/build.sh release
sh scripts/run.sh release

Run the server and the client separately

sh scripts/run.sh -server 4

#wait a few secs, then on another terminal

sh scripts/run.sh -client x

Edit the code a bit to increase the delay

In main.cpp there is a function called launchBoth

This is the function that will launch the server on one thread, wait about 500ms, and then launch the client.

You can increase the number in the sleep_for function call to mitigate the issue.

Cleanup the Cmake

The CMakeLists files of this project is kinda messy, mostly due to my limited understanding of the topic.

So they definitely need to be cleaned up at some point

Ctrl-D in server console

When hitting Ctrl-D in the server console on linux, the server keeps printing "> " to the screen until the server is manually terminated. This is a problem because of the EOF being send by the terminal.

Steps to reproduce:
./scripts/run.sh -server 8
Then press Ctrl-D

Screenshot:
Selection_017

Potential solution:
if (line == "exit") {
Could get replaced by
if (std::cin.eof() || line == "exit") {
which solves the eof problem

Allow player "model" to have separate top/bottom/side textures

Suggestion Title

Better Player Textures

Describe your suggestion

Right now the top/bottom of the player model is a "squashed" version of the player side/body texture.

Ideally, they would have different textures.

Implementations ideas [optional]

Probably a texture atlas, seeing as the player sides are different size from their top, so an array texture would not be possible here.

Finding blocks to check for intersections

Hi,

I recently started a similar project and wrote a different algorithm for finding removal/placing blocks than you in your one-week challenge. If you want you can take this code:

bool compare(float one, float two, bool less) {
 if (less) {
  return one < two;
 } else {
  return two < one;
 }
}


// Get Position
 glm::vec3 &pos = camera.Position;


 // Get Direction
 glm::vec3 &direction = camera.Front;


 Ray ray(pos, direction);


 // Get current chunkblock
 float posX = pos.x;
 float posY = pos.y;
 float posZ = pos.z;


 // Get potential penetrating blocks
 // Get end point
 glm::vec3 endPoint = pos + (direction * RAY_LEN);


 bool xDirPositive = direction.x > 0;
 bool yDirPositive = direction.y > 0;
 bool zDirPositive = direction.z > 0;


 float xIncr = xDirPositive ? 1 : -1;
 float yIncr = yDirPositive ? 1 : -1;
 float zIncr = zDirPositive ? 1 : -1;


 std::vector<std::array<glm::vec3, 2>> boxesToCheck;


 for (float x = posX; compare(x, endPoint.x, xDirPositive); x += xIncr) {
  for (float y = posY; compare(y, endPoint.y, yDirPositive); y += yIncr) {
   for (float z = posZ; compare(z, endPoint.z, zDirPositive); z += zIncr) {


    int intX = static_cast<int>(x);
    int intY = static_cast<int>(y);
    int intZ = static_cast<int>(z);
    glm::vec3 intVec { intX, intY, intZ };


    int intCeilX = intX + (x < 0 ? -1 : 1);
    int intCeilY = intY + (y < 0 ? -1 : 1);
    int intCeilZ = intZ + (z < 0 ? -1 : 1);
    glm::vec3 intCeilVec { intCeilX, intCeilY, intCeilZ };


    boxesToCheck.push_back( { intVec, intCeilVec });
   }
  }
 }


// Your AABB intersection checks

Server not reachable

Bug Name

Engine exited with error: "Connection to server could not be established"

Describe the bug

The game doesn't start at all.

To Reproduce

Steps to reproduce the behavior:
Just start the run.sh file

Expected behavior

I expected the game to start

Screenshots

Bildschirmfoto 2020-01-18 03:02:55

Desktop (please complete the following information):

  • OS: Linux Kali 2019.4

Additional context

It's a complete fresh install of everything

Use seed for world generation

** Suggestion Title **
Using a seed to create different world gen

** Describe your suggestion **
Right now the world generation is the same every single time
However to be more interesting, it would be better if a seed were somehow used to create different results

** Implementations ideas [optional]**

Not sure

Make the config file generated rather than always existing

Suggestion Title

Config File Generation

Describe your suggestion

Right now the config file (config.obd) always exists.

However, sometimes it is accidentally added in the git commits (by me lol)

It would be better

  1. The config file could be .gitignored
  2. This means the config file would not exist sometimes
  3. This means it would be to be auto-created if it doesn't exist

Implementations ideas [optional]

Some kind of ifstream and maybe a bit of the file system api

Suggestion: Don't use trilinear interpolation for terrain generation.

** Suggestion Title **
Don't use trilinear interpolation for terrain generation

** Describe your suggestion **

Noticing commit c2b95e4 from yesterday.

I would recommend not to use trilinear interpolation for terrain generation in this project, if you are able to consider such. Perlin and trilerp might be the biggest visual detractors to Minecraft's terrain generation. They are worth avoiding rather than emulating, in my opinion. I do see that you are using glm::simplex instead of glm::perlin for the 2D heightmap, which is great. But trilerp can tarnish the results of even the best noise generator or terrain formula, because it breaks the continuity of slopes and introduces a visible grid pattern. I think the community needs more counterexamples to trilerp, than they need more examples of it.

I put together a quick Minecraft mod a few days ago, to demonstrate a counter-example to the trilerp speed optimization. I haven't run performance metrics on it yet, but the approach doesn't feel any slower than Vanilla trilerp when generating or exploring worlds. The key optimization is to start with the height-based threshold, and any 2D noise that can be pre-generated per column. Then, generate the successive octaves of 3D noise only when you know that (current generated value so far) + (max range of the rest of the octaves including current octave) can possibly cause a cross between a positive and negative final value, i.e. block or no block. If it can't, stop generating noise at that block. Most blocks will get ruled out before any noise is generated, because the height-based threshold precludes noise from affecting the block state at all. Then many will get further ruled out after the first octave. The other difference compared to Vanilla MC is that 16 octaves was more than necessary. Only 4 or 5 octaves were really needed.

See code example: https://github.com/KdotJPG/Simply-Improved-Terrain/blob/af61d86022d48fd32fddbe05e87aabaffdc591b8/src/main/java/jpg/k/simplyimprovedterrain/world/gen/NoiseChunkGeneratorImproved.java#L403

The example at the link demonstrates this concept as adapted to Vanilla's terrain generation formula. It would be a simpler case to apply it to a single set of summed noise octaves.

Trilerp (Vanilla MC)
image

No trilerp. I used a bi-spline for Vanilla biome grid interpolation because I had to interpolate it somehow, but the actual terrain is full-resolution noise.
image

6-Sided Character Texture

I have a 6-Sided Texture I made for the Player, however, I cannot make a Texture Atlas for it, so someone else needs to do that.

cmake version issue

Just cloned the repo on my Ubuntu distro - when I try to run the install script I get a cmake verision error:

CMake 3.10 or higher is required. You are running version 3.5.1

Doesn't really make sense to me. Can somebody smarter than me tell me what's happening?

Breaking blocks in the world can sometimes reappear at game start

Describe the bug

When the game starts I begin to break blocks, the world would seem to load over it.

Other times this will happen when I have broke several blocks, world will load over it, and I will break a block again to find the blocks that had been broken are still broken.

To Reproduce

  1. Start game
  2. Break several blocks instantly
  3. Wait 2s
  4. World will "load over" the changes
  5. Break block
  6. It corrects itself

Expected behavior

  1. Start game
  2. Break several blocks instantly
  3. Wait 2s
  4. Blocks are still gone

Desktop (please complete the following information):

  • OS: Linux (Ubuntu), Windows 10

Negative Coordinate + Block Editing = Glitchy

Bug Name

Negative Coordinate Block Editing

Describe the bug

When building in chunks in negative coords, it can cause them to be placed in incorrect locations, see below

To Reproduce

Steps to reproduce the behavior:

  1. Start building in negative coords
  2. Observe floating blocks

Expected behavior

The gaps should have blocks in them

Screenshots

If applicable, add screenshots to help explain your problem.
image

Latency to update blocks noticeable

Describe the bug
(Not really a bug)
When a block is updated on a client (removed or added), the other client can noticeably see the latency. The latency I can observe is about a 10th of a second.

To Reproduce
Steps to reproduce the behavior:
Open 2 clients side by side, update a block on one client, observe the latency before the other client see the update.

Expected behavior
For a single, through localhost, I would expect almost no latency.

Screenshots
(Too lazy do to a video)

Desktop (please complete the following information):

  • OS: Windows 10

GUI: Checkbox widget

Describe your suggestion

Simple true/false checkbox thing for GUIs could come in very handy

Implementations ideas [optional]

Same as other GUIS:

  1. Create a gui::CheckBoxWidget class

  2. Add function to the gui::Overlay class for adding this to the gui

  3. Add Lua API for it in the lua_gui_widget_api.cpp file

Make player names rendered above player's

Suggestion Title

Player names

Describe your suggestion

Right now it is impossible to identify players of the game.

It would be pretty cool if instead the name of a player was rendered above their heads.

Implementations ideas [optional]

  1. First we need some way for every player to have a name (This is technically already a thing as the client is rand like ./open-builder -client <name here>, but nothing is done with the player name for now)

  2. Then a way must be found to render the text in 3D

  3. Clients of the game need to know the name of the players (Through the use the existing packets for notifying players when someone has joined)

  4. Finally, render it above their heads

Add support for texture arrays

** Suggestion Title **
Texture Arrays

** Describe your suggestion **
Have texture arrays would allow displaying multiple block types

** Implementations ideas [optional]**
Some kind of interface in src/client/gl/textutes.h like

class TextureArray final {
  public:
    void create();

    // return value being the "layer" added (?)
    int addTexture(const std::string& texture);

    void destroy();
    void bind();

  private:
    unsigned m_textureCount = 0;
    GLuint m_handle = 0;
};

Ability to use custom skins

A client can create their own 32x64 player texture and send it to the server so that everyone can see their skin.

My idea is to extend or separate the Entity struct to point to a texture, a network command requests or sends a player skin to and from the server. Skins should be sent in RBG24 format to avoid potential corrupted/malicious images.

Add support for mouse invert

Describe your suggestion

It would be nice to have an option in the config file so we can play the game with mouse Y invert (and maybe x?) instead of just normal.

As this is an uncommon setting to have enabled it would be defaulted to not inverted.

Implementations ideas [optional]

Have an option in config to have invert to either 1 or -1 and multiply the players change y by this value. Could also be useful for implementing sensitivity by using 0.8 or 1.5 for the invert value or something?

Remove FPS spike from updating blocks

Remove FPS spike from updating blocks

Describe the bug

Whenever a block is updated (eg. placed or removed), I experience a significant lag spike while the block is updating.

To Reproduce

Steps to reproduce the behavior:

  1. Place/remove block.

Expected behavior

I expected that the blocks would update without any impact on performance.

Screenshots

None.

Desktop (please complete the following information):

  • OS: PC
  • Graphics Card: NVIDIA GeForce GTX 1650

Water not rendering when a block is placed on top of it

Bug name

Water rendering problem

Description

When a block is placed on top of a block of water, that block of water doesn't get rendered.

To Reproduce

  1. Run the game.
  2. Go to a source of water.
  3. Place a block just above the water level.
  4. Contemplate.

Expected behavior

The top face of the water block should get rendered.

Screenshots

image

Desktop

Ubuntu 18.04

Additional context

Caused in the chunk mesh generation file.

We could check if the current voxel contains gaps on it (which will make it work with stairs, slabs, doors, etc) by adding a flag to the VoxelData struct that indicates which faces it won't fully cover.

Crosshair + overlay/ui framework

** Suggestion Title **
Implement crosshair + framework for ui

** Describe your suggestion **
Simply draw a crosshair sprite at the center of the game window, as well as a framework for easily implementing other similar elements to be drawn as an overlay (e.g. UI, HUD). Crosshair is mainly for ease of knowing what block you're looking at.

** Implementations ideas [optional]**
Possibly just define a class that's not too much more than an sfml sprite.

Not really an issue but a list of suggestions and ideas

Ideas & Suggestions

  • Store crafting data in a JSON for each recipe like fabric does as it would allow ease of modding and updating, although I'm not sure how fast reading JSON is in the long term.

  • I know this is for the youtube series but if you are serious about making this a community project creating a discord, GitHub project To-Do and some documentations would be

Document Scripting API

Document the Scripting API so contributors can easily contribute to the scripts without digging through binding code in the source files.

Render Distance / Fog

Describe your suggestion

Allow player to set render distance (in 3 directions XYZ), only rendering chunks in a certain "radius" around the player.

Optional, could use fog as well to make it appear a bit cleaner.

Optional, use "F" key to decrease/increase render distance as needed, much like older Minecraft versions for nostalgia.

Implementations ideas [optional]

The position of the camera is already being passed into the chunk render functions, this can be used to work out distance from camera.

Maybe use Manhattan distance rather than euclidean distance for slightly better performance.

Blocks rendering as wireframes instead of full blocks

Blocks rendering as wireframes instead of full blocks

Describe the bug

All of the blocks in the game were rendering as a wireframe of the block.

To Reproduce

I actually don't know. I had just restarted the build from Visual Studio because I accidentally closed it.

Expected behavior

I expected the blocks to render correctly, instead of as wireframes.

Screenshots

I accidentally pressed the Escape key on my keyboard so that I could get a screenshot of the issue.

Desktop (please complete the following information):

  • OS: PC
  • Graphics Card: NVIDIA GeForce GTX 1650

Additional context

I really don't have any idea on what is going on here.

Entity Support

Suggestion Title

Entity support

Describe your suggestion

Support for primitive entities in the game.

This is an umbrella term, referring to anything in the world with a position, and can be rendered , and updated

(mobs, items on the floor, projectiles etc)

Implementations ideas [optional]

Would have to work from Lua somehow, and have some kind of "connection" between entities on the client side and server side

test

Bug Name

(Does your bug have a name that you can use to refer to it throughout this doc?)

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Linux, Mac, PC]

Additional context

Add any other context about the problem here.

Meta: Reference docs somewhere

Suggestion Title

Doc Reference

Describe your suggestion

Recently added some docs to the docs/ folder but there's no where to actually say they are there ๐Ÿค”

Implementations ideas [optional]

Maybe mention it in the readme.md file, not sure

Indices are taking up memory instead of helping

Rendering the blocks using indices in this case is not really helping! (I have barely looked at your code and my assumptions are made mostly based on your shader)

You render a block face using 4 vertices -> 16 bytes + 24 bytes for indices = 40 bytes
You could also render a block face using 6 vertices -> 36 bytes
Just use glDrawArrays

Release Dependencies

Hi, when I try to build a Release build, it compiles, but trying to run it results in a crash, copying the "shaders" and "res" folders fixes it.

Is this supposed to happen?

Normally a debug build works fine

Mac build and run instructions

Currently, there are no build instructions for mac. Is it possible to use the linux/windows instructions? If yes, can you write it in the readme.md, or can you create a mac build instruction?

Moire Effect

Bug Name

Moire Effect

Describe the bug

When looking in the distant, sometimes circles can appear on the terrain

To Reproduce

Just looks at things far away

Screenshots

Screenshot_20200113_065323

Desktop (please complete the following information):

  • OS: Windows 10, Ubuntu LTS

Additional context

Possibly caused by wacky texture parameters on the Texture Array object (found in src/client/gl/textures.cpp)

Chunk triangle optimization

Hey Hopson, did you plan on doing the chunk optimization by yourself for the series ?
like 2 triangles per quad with the same texture instead of 2 triangles per BlockFace ?

leaves do not render while underwater

Describe the bug

While underwater, if you look above water then leaves seem to not render

To Reproduce

  1. Run game
  2. Go underwater
  3. Look at a tree from below the water surface

Expected behavior

Leaves should render if you are underwater, and looking out of the water

Screenshots

image

Desktop (please complete the following information):

  • OS: Ubuntu 18.04

Additional context

Possibility caused by transparency and render order, not sure though

Rendered text has weird artifacts

Bug Name

Text artifacts

Describe the bug

When text is rendered, there can be strange lines and such attatched to the letters

To Reproduce

Steps to reproduce the behavior:

  1. Run game
  2. Press F3 to view debug text
  3. Observe

Expected behavior

Text should be rendered cleanly with no random artifacts

Screenshots

image

Desktop (please complete the following information):

  • Windows 10

  • Ubuntu 18.04 LTS

Additional context

Potentially caused by texture atlas bleeding in the font bitmap

Compile Errors

I followed all the steps from the Building (Visual Studio) guide for Windows to be able to contribute to the project, but I still get errors while trying to compile the project.

I am getting a C1189 "#error : 'unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3)'" .
The C1189 error leads to this part of the code in deps/sol.hpp :
image

I am also getting a C2679 "binary '<<' : no operator found accepts a right operand of type 'std::basic_string<char,std::char_traits,std::allocator>' (or there is no acceptable conversion)".
The C2679 error leads to this part of the code in deps/sol.hpp :
image

I tried to follow the Building (Visual Studio) guide for Windows as closely as possible, but I'm still getting these errors. Am I missing something?

Directional blocks

Suggestion Title

Directional blocks (Furnace, Chest, etc.)

Describe your suggestion

It would be an improvement to the game

Implementations ideas [optional]

Have a front texture
Set front texture based on player rotation

Expand GUiDim

Describe your suggestion

Add mathematical operators (eg. GuiDim.new(10, 0, 0, 0) + GuiDim.new(5, 0, 0, 0))
Add liner interpolation (lerp) (eg. myDim:Lerp(otherDim), 0.1) would allow to smoothly move between two points with a gui.
Add tostring support when using tostring(myDim) (also applies to print(myDim) it will print the coordinates. Useful for debugging.

Implementations ideas [optional]

Mathematical operators and tostring can be done through metatables.

  • (__add)
  • (__sub)
  • (__mul)
    / (__div)
    % (__mod)
    ^ (__pow)

tostring/print = (__tostring)

Lerp impl:
float lerp(float a, float b, float t) { return a + (b - a) * t; }

see here for sol metatable documentation.

Clion support

I want to build this project with Clion. But whatever I do to get the SMFL working. I have tried every directory in the project by now.
Should I be placing it somewhere global? Do you have any advice on this?

Here is the error I get when I try to reload the project
(Please note, this is done on Cmake, can that be the problem?)

Have a nice day, and thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.