GithubHelp home page GithubHelp logo

libmc--c's Introduction

libmc--c: MultiCube-- Client Library

Provides world representation data structures and OpenGL drawing functions.

**********************************************************************
  Copyright 2010-2011 axus

    libmc--c is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or at your option) any later version.

    libmc--c is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this program.  If not, see
    <http://www.gnu.org/licenses/>.
**********************************************************************    

See LIBRARIES for description of required libraries

Prerequisites for MinGW/MSYS:
    MSYS + MinGW with GCC 4.5+
    git
       
Prerequisites for Linux (tested on RedHat variants):
   #You must have permission to install libraries to /usr/local/lib
    Package manager
    git and other development tools
   
   #Install the prerequisite libraries
   ./README.linux

Graphics files (not included, copy to binary directory)
    terrain.png
    gui/items.png
    item/sign.png

Build and test instructions
   #Clone the git repository from github
   git clone git://github.com/axus/libmc--c.git
   
   #Build the library and install
   cd libmc--c
   make
   make install
   
   #Build the test program and run
   cd test
   make
   run


Thanks to the following people who tested:
    vLK
    Zaneo
    Koitenshin
    KyleXY
    ReDucTor
    AndrewPH

libmc--c's People

Contributors

axus avatar

Stargazers

YoungChief avatar koutsie avatar Ryan Grieb avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

libmc--c's Issues

Support lighting

Requirements:

  • Light sources affect lighting
  • Time of day affects lighting

warning

Warning with latest copy.

src/UserInterface.cpp:224: warning: format ‘%3d’ expects type ‘int’, but argument 3 has type ‘size_t’

Just need to typecast viewer.glListMap.size() to int

Want to use OpenGL display lists for faster drawing

Drawing speed would increase if glNewList, glEndList, and glCallList were used.

Some people would say to skip that and use modern things like VBOs. But I'll save that for a future issue.

Requirements:

  • "Draw" chunks inside glNewList, and use glCallList for each chunk.

Need to add usable Chunk update interface to World class

limc--c is planned to be a stand-alone interface which does not contain network code. However, the "World" class should have an interface that allows it to be updated by networking code.

The current version only allows creation of new chunks, without an easy way to update them.

Requirement:

  • libmc--c usable for a working Minecraft Alpha client that can connect to servers.

Support all "model" types: ladder, fence, etc

Drawing cubes and planted items is working great.

These should also be drawn correctly, using meta-data:

  • Loose items
  • Ladder
  • Door
  • Torches
  • Snow cover
  • Cactus
  • Fire
  • Mine-cart tracks
  • Crops
  • Pressure Plate
  • Red-stone wire
  • Lever
  • Button

Need player inventory interface

Requirements:

  • Store player inventory
  • Inventory management screen
  • Crafting screen
  • Assignable callbacks for crafting, inventory change, dropping items, etc.

slow on Intel GMA950

What can you do, right? But Minecraft is faster, so must fix it ;p

Options to decrease the draw distance AND use chunk invisibility flags are needed.

Some block faces aren't drawn when they should be

A real unexplained bug! Sometimes block faces will simply not be drawn, leaving holes in the terrain. Usually +X or -X, sometimes +Z/-Z. It might be a case of checking the wrong neighbor index?

Graphics configuration file

Create mc--c.cfg if needed with default graphics configuration options. Allow user to change it.
(Username/Password/Server list will be separate)

Need to allow player to interact with the world

libmc--c should allow callbacks to be assigned for all player interactions with the world

Requirements:

  • Chatting
  • Turning body and moving head
  • Walking
  • Placing held item on target block face
  • Using held item on target block face / entity
  • Using target entity
  • Crafting attempts

Too slow/too much memory usage

The test program is fast when drawing a few map chunks, but eating half a core of my fast CPU and uses about 250MB for 11x11 map chunks.

Map chunks are 16x128x16 blocks. I'd thought that not drawing hidden block faces would speed things up, but the drawing is still slow. For a flat mapchunk, it's 256 textured quads, so for 121 map chunks its 30976. That should be OK, but it's not.

I'm going to think of a way to combine adjacent quads that have the same texture.

Multi-platform support

libmc--c has only been tested with MinGW on Windows XP, Vista, and 7. As it's compiled with GCC 4.5.0, it should build on Linux and BSD in theory. The Makefiles are MinGW specific, though.

Requirements

  • Working Makefile for MinGW
  • Working MSVC++ 2008 Project file
  • Working Makefile for Linux

Implement collision detection

Right now, the camera can fly around anywhere, through walls, etc.

Requirement:

  • Add option to enforce collision detection on client.

Draw entities using skins

Need to draw mobile game entities:

  • Players
  • Pigs
  • Cows
  • Chickens
  • Zombies
  • Skeletons
  • Spiders
  • Creepers
  • Hell creatures

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.