Giter Site home page Giter Site logo

mrsmith33 / voxelman Goto Github PK

View Code? Open in Web Editor NEW
126.0 126.0 9.0 1.86 MB

Plugin-based client-server voxel game engine written in D language

License: Boost Software License 1.0

D 100.00%
d dlang engine game game-engine launcher opengl voxel voxelman

voxelman's People

Contributors

andrejp88 avatar e-y-e avatar gitter-badger avatar mrsmith33 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

voxelman's Issues

Implement command plugin

Implement internal command interpreter in client and server.
Command can be read from stdin.
Launcher can control running processes with commands.

Server can not see very rapid client movements

When player moves rapidly the position can be changed a number of times between sending position to the server. This will cause client to remove chunks, but server wont notice.
The result is missing chunks in the client.

Mac version almost launches. Ideas why this would fail?

The event dispatcher processes that the game started with a GameStartEvent and we get a segfault. Here's the backtrace, etc. The OpenGL window never gets a chance to show.

Process:               voxelman [29163]
Path:                  /Users/USER/*/voxelman
Identifier:            voxelman
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        fish [21111]
Responsible:           voxelman [29163]
User ID:               503

Date/Time:             2017-12-28 22:13:16.063 -0500
OS Version:            Mac OS X 10.13.1 (17B1003)
Report Version:        12
Anonymous UUID:        F3E94113-A7E5-09EB-378F-CD12D1E1AB52

Sleep/Wake UUID:       ACC7E02F-777A-415F-84D6-8A6C8E2B0756

Time Awake Since Boot: 260000 seconds
Time Since Wake:       5200 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x10:
--> 
    __TEXT                 0000000108ead000-0000000109512000 [ 6548K] r-x/rwx SM=COW  i$ [/Users/jonathan/voxelman/voxelman]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   voxelman                      	0x0000000109110069 _D8voxelman15eventdispatcher6plugin21EventDispatcherPlugin53__T9postEventTS8voxelman4core6events14GameStartEventZ9postEventMFS8voxelman4core6events14GameStartEventZv + 9
1   voxelman                      	0x00000001090f6ed9 _D8voxelman6client6plugin12ClientPlugin3runMFAAyaZv + 41
2   libdyld.dylib                 	0x00007fff518ef145 start + 1

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff51a3f70a __write_nocancel + 10
1   libsystem_c.dylib             	0x00007fff5198194a _swrite + 87
2   libsystem_c.dylib             	0x00007fff5197a571 __sflush + 87
3   libsystem_c.dylib             	0x00007fff5197a4c8 fflush + 37
4   voxelman                      	0x0000000109291205 _D3std5stdio4File5flushMFNeZv + 69

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x000000010ab31200  rcx: 0x0000000108f97d30  rdx: 0x00007ffee6d529e0
  rdi: 0x0000000000000000  rsi: 0x0000000000000001  rbp: 0x00007ffee6d52a80  rsp: 0x00007ffee6d52740
   r8: 0x000000010ab382b8   r9: 0x0000000000000040  r10: 0x000000010ab382b0  r11: 0xffffffffffffffff
  r12: 0x00007ffee6d52888  r13: 0x00007ffee6d52880  r14: 0x00007ffee6d52850  r15: 0x000000010953db78
  rip: 0x0000000109110069  rfl: 0x0000000000010202  cr2: 0x0000000000000010
  
Logical CPU:     1
Error Code:      0x00000004
Trap Number:     14

Binary Images:
       0x108ead000 -        0x109511fdf +voxelman (0) <456684F8-42E8-33C7-BAD5-6FC62B2EF14F> /Users/USER/*/voxelman
       0x10aa6b000 -        0x10aa7cffb +liblmdb.dylib (0) <0E1A88F4-9AE4-3540-9CF6-2944F7555FD8> /Users/USER/*/liblmdb.dylib
       0x10aa8a000 -        0x10aa9dff3 +liblz4.1.dylib (0) <888A3808-E8F9-32E0-9CB4-6EBA5A6852B1> /Users/USER/*/liblz4.1.dylib
       0x10aaa6000 -        0x10aaadff7 +libenet.7.dylib (0) <EF824E1C-4243-3065-9EA1-5BD61DE10473> /Users/USER/*/libenet.7.dylib
<Remainder Omitted>

Adaptive chunk loading

Algorithm where chunks are loaded in rings around players, prioritizing rings closer to players,

  • Sort players by load radius (number of fully loaded rings)
  • Starting from players with lowest load radius add chunk observers for those players (causing IO) loading by one ring at a time
  • Stop when all chunk are loaded or load queue is full (some limit of requested chunks is reached

This will ensure prioritizing loading of closest chunks, will keep the queue tight and distribute chunks equally between players
Whenever a player moves number of chunks in rings needs to be recalculated and load radius updated, simple way is resetting load radius to 0 and rechecking observers for all chunks in rings starting from ring 0.

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.