SlideShare a Scribd company logo
1 of 19
Download to read offline
Minecraft in 500 lines of Python
Richard Donkin
@rdonkin
cloudfindhq.com
http://xkcd.com/353/
Why Python?
Easy to write
Great community
Fast enough
Compilers (Cython)
JIT (PyPy)
3D and Game
Libraries
http://xkcd.com/353/
Demo
github.com/fogleman/Minecraft
- Michael Fogleman
Early version:
Minecraft Essentials
Objects are blocks, in 3D grid
Operations
Move: W, S, A, D
Look around: move mouse
Add or remove blocks: click mouse
Textures
How Pyglet Helps
3D gaming library - pyglet.org
Simple wrapper for OpenGL
Pure Python
Library not a framework
This is a quick Minecraft code walkthrough,
not a Pyglet tutorial
Tutorial based on Asteroids: steveasleep.com
Overview of Structure
Window class
Subclass of Pyglet window class
User interaction, movement, rendering
Model class
Models the world as blocks in 3D grid
“The Whole World is an (x, y, z) Dictionary”
Dictionary world[position]
Where position is tuple (x, y, z)
Each entry contains texture such as
Window & Startup Code
Building stuff
Mouse locking, sight vector, hit testing
Remove Block – STONE is special
Look around
Motion matters (dx, dy), not absolute position
Get ‘look vector’ rotation (as x, y degrees) &
add proportion of motion
Mouse left/right is x (look left/right)
And forward/back is y (look up/down) – max ±90°
Highlighting ‘target block’
Hit-test from player position to target block
Draw line around visible edges of block, using
Pyglet
Model
Adding a Block
Remove any existing block at (x, y, z) position from the
‘world dictionary’
Set texture for this block at position
Update sectors (16x16 2D grid) to record this block
Enables speedup by only rendering some sectors
Show the block, and check if any neighbours now visible
1100 commits later…
github.com/boskee/Minecraft
Major fork
8,000 lines
19 contributors
Multi-player
Cython
Pyglet and More
2D game toolkits:
Cocos2D: http://cocos2d.org/ - uses Pyglet
Fife: http://www.fifengine.net/ - esp. RTSs and RPGs
Add-on libraries that can work with Pyglet:
Rabbyt – sprites:
http://arcticpaint.com/projects/rabbyt/
Pymunk – physics: http://pymunk.org
Alternative frameworks:
Pygame – larger community, more game-specific, open
source book at http://inventwithpython.com/
Wrap Up
Concise, elegant code
You can do a lot in 500 lines!
Thank You
Download slides:
https://www.slideshare.net/rdonkin/minecraft-in-500-lines-with-pyglet-pycon-uk
Richard Donkin
@rdonkin
cloudfindhq.com
Sect0rization
Technique used to speed up rendering of
world – only render nearby sectors
Sector = 16x16 2D region of world
In Model, dictionary sectors[sector]
maps from sector to list of positions in that
sector
Track player position in sector
If player moves between sectors, determine
which adjacent sectors to show – see
change_sectors()

More Related Content

What's hot

【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術
【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術
【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術Unity Technologies Japan K.K.
 
Les règles du cadrage
Les règles du cadrageLes règles du cadrage
Les règles du cadrageSouad Azizi
 
Data × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語る
Data × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語るData × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語る
Data × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語るYoshiki Hayama
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14AMD Developer Central
 
UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜
UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜
UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜Yoshiki Hayama
 
ChatGPT + LlamaIndex 0 .6 による チャットボット の実装
ChatGPT + LlamaIndex 0  .6 による チャットボット の実装ChatGPT + LlamaIndex 0  .6 による チャットボット の実装
ChatGPT + LlamaIndex 0 .6 による チャットボット の実装Takanari Tokuwa
 
3DCGMeetup08_MayaRigSystem_mGear
3DCGMeetup08_MayaRigSystem_mGear3DCGMeetup08_MayaRigSystem_mGear
3DCGMeetup08_MayaRigSystem_mGearue_ta
 
ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用
ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用
ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用Sugimoto Chizuru
 
デザインのリファクタリング (慣れを大切に)
デザインのリファクタリング (慣れを大切に)デザインのリファクタリング (慣れを大切に)
デザインのリファクタリング (慣れを大切に)Yukio Andoh
 
グッドパッチのデザインカルチャーの作り方
グッドパッチのデザインカルチャーの作り方グッドパッチのデザインカルチャーの作り方
グッドパッチのデザインカルチャーの作り方Satoru MURAKOSHI
 
IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~
IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~
IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~Yoshiki Hayama
 
ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...
ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...
ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...小林 信行
 
CADDi_NewProduct_図面活用プラットフォーム
CADDi_NewProduct_図面活用プラットフォームCADDi_NewProduct_図面活用プラットフォーム
CADDi_NewProduct_図面活用プラットフォームYosuke Shirai
 
人間中心とは何なのか? 〜利他的UXから考える
人間中心とは何なのか? 〜利他的UXから考える人間中心とは何なのか? 〜利他的UXから考える
人間中心とは何なのか? 〜利他的UXから考えるMasaya Ando
 
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方Yoshiki Hayama
 
視聴者に優しいプレゼン資料の作り方
視聴者に優しいプレゼン資料の作り方視聴者に優しいプレゼン資料の作り方
視聴者に優しいプレゼン資料の作り方akihiro_0228
 
AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!
AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!
AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!Yoshiki Hayama
 
アイデア収束からプロトタイピング
アイデア収束からプロトタイピングアイデア収束からプロトタイピング
アイデア収束からプロトタイピングMasaya Ando
 

What's hot (20)

【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術
【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術
【Unite 2017 Tokyo】最適化をする前に覚えておきたい技術
 
Les règles du cadrage
Les règles du cadrageLes règles du cadrage
Les règles du cadrage
 
Data × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語る
Data × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語るData × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語る
Data × UX - 定量分析と定性分析のシナジーをガチUXデザイナーが語る
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜
UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜
UXデザインのはじめの一歩を体験しよう! 〜ユーザーインタビュー、ユーザー心理分析の基本〜
 
ChatGPT + LlamaIndex 0 .6 による チャットボット の実装
ChatGPT + LlamaIndex 0  .6 による チャットボット の実装ChatGPT + LlamaIndex 0  .6 による チャットボット の実装
ChatGPT + LlamaIndex 0 .6 による チャットボット の実装
 
3DCGMeetup08_MayaRigSystem_mGear
3DCGMeetup08_MayaRigSystem_mGear3DCGMeetup08_MayaRigSystem_mGear
3DCGMeetup08_MayaRigSystem_mGear
 
ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用
ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用
ゲームの仕様書を書こう4 仕様書作成で楽をするconfluenceの活用
 
デザインのリファクタリング (慣れを大切に)
デザインのリファクタリング (慣れを大切に)デザインのリファクタリング (慣れを大切に)
デザインのリファクタリング (慣れを大切に)
 
Cours SDL2 (partie 1)
Cours SDL2 (partie 1)Cours SDL2 (partie 1)
Cours SDL2 (partie 1)
 
グッドパッチのデザインカルチャーの作り方
グッドパッチのデザインカルチャーの作り方グッドパッチのデザインカルチャーの作り方
グッドパッチのデザインカルチャーの作り方
 
IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~
IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~
IT推進に必要なUXを学ぶ ~UXを意識して真の業務改善・真のDXを目指す~
 
Masked Occlusion Culling
Masked Occlusion CullingMasked Occlusion Culling
Masked Occlusion Culling
 
ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...
ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...
ゲームシナリオ構成論 The Method for the game sinario writings for multi-ending adventur...
 
CADDi_NewProduct_図面活用プラットフォーム
CADDi_NewProduct_図面活用プラットフォームCADDi_NewProduct_図面活用プラットフォーム
CADDi_NewProduct_図面活用プラットフォーム
 
人間中心とは何なのか? 〜利他的UXから考える
人間中心とは何なのか? 〜利他的UXから考える人間中心とは何なのか? 〜利他的UXから考える
人間中心とは何なのか? 〜利他的UXから考える
 
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方
 
視聴者に優しいプレゼン資料の作り方
視聴者に優しいプレゼン資料の作り方視聴者に優しいプレゼン資料の作り方
視聴者に優しいプレゼン資料の作り方
 
AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!
AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!
AIとUXデザイン 〜ユーザーのためのAIを設計するために〜:第22回 Machine Learning 15minutes!
 
アイデア収束からプロトタイピング
アイデア収束からプロトタイピングアイデア収束からプロトタイピング
アイデア収束からプロトタイピング
 

Viewers also liked

Minecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with PygletMinecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with PygletRichard Donkin
 
3D Computer Graphics with Python
3D Computer Graphics with Python3D Computer Graphics with Python
3D Computer Graphics with PythonMartin Christen
 
Introduction to Game programming with PyGame Part 1
Introduction to Game programming with PyGame Part 1Introduction to Game programming with PyGame Part 1
Introduction to Game programming with PyGame Part 1Abhishek Mishra
 
Introduction to Game Programming Tutorial
Introduction to Game Programming TutorialIntroduction to Game Programming Tutorial
Introduction to Game Programming TutorialRichard Jones
 
Денис Ковалев «Python в игровой индустрии»
Денис Ковалев «Python в игровой индустрии»Денис Ковалев «Python в игровой индустрии»
Денис Ковалев «Python в игровой индустрии»DataArt
 
Introducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGLIntroducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGLkdeespana
 
Real-time Online Multiplayer with Godot Engine
Real-time Online Multiplayer with Godot EngineReal-time Online Multiplayer with Godot Engine
Real-time Online Multiplayer with Godot EngineFabio Alessandrelli
 
Python games
Python gamesPython games
Python gamesmolw
 
S378 introduction to robocup & soccer simulation
S378 introduction to robocup & soccer simulationS378 introduction to robocup & soccer simulation
S378 introduction to robocup & soccer simulationIsfahanlug
 
Разработка GUI игрового проекта на Scaleform
Разработка GUI игрового проекта на ScaleformРазработка GUI игрового проекта на Scaleform
Разработка GUI игрового проекта на ScaleformDmitry Dichkovsky
 

Viewers also liked (10)

Minecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with PygletMinecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with Pyglet
 
3D Computer Graphics with Python
3D Computer Graphics with Python3D Computer Graphics with Python
3D Computer Graphics with Python
 
Introduction to Game programming with PyGame Part 1
Introduction to Game programming with PyGame Part 1Introduction to Game programming with PyGame Part 1
Introduction to Game programming with PyGame Part 1
 
Introduction to Game Programming Tutorial
Introduction to Game Programming TutorialIntroduction to Game Programming Tutorial
Introduction to Game Programming Tutorial
 
Денис Ковалев «Python в игровой индустрии»
Денис Ковалев «Python в игровой индустрии»Денис Ковалев «Python в игровой индустрии»
Денис Ковалев «Python в игровой индустрии»
 
Introducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGLIntroducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGL
 
Real-time Online Multiplayer with Godot Engine
Real-time Online Multiplayer with Godot EngineReal-time Online Multiplayer with Godot Engine
Real-time Online Multiplayer with Godot Engine
 
Python games
Python gamesPython games
Python games
 
S378 introduction to robocup & soccer simulation
S378 introduction to robocup & soccer simulationS378 introduction to robocup & soccer simulation
S378 introduction to robocup & soccer simulation
 
Разработка GUI игрового проекта на Scaleform
Разработка GUI игрового проекта на ScaleformРазработка GUI игрового проекта на Scaleform
Разработка GUI игрового проекта на Scaleform
 

Similar to Minecraft in 500 lines with Pyglet - PyCon UK

Creating 3D games and applications using Castle Game Engine
Creating 3D games and applications using Castle Game EngineCreating 3D games and applications using Castle Game Engine
Creating 3D games and applications using Castle Game EngineMichalis Kamburelis
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalMichalis Kamburelis
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1benDesigning
 
Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitcbenDesigning
 
Ics2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentalsIcs2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentalsbridgekloud
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutesTroy Miles
 
Ansiblefest 2018 Network automation journey at roblox
Ansiblefest 2018 Network automation journey at robloxAnsiblefest 2018 Network automation journey at roblox
Ansiblefest 2018 Network automation journey at robloxDamien Garros
 
Android game development
Android game developmentAndroid game development
Android game developmentdmontagni
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutionjuanjosanchezpenas
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...Igalia
 
A Study of SVG-based Application Development @ OSDC 2010
A Study of SVG-based Application Development @ OSDC 2010A Study of SVG-based Application Development @ OSDC 2010
A Study of SVG-based Application Development @ OSDC 2010Rex Tsai
 
Game development with_lib_gdx
Game development with_lib_gdxGame development with_lib_gdx
Game development with_lib_gdxGabriel Grill
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engineMichalis Kamburelis
 
The Ring programming language version 1.6 book - Part 50 of 189
The Ring programming language version 1.6 book - Part 50 of 189The Ring programming language version 1.6 book - Part 50 of 189
The Ring programming language version 1.6 book - Part 50 of 189Mahmoud Samir Fayed
 
An Introduction to Game Programming with Flash: An Introduction to Flash and ...
An Introduction to Game Programming with Flash: An Introduction to Flash and ...An Introduction to Game Programming with Flash: An Introduction to Flash and ...
An Introduction to Game Programming with Flash: An Introduction to Flash and ...Krzysztof Opałka
 
Casual Engines 2009
Casual Engines 2009Casual Engines 2009
Casual Engines 2009David Fox
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfPrabindh Sundareson
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Asher Martin
 

Similar to Minecraft in 500 lines with Pyglet - PyCon UK (20)

Creating 3D games and applications using Castle Game Engine
Creating 3D games and applications using Castle Game EngineCreating 3D games and applications using Castle Game Engine
Creating 3D games and applications using Castle Game Engine
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in Pascal
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
 
Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitc
 
At the end of the rainbow
At the end of the rainbowAt the end of the rainbow
At the end of the rainbow
 
Squeak
SqueakSqueak
Squeak
 
Ics2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentalsIcs2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentals
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutes
 
Ansiblefest 2018 Network automation journey at roblox
Ansiblefest 2018 Network automation journey at robloxAnsiblefest 2018 Network automation journey at roblox
Ansiblefest 2018 Network automation journey at roblox
 
Android game development
Android game developmentAndroid game development
Android game development
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
 
A Study of SVG-based Application Development @ OSDC 2010
A Study of SVG-based Application Development @ OSDC 2010A Study of SVG-based Application Development @ OSDC 2010
A Study of SVG-based Application Development @ OSDC 2010
 
Game development with_lib_gdx
Game development with_lib_gdxGame development with_lib_gdx
Game development with_lib_gdx
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engine
 
The Ring programming language version 1.6 book - Part 50 of 189
The Ring programming language version 1.6 book - Part 50 of 189The Ring programming language version 1.6 book - Part 50 of 189
The Ring programming language version 1.6 book - Part 50 of 189
 
An Introduction to Game Programming with Flash: An Introduction to Flash and ...
An Introduction to Game Programming with Flash: An Introduction to Flash and ...An Introduction to Game Programming with Flash: An Introduction to Flash and ...
An Introduction to Game Programming with Flash: An Introduction to Flash and ...
 
Casual Engines 2009
Casual Engines 2009Casual Engines 2009
Casual Engines 2009
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 

Recently uploaded

React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Recently uploaded (20)

React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

Minecraft in 500 lines with Pyglet - PyCon UK

Editor's Notes

  1. Pyglet is actually 60,000 lines of code, and requires some understanding of OpenGL, but is still quite easy to usePanda3D is an alternative higher-end 3D library, more complex to use than Pyglet. Other 3D and gaming libraries are discussed later.
  2. STONE is specially treated because the base of the world is stone (grey colour) – this stops you drilling through the bottom of the world, which would look bad. To see this, remove the layer of earth blocks on the ground until you get to stone.
  3. Now 8000 lines of code, including full inventory, multi-player client/server, etc. Supports compiling to C using Cython for speed, but not as easy to get started with as the original fogleman version.
  4. Panda3D and PyOpenGL are two other 3D frameworks.