Git Product home page Git Product logo

truecraft's People

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

truecraft's Issues

Dockerfile

Automating builds would make TrueCraft more accessible. Mono has a docker image that automatically builds and runs projects.

Ex. Dockerfile (in project root):

FROM mono:4.0.0-onbuild
EXPOSE 25565
CMD [ "mono",  "./TrueCraft.exe" ]

Build with:

docker build -t truecraft .

or, if you want to tag the image with the git commit id:

TAG=`git log --format="%H" -n 1 | cut -c1-10`; docker build -t "truecraft:$TAG" .

Run with:

docker run -it --rm -p 25565:25565 truecraft

Create installer

We should have a Windows installer. I've done one in the past that worked pretty well for Patchy, we should follow a similar strategy.

PCL support

How about convert TrueCraft to PCL?
I have something that I can call a "client". Runs on mobile platforms and blah blah. Still sucks a bit. Would be cool if I could run both client and server on, for example, android.
Will help, of course.

Launcher written with xwt

I would like to see a TrueCraft launcher built with Mono xwt (cross platform GUI toolkit for C#). Our launcher will do a bit more than the Minecraft launcher, including:

  • Browsing through your singleplayer worlds
    • Launching a server and running TrueCraft.Client to connect to it for singleplayer
  • Storing and browsing your saved server list
  • Login and so on

AVG False Flag

AVG marks the compiled TrueCraft.exe (in the Debug folder) as a virus with type 'unknown' upon running - I will submit this to AVG as a false flag, however it would be good if you had any idea what may be triggering this

Falling sand

Falling sand has been checked off, however I'm still getting a lot of weird behaviour with falling sand, is that not a server problem?

/give command

I've done a few improvements to the /give command tonight, but I'd still like to discuss/propose 2 features:

  • /giveme as shortcut so you don't have to type out your name if you want to give yourself
  • Possibility to give items by entering the start of someone's name. this exists in Minecraft, and I'd like to see it as a global utility (FindPlayerByPartialUsername, or something like that). Might come in handy in a lot of other places.

The first one is really easy, for the second one, though, I wouldn't immediately know where to start. Thus, before spending a lot of effort and possibly not using a very pretty solution, I'd like to discuss them.

However, I'm going to bed now, so good night ๐Ÿ˜ด

build broken with error regarding YamlDotNet

I followed the build instructions in the README, and got this error:

/home/luke/tmpstore/build/TrueCraft/TrueCraft/TrueCraft.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->

        Program.cs(14,7): error CS0246: The type or namespace name `YamlDotNet' could not be found. Are you missing an assembly reference?
        Configuration.cs(3,7): error CS0246: The type or namespace name `YamlDotNet' could not be found. Are you missing an assembly reference?

         19 Warning(s)
         2 Error(s)

I'm using latest mono as per these instructions: http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives

Thanks!

Doesn't build in fedora

Monodevelop complains about YamlDotNet (a nuget package) not being available. When trying to install nuget packages, I get this:

I am using:

$  mono --version
Mono JIT compiler version 2.10.8 (tarball Sun Aug 17 19:00:51 UTC 2014)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          debugger softdebug 
    LLVM:          supported, not enabled.
    GC:            Included Boehm (with typed GC and Parallel Mark)

Is there anything I am missing?

Build instructions are too scarce

I'm on Debian jessie 64-bit, installed xbuild from packages. I followed the instructions in the README, typed xbuild in the TrueCraft folder (cloned from Git recursively) and got:

XBuild Engine Version 12.0
Mono, Version 3.2.8.0
Copyright (C) 2005-2013 Various Mono authors

Build started 01/05/2015 14:36:00.
__________________________________________________
Project "/home/calinou/Git/truecraft/TrueCraft.sln" (default target(s)):
    Target ValidateSolutionConfiguration:
        Building solution configuration "Debug|x86".
    Target Build:
        Project "/home/calinou/Git/truecraft/externals/fNbt/fNbt/fNbt.csproj" (default target(s)):
            Target PrepareForBuild:
: error : Error initializing task Message: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the file specified.
            Task "Message" execution -- FAILED
            Done building target "PrepareForBuild" in project "/home/calinou/Git/truecraft/externals/fNbt/fNbt/fNbt.csproj".-- FAILED
            Target _RecordCleanFile:
: error : Error initializing task ReadLinesFromFile: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the file specified.
            Task "ReadLinesFromFile" execution -- FAILED
            Done building target "_RecordCleanFile" in project "/home/calinou/Git/truecraft/externals/fNbt/fNbt/fNbt.csproj".-- FAILED
        Done building project "/home/calinou/Git/truecraft/externals/fNbt/fNbt/fNbt.csproj".-- FAILED
    Task "MSBuild" execution -- FAILED
    Done building target "Build" in project "/home/calinou/Git/truecraft/TrueCraft.sln".-- FAILED
Done building project "/home/calinou/Git/truecraft/TrueCraft.sln".-- FAILED

Build FAILED.
Errors:

/home/calinou/Git/truecraft/TrueCraft.sln (default targets) ->
(Build target) ->
/home/calinou/Git/truecraft/externals/fNbt/fNbt/fNbt.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (PrepareForBuild target) ->

    : error : Error initializing task Message: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the file specified.

/home/calinou/Git/truecraft/TrueCraft.sln (default targets) ->
(Build target) ->
/home/calinou/Git/truecraft/externals/fNbt/fNbt/fNbt.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (_RecordCleanFile target) ->

    : error : Error initializing task ReadLinesFromFile: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the file specified.

     0 Warning(s)
     2 Error(s)

Time Elapsed 00:00:00.1781310

What do I need to do for it to build? I've never built a C# program before, so I have no idea what to do.

Also, does TrueCraft require game data from Minecraft? You should probably mention it in the README; if it does, I can work on getting replacement data for those who don't have Minecraft.

Minecraftish font needed

Need a volunteer to make a font that is in the spirit of Minecraft. Should be an image (PNG) that includes characters for the ASCII set (everything less than 0x7F, feel free to omit control chars).

For reference, here's the original Minecraft font image. The TrueCraft font needs to be compatible (i.e. same characters in the same places).

Client - Ways to reduce memory usage.

  1. In ChunkHandler.HandleData(), you already know the total uncompressed size of the data. You could use a memory stream with this total size to avoid having to do any resizing operations. (You'll have to manually decompress though, instead of using ZLibStream.UncompressBuffer)

2) Why are you using storing the drawable coordinates in ChunkConverter.ProcessChunk()? Can't you just directly call the RenderBlock method?

  1. You probably shouldn't be returning arrays in BlockRenderer.CreateQuad, as this allocates a lot of memory.(CLRProfiler showed ~570 megabytes) Probably a better way would be to pass an index parameter as ref and increment that. I am not sure if this works correctly, but here's one way I came up with:
        protected VertexPositionNormalTexture[] CreateUniformCube(Vector3 offset, Vector2[] texture, int indicesOffset, out int[] indices) {
            indices = new int[6 * 6];
            var vertices = new VertexPositionNormalTexture[4 * 6];
            int textureIndex = 0;
            int verticesLocIndex = 0, indicesLocIndex = 0;
            for (int side = 0; side < 6; side++) {
                CreateQuad(side, offset, texture, textureIndex % texture.Length, indicesOffset, 
                           vertices, indices, ref verticesLocIndex, ref indicesLocIndex );
                textureIndex += 4;
            }
            return vertices;
        }

        static int[] baseIndices = new[] { 0, 1, 3, 1, 2, 3 };
        protected static void CreateQuad(int face, Vector3 offset, Vector2[] texture, int textureOffset,
                                         int indicesOffset, VertexPositionNormalTexture[] vertices, int[] indices,
                                         ref int verticesLocIndex, ref int indicesLocIndex ) {
            for (int i = 0; i < 6; i++)
                indices[indicesLocIndex++] = baseIndices[i] + (face * 4) + indicesOffset;

            var unit = CubeMesh[face];
            var normal = CubeNormals[face];
            for (int i = 0; i < 4; i++) {
                vertices[verticesLocIndex++] = new VertexPositionNormalTexture(offset + unit[i], normal, texture[textureOffset + i]);
            }
        }
  1. In the Chunk class, you should consider using DateTime.UtcNow instead of DateTime.Now. Not only should this improve performance, this would also reduce memory usage as DateTime.Now allocates memory for parsing timezone info. (CLRProfiler indicates retrieving DateTime.Now when calling Chunk.GetBlockId from processing chunks ends up allocating 144 megabytes of memory)

  2. See comment
    Part 1 addresses the 1.5 gigabytes allocated in List.AddRange,
    Part 2 addresses the 1.4 gigabytes in BlockRenderer.RenderBlock

Discussion - differences in rendering between Minecraft and TrueCraft

To what degree is it acceptable for TrueCraft to look different than Minecraft? Here's an example that just came up:

From the bottom, torches are not fully modeled in vanilla minecraft:

2015-05-16_19 20 32

In the TrueCraft implementation, torches have a bottom:

2015-05-16_19 27 08

Which is better? Is it okay for us to deviate like this?

Contributing.md

There is currently no contributing.md, some information on how to contribute would be beneficial.

List of terrain features that need implemented

  • Biomes
    • Limit temperature and rainfall of neighboring biomes
  • Above Ground
    • Overhangs
    • Waterfalls
    • Rivers(possibly using A* then distorting with midpoint displacement)
  • Underground
    • Caves
    • Lava pools
    • Water

Implement world logic

The big list of things you can do in Minecraft that need to be supported in TrueCraft.

When working on one of these, reference the issue number ("#12") in your commit messages.

  • Door blocks
    • Placement
    • Wooden door behavior
    • Iron door behavior
  • Trapdoor placement & behavior
  • Sand and gravel behavior
    • Sand
    • Gravel
      • Drop flint randomly
  • Fluid dynamics
    • Water
    • Lava
    • Interaction between water and lava
  • Buckets
  • Farming
    • Hoes
    • Farmland behavior
    • Wheat placement & growth
    • Sugarcane growth
    • Cactus growth
    • Pumpkin growth
    • Sapling growth
  • Grass
    • Turn to dirt when obstructed
    • Spread to nearby dirt blocks
  • Torch placement
  • Beds
    • Placement & destruction
    • Sleeping
  • Leaf decay
  • Egg behavior
  • Flint and steel behavior
  • Fire spread and decay
  • Signs
    • Placement
    • Use
  • Portal placement
    • Portal behavior (teleporting between worlds)
  • Different tools are effective on different blocks
  • Decay and destruction of tools over time
  • Note blocks
    • Adjusting stored tone
    • Redstone interaction
  • Rails
    • Placement and orientation
    • Minecarts
  • Orientatable blocks
    • Stairs
    • Furnaces
    • Dispensers
    • Pistons (sticky and normal)
    • Piston heads (invalid block but support it anyway)
    • Pumpkin & jack-o-lantern
  • Piston behavior
    • Normal
    • Sticky
  • Cake placement & behavior
  • Fence bounding boxes
  • Dispenser behavior
    • Window editor
    • Redstone behavior
  • Chests
    • Placement
    • Window and storage
  • Ladders
  • Levers
    • Interaction
    • Redstone behavior
  • Bows
    • Firing
    • Arrow damage
  • Fishing rod
  • Redstone (ASK before implementing any of this)
    • Redstone wire
    • Redstone torch
    • Redstone repeater
    • Pressure plates
  • Shears
    • Use on sheep
    • Use on leaves
  • Jukebox
  • Maps
  • Snow
    • Drops nothing usually
    • Drops snowballs when shovelled
  • Block placement
    • Overwrite hardness == 0 blocks

Torche placement still buggy

Possibly a regression. Orientation of placed torches is not being stored correctly by the server. Once the client unloads the chunk, then reloads it, torches will have the wrong orientation.

Usernames in logs are prefixed by the chat color identifier

The SendMessage method in the MultiplayerServer class should probably remove the chat color before writing the message to the log, otherwise we'll get messages like the one above.
I'd suggest a Regex fix which I have included in the commit (removed)

I've read MC source. AMA.

Unfortunately, I have read deobfuscated MC source and can't contribute. However, if you need a question about something behaves answered, feel free to ask me and I can check the source.

Custom chat colors

When starting to implement the custom client, I don't think it would be a bad idea to implement custom chat colors for modding support.

E.g. instead of using the predefined colors like $9 for blue, a mod could use RGB values like $(0,116,217) for a slightly nicer blue.

Too rad?

Screen-Door Transparency

Unless I'm forgetting something, every "transparent" material in b1.7.3 Minecraft can be correctly rendered using a technique called "Screen Door Transparency". The primary benefit of this technique is that you don't need to depth sort, but it requires that each pixel in a texture be either 0% or 100%.

See the first part of this article for a better description.

Spawning underground

I'm not sure if it happens often, but when a new player logs in and is in a block underground, it's not good. It should check if there's air two blocks up from the feet position.

Currently Out of Scope Features/Issues

Currently various features/issues are considered to be out of scope, and will need to be addressed at a later date. Below is a list of said features/issues by category, and will be updated as needed.

  • Terrain Generation
    • Anything that requires looking at other chunks
    • Overhangs/advanced terrain generation

List of features for eventual backporting

The current list of features that are planned for backporting. Suggest more in this thread.

  • Fence gates
  • Sprinting
  • Beef
  • Melons
  • Stair corner rendering
  • More stair and slab types
  • Stone bricks
  • Better lighting system
  • New button recipe, wooden buttons
  • Glass panes
  • Abandoned mine shafts
  • New bow mechanics
  • Arrows that stick out of entities
  • Prevent player-placed leaves from decaying
  • 3D chest model and animation
  • New inventory handling (painting, etc)
  • Breeding
  • Server browser
  • 256 max world height
  • Send biomes to clients
  • In-game list of online players
  • Upside-down stairs
  • Creative mode
  • Modern mob spawner tile entities
  • Modern resource packs
  • Flower pots

Client - don't draw unnecessary vertices.

Currently, the client renders all vertices of all faces (example here, with all blocks being drawn at half extent to make the overdraw visible):
truecraft1

There are two main ways you can reduce this:
For solid blocks

  1. Add a 'IsSolidFace(Face...' method to BlockProvider. You can skip drawing a face when the face on this block is solid and the corresponding face on the neighbouring block is also solid.
    (There are some corner cases. For example, cactus would only be true for Y positive and Y negative)

For transparent and transluscent blocks, you can do this:
2) Add a 'CanShareWithNeighbours(Face...' method to BlockProvider. You can skip drawing a face when a block and its neighbour are the same type. (e.g. for glass, water)
(Note that water is a bit trickier - for horizontal neighbours, you have to make sure that they have the same height and shape)

Implement mobs and AI

Friendly:

  • Shared friendly mob AI
  • Chickens
  • Cows
  • Pigs
  • Sheep
  • Squid

Passive:

  • Wolves
    • Friendly mode
    • Agressive mode
    • Taming
  • Zombie Pigmen
    • Friendly mode
    • Agressive mode

Agressive:

  • Zombie
    • Giant
  • Skeleton
  • Spider
  • Creeper
  • Wolf
  • Ghast
  • Slime

Misc:

  • Implement A* (with Jump Point Search)
  • Implement spider jockey

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.