Git Product home page Git Product logo

mini-blocks's Introduction

MiniBlocks

Build

A procedurally generated open-world sandbox game for macOS and iOS, inspired by Minecraft.

Showcase

Description

MiniBlocks is an open-world sandbox game, inspired by Minecraft. The player is spawned in a three-dimensional voxel world and can interact with it by placing or breaking blocks with the mouse. The world is infinite and new chunks are generated procedurally as the player moves through the world.

World generation is provided through a variety of world generators. The most interesting one - NatureWorldGenerator - incorporates techniques such as perlin noise maps and pseudo-randomness to first generate a height map and then 'decorate' it with structures such as trees.

World loading happens in chunked deltas, i.e. only the new/obsolete chunks are added to/removed from the scene as the player moves.

On the technical side the game uses the SceneKit framework for rendering and is structured using a combination of the entity-component architecture provided by GameplayKit and classic model-view separation. This choice of architecture makes it extensible, avoiding common pitfalls in traditional inheritance-heavy designs, and provides great modularity on top.

By including a compatibility layer, the game can use either AppKit, GameController or UIKit for input handling, thereby making it possible to play the game on macOS, iOS and iPadOS with mouse, keyboard or touch controls.

The game and assets are created entirely from scratch and © fwcd 2022.

Repository Structure

The code is located in the playground app project to comply with the Swift Student Challenge's requirements. For convenience, an Xcode project along with actual macOS/iOS targets and unit tests is provided too, however.

See also

  • MiniCut, a tiny video editor built with SpriteKit (my 2021 project)
  • MiniJam, a tiny digital audio workstation built with SwiftUI (my 2020 project)

mini-blocks's People

Contributors

fwcd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

m0910586

mini-blocks's Issues

Add chunk-based world generation (and storage?)

Currently the world is generated on a strip-by-strip basis. This is mostly fine, but makes it hard to generate larger structures (generating trees are already a bit involved this way, since we have to check whether neighboring strips contain trees, thereby also increasing the performance cost).

It might be better if we not only render, but also generate and store the world in chunks.

Investigate why pointer locking doesn't work properly on iOS

This is a bit unfortunate, since while the camera rotates correctly even as a pointer captured by the simulator moves past the screen bounds, it might accidentally e.g. trigger the home indicator, the dock, etc.

Therefore it would be nice if we could find out why pointer locking as specified by the corresponding property in MiniBlocksViewController doesn't work as expected.

Implement first-person view hand

Currently the hand HUD is only a stub. It should be implemented as a first-person view-esque item rendered on the right-hand side, but as a scene node and ideally with animations when the player e.g. breaks/places a block or uses the item.

Implement procedural world generation

The world should store a generator and update its blocks as needed around the player position. Perhaps we'd like to chunk strips like in Minecraft to allow for more efficient batch updates?

Reimplement movement

Currently, the player node is moved by applying forces to the physics body. This makes the controls very unwieldy. A better solution would be to make the player physics body .kinetic instead of .dynamic and use SKActions to move the SKNode directly (see https://martinlasek.medium.com/tutorial-how-to-implement-a-d-pad-7e8b6047badf).

This may however require us to rethink player physics. We might need to manually implement collisions with the ground and/or gravity, all while retaining the precise control over the movement that the player should have through the keyboard.

Add interaction with the world

Update the PlayerControlComponent with mouse handlers that e.g. remove a block on left click and place one on right click.

Add CI workflows

Add a GitHub workflow that builds for macOS and iOS (using a macOS 12 runner).

Add sneaking

Add sneaking (e.g. while pressing ctrl), along with the corresponding achievement.

Implement proper gravity

Currently, the gravity 'teleports' the player back to the ground even when he falls below the world. This doesn't seem quite right.

Add biomes

Add e.g. a separate, much larger scale noise map for generating biomes (e.g. plains, woods, ocean, desert, a mix (i.e. lakes, rivers, etc., like the current world generator)).

App crashes after completing first achievement when run on iPadOS

Apparently there is some issue with the achievement HUD node being replaced on the wrong thread:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Hardware Model:      MacBookPro18,3
Process:             MiniBlocks [50006]
Identifier:          dev.fwcd.MiniBlocks
Version:             1.0 (1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [48766]
Responsible Process: SimulatorTrampoline [37387]

Date/Time:           2022-04-05 21:27:44.5831 +0200
Launch Time:         2022-04-05 21:27:41.0523 +0200
OS Version:          macOS 12.3.1 (21E258)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  9

Application Specific Information:
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
CoreSimulator 802.6 - Device: iPad Pro (12.9-inch) (5th generation) (FDA35E87-AC51-45B5-8BB9-38FAA2B68B26) - Runtime: iOS 15.4 (19E240) - DeviceType: iPad Pro (12.9-inch) (5th generation)
terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Call must be made on main thread'
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
abort() called


Last Exception Backtrace:
0   CoreFoundation                	       0x1803f25d0 __exceptionPreprocess + 216
1   libobjc.A.dylib               	       0x18019813c objc_exception_throw + 56
2   Foundation                    	       0x180758330 _userInfoForFileAndLine + 0
3   UIKitCore                     	       0x184d7abb4 -[UIApplication _performAfterCATransactionCommitsWithLegacyRunloopObserverBasedTiming:block:] + 448
4   UIKitCore                     	       0x184eeb76c -[_UIFocusUpdateThrottle scheduleProgrammaticFocusUpdate] + 336
5   UIKitCore                     	       0x1847ca090 -[UIFocusSystem _requestFocusUpdate:] + 732
6   UIKitCore                     	       0x1847c9d34 -[UIFocusSystem requestFocusUpdateToEnvironment:] + 96
7   UIKitCore                     	       0x1847ca6e4 -[UIFocusSystem _focusEnvironmentWillDisappear:] + 452
8   SpriteKit                     	       0x19c1b48d4 _removeChild(SKNode*, SKNode*, SKScene*) + 340
9   SpriteKit                     	       0x19c1b49c8 -[SKNode removeChild:] + 104
10  SpriteKit                     	       0x19c1b4f64 -[SKNode removeAllChildren] + 248
11  MiniBlocks                    	       0x104428fe8 AchievementHUDLoadComponent.update(deltaTime:) + 224 (AchievementHUDLoadComponent.swift:50)
12  MiniBlocks                    	       0x104429134 @objc AchievementHUDLoadComponent.update(deltaTime:) + 44
13  GameplayKit                   	       0x1a4882a60 -[GKComponentSystem updateWithDeltaTime:] + 176
14  MiniBlocks                    	       0x1044928a8 MiniBlocksViewController.renderer(_:updateAtTime:) + 620 (MiniBlocksViewController.swift:250)
15  MiniBlocks                    	       0x104492968 @objc MiniBlocksViewController.renderer(_:updateAtTime:) + 60
16  SceneKit                      	       0x1973f9e28 -[SCNRenderer _update:] + 416
17  SceneKit                      	       0x1973fc6b0 -[SCNRenderer _drawSceneWithNewRenderer:] + 188
18  SceneKit                      	       0x1973fcc70 -[SCNRenderer _drawScene:] + 48
19  SceneKit                      	       0x1973fd048 -[SCNRenderer _drawAtTime:] + 684
20  SceneKit                      	       0x1974a249c -[SCNView _drawAtTime:] + 452
21  SceneKit                      	       0x19734e79c __83-[NSObject(SCN_DisplayLinkExtensions) SCN_setupDisplayLinkWithQueue:screen:policy:]_block_invoke + 56
22  SceneKit                      	       0x1974699a4 __71-[SCNDisplayLink _displayLinkCallbackWaitingOnFrameCompletionWithTime:]_block_invoke + 64
23  libdispatch.dylib             	       0x18010ea98 _dispatch_client_callout + 16
24  libdispatch.dylib             	       0x18011d1d4 _dispatch_lane_barrier_sync_invoke_and_complete + 92
25  SceneKit                      	       0x197469930 -[SCNDisplayLink _displayLinkCallbackWaitingOnFrameCompletionWithTime:] + 220
26  QuartzCore                    	       0x1883accbc CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 748
27  QuartzCore                    	       0x188488350 display_timer_callback(__CFMachPort*, void*, long, void*) + 336
28  CoreFoundation                	       0x18032b9d4 __CFMachPortPerform + 172
29  CoreFoundation                	       0x18036104c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
30  CoreFoundation                	       0x180360464 __CFRunLoopDoSource1 + 580
31  CoreFoundation                	       0x18035a604 __CFRunLoopRun + 2280
32  CoreFoundation                	       0x180359804 CFRunLoopRunSpecific + 572
33  Foundation                    	       0x1808245bc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
34  SceneKit                      	       0x19734ec48 __85-[SCNView(SCNDisplayLink) _initializeDisplayLinkWithScreen:policy:completionHandler:]_block_invoke + 564
35  SceneKit                      	       0x19734edbc __SCNRenderThread_start__ + 72
36  libsystem_pthread.dylib       	       0x1cba8d6c8 _pthread_start + 116
37  libsystem_pthread.dylib       	       0x1cba88910 thread_start + 8

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x1cba37218 __psynch_rw_wrlock + 8
1   libsystem_pthread.dylib       	       0x1cba8be2c _pthread_rwlock_lock_wait + 80
2   libsystem_pthread.dylib       	       0x1cba8a140 _pthread_rwlock_lock_slow + 704
3   SceneKit                      	       0x1974db9a4 C3DTransactionFlush + 400
4   CoreFoundation                	       0x18035f4fc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
5   CoreFoundation                	       0x180359b90 __CFRunLoopDoObservers + 572
6   CoreFoundation                	       0x18035a0e4 __CFRunLoopRun + 968
7   CoreFoundation                	       0x180359804 CFRunLoopRunSpecific + 572
8   GraphicsServices              	       0x18c23660c GSEventRunModal + 160
9   UIKitCore                     	       0x184d7bd2c -[UIApplication _run] + 992
10  UIKitCore                     	       0x184d808c8 UIApplicationMain + 112
11  SwiftUI                       	       0x1ba1f7564 closure #1 in KitRendererCommon(_:) + 160
12  SwiftUI                       	       0x1ba1f74c0 runApp<A>(_:) + 164
13  SwiftUI                       	       0x1b9c2aadc static App.main() + 80
14  MiniBlocks                    	       0x1044276d8 static MiniBlocksApp.$main() + 40 (MiniBlocksApp.swift:3)
15  MiniBlocks                    	       0x104427788 main + 12
16  dyld_sim                      	       0x104899cd8 start_sim + 20
17  dyld                          	       0x1046e1088 start + 516

Thread 1:
0   libsystem_pthread.dylib       	       0x1cba888fc start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	       0x1cba888fc start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib       	       0x1cba888fc start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	       0x1cba888fc start_wqthread + 0

Thread 5:: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib        	       0x1cba31fcc mach_msg_trap + 8
1   libsystem_kernel.dylib        	       0x1cba32430 mach_msg + 72
2   CoreFoundation                	       0x18035fd58 __CFRunLoopServiceMachPort + 368
3   CoreFoundation                	       0x18035a164 __CFRunLoopRun + 1096
4   CoreFoundation                	       0x180359804 CFRunLoopRunSpecific + 572
5   Foundation                    	       0x1808245bc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
6   Foundation                    	       0x180824874 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88
7   UIKitCore                     	       0x184e3216c -[UIEventFetcher threadMain] + 472
8   Foundation                    	       0x18084e30c __NSThread__start__ + 792
9   libsystem_pthread.dylib       	       0x1cba8d6c8 _pthread_start + 116
10  libsystem_pthread.dylib       	       0x1cba88910 thread_start + 8

Thread 6:
0   libsystem_pthread.dylib       	       0x1cba888fc start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib       	       0x1cba888fc start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib       	       0x1cba888fc start_wqthread + 0

Thread 9 Crashed:: com.apple.scenekit.scnview-renderer Dispatch queue: com.apple.scenekit.renderingQueue.MiniBlocks.MiniBlocksSceneView0x14bd096e0
0   libsystem_kernel.dylib        	       0x1cba39e60 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x1cba8d3c0 pthread_kill + 256
2   libsystem_c.dylib             	       0x1801023f4 abort + 124
3   libc++abi.dylib               	       0x18023eeb4 abort_message + 128
4   libc++abi.dylib               	       0x18022f66c demangling_terminate_handler() + 300
5   libobjc.A.dylib               	       0x18017ae80 _objc_terminate() + 124
6   libc++abi.dylib               	       0x18023e364 std::__terminate(void (*)()) + 16
7   libc++abi.dylib               	       0x18023e30c std::terminate() + 60
8   libdispatch.dylib             	       0x18010eaac _dispatch_client_callout + 36
9   libdispatch.dylib             	       0x18011d1d4 _dispatch_lane_barrier_sync_invoke_and_complete + 92
10  SceneKit                      	       0x197469930 -[SCNDisplayLink _displayLinkCallbackWaitingOnFrameCompletionWithTime:] + 220
11  QuartzCore                    	       0x1883accbc CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 748
12  QuartzCore                    	       0x188488350 display_timer_callback(__CFMachPort*, void*, long, void*) + 336
13  CoreFoundation                	       0x18032b9d4 __CFMachPortPerform + 172
14  CoreFoundation                	       0x18036104c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
15  CoreFoundation                	       0x180360464 __CFRunLoopDoSource1 + 580
16  CoreFoundation                	       0x18035a604 __CFRunLoopRun + 2280
17  CoreFoundation                	       0x180359804 CFRunLoopRunSpecific + 572
18  Foundation                    	       0x1808245bc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
19  SceneKit                      	       0x19734ec48 __85-[SCNView(SCNDisplayLink) _initializeDisplayLinkWithScreen:policy:completionHandler:]_block_invoke + 564
20  SceneKit                      	       0x19734edbc __SCNRenderThread_start__ + 72
21  libsystem_pthread.dylib       	       0x1cba8d6c8 _pthread_start + 116
22  libsystem_pthread.dylib       	       0x1cba88910 thread_start + 8


Thread 9 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000180242031   x5: 0x000000016bec08a0   x6: 0x000000000000006e   x7: 0xffffffff00001000
    x8: 0x000000016bec3000   x9: 0xd62a4621b2be7e6d  x10: 0x0000000000000200  x11: 0x000000000000000b
   x12: 0x0000000000000000  x13: 0x0000000042008800  x14: 0x0000000000000010  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x0000000000000002  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x000000016bec3000  x21: 0x000000000000a40b  x22: 0x000000016bec30e0  x23: 0x000000016bec0e30
   x24: 0x0000000000000001  x25: 0x00000001da6ee000  x26: 0x000000014bd09df0  x27: 0x000000014a869800
   x28: 0x0000000000000104   fp: 0x000000016bec0810   lr: 0x00000001cba8d3c0
    sp: 0x000000016bec07f0   pc: 0x00000001cba39e60 cpsr: 0x40001000
   far: 0x0000000202e43c67  esr: 0x56000080  Address size fault

Binary Images:
       0x1cba31000 -        0x1cba66fff libsystem_kernel.dylib (*) <8678b4ed-ec14-3851-8da2-ae9902bbd5fc> /usr/lib/system/libsystem_kernel.dylib
       0x1cba86000 -        0x1cba92fff libsystem_pthread.dylib (*) <9507407a-b251-3158-bc81-8cabbebe34de> /usr/lib/system/libsystem_pthread.dylib
       0x197278000 -        0x197708fff com.apple.SceneKit (1.0) <53b4e8db-98ba-39a1-a6db-ea42ed8c24b0> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SceneKit.framework/SceneKit
       0x1802db000 -        0x180689fff com.apple.CoreFoundation (6.9) <c913654a-e564-36de-a01e-7343a4defd27> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x18c233000 -        0x18c23bfff com.apple.GraphicsServices (1.0) <fbc4ed01-4cf4-39e3-8e28-486f598cf873> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x18416e000 -        0x185600fff com.apple.UIKitCore (1.0) <d68f83a0-1347-378c-b4de-90b10a471762> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x1b9824000 -        0x1ba62ffff com.apple.SwiftUI (3.4.12) <755bc375-5a14-39aa-94b4-82d5956f4d81> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUI.framework/SwiftUI
       0x104424000 -        0x1044a7fff dev.fwcd.MiniBlocks (1.0) <141ca231-3cdd-3b96-9238-c97bd6fcaeb8> /Users/USER/Library/Developer/CoreSimulator/Devices/FDA35E87-AC51-45B5-8BB9-38FAA2B68B26/data/Containers/Bundle/Application/7DD767DD-0B39-430A-91BE-C7AB5F10CD81/MiniBlocks.app/MiniBlocks
       0x104898000 -        0x1048d3fff dyld_sim (*) <6e6188a1-7b04-3ae8-be81-cb35b05b8358> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
       0x1046dc000 -        0x10473bfff dyld (*) <fbb89662-e6f2-3434-b542-f75185ac5e74> /usr/lib/dyld
       0x1806fd000 -        0x1809bffff com.apple.Foundation (6.9) <c5e56bf5-55be-3abb-947c-cdc542a7b3b5> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
       0x18008d000 -        0x18010afff libsystem_c.dylib (*) <2eafadf9-c81e-3094-87b0-91034483eed3> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib
       0x18022e000 -        0x180244fff libc++abi.dylib (*) <64ee9f07-eee9-3e40-8453-1c39cd91bcfd> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib
       0x180176000 -        0x1801a7fff libobjc.A.dylib (*) <fc419e3a-e8a0-3e6e-9421-a7f3f8adcde7> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib
       0x18010b000 -        0x18014dfff libdispatch.dylib (*) <6eb29d1c-5bf4-3ce6-b2d7-f3d082c156e8> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib
       0x18839f000 -        0x188610fff com.apple.QuartzCore (1.11) <cdb519f3-ed98-396a-9503-805f4dcbbead> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/QuartzCore.framework/QuartzCore
       0x19c14c000 -        0x19c25cfff com.apple.SpriteKit (1.0) <b049cc0b-90de-331c-9134-0c6c4d3cccc7> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SpriteKit.framework/SpriteKit
       0x1a483d000 -        0x1a489afff com.apple.GameplayKit (1.0) <380531a0-0dd3-312f-a187-833774b73650> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/GameplayKit.framework/GameplayKit

Add game modes

E.g. survival and creative mode, where the former lets the player have health, take fall damage etc. and the latter lets the player fly and place blocks of any type freely.

Improve liquids

Currently, liquids are rendered like normal blocks. Ideally, they should...

  • not be breakable like normal blocks
  • let players pass through but at reduced gravity
    • swimming mechanics might be non-trivial, this would be open for further investigation
  • not be considered opaque for occlusion checking (we currently do that for performance reasons)
    • perhaps we could merge adjacent liquid blocks along a strip or even within a chunk (once/if we do #11) to improve performance while retaining the 'correct' semantics?

Use `GameController` on macOS too

Currently, AppKit's event handling is used on macOS although GameController is available (see #34). Therefore it would be nice to unify this input handling in MiniBlocksViewController.

Add achievements system

  • Add achievements model
  • Define achievements
    • WASD for movement
    • Mouse for rotation
    • Shift for sprint, space for jump
    • Optionally: F3 for debug info
  • Add achievements HUD and track them based on what the player does

Investigate threading and concurrency issues

While AppKit dispatches UI events on the main thread, SceneKit and SpriteKit seem to have their own private render threads, potentially resulting in race conditions, use-after-frees and other concurrency issues when the model is modified/accessed from different threads:

image

A potential solution would be to look into Swift 5's new actor classes.

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.