fogman / nakamoto-station (public) (License: MIT) (since 2020-05-02) (hash sha1)
python pyglet game engine influenced by infiniminer and forked from work by git hub / fogleman et al
List of commits:
Subject Hash Author Date (UTC)
change kwargs to be more self consistent 9adeeb887151560a9e3663c1e03bd1ebf210b6ae jminardi 2013-04-05 06:47:07
removed unused code 1f9a8f7745560f170bd38f9ccdfd20828a34561c jminardi 2013-04-05 06:22:31
add more documentation f2e7549fef6e3b0f5875711d47b376643eebd176 jminardi 2013-04-05 06:05:57
more docstrings 0fd908f1cb77ba7408b9a4df0561c3e98284ce7c jminardi 2013-04-03 17:48:03
Fix jump df11777b8ad85ffeafe3c5c4fbb671367023832d Valentin Lorentz 2013-04-03 16:33:11
remove TextureGroup definition 059b80ac39ea2ea1ef691fd793e494e3b4d59f7a jminardi 2013-04-03 06:33:18
pep8 and add doc strings 07d069e38c6827b9671c59240fe0861fd96e5635 jminardi 2013-04-03 06:18:13
Update README.md 92723e77dce56e75c51c29690ef0aaf206f852a8 Michael Fogleman 2013-04-02 14:00:26
another README link fix ... 56a0e28849d098a0d6c39dc88e60400190f715ca richvel 2013-04-02 13:49:49
fixed link in README 77560c5968cf10d5370e7b572dbd3b0d60a2979e richvel 2013-04-02 13:16:10
README update for Mac 32-bit issue #7, and installing git+pip on various platforms e1dd181c3688bbf83dd515daf5d375da6855b419 richvel 2013-04-02 12:48:39
Update README.md fae6988d441345efaa4c27d3c0ee833d5999a257 Michael Fogleman 2013-04-01 12:55:07
How to play instructions in README 8bc3605f26a4f428bed4ea1fa31ee62654c2a44e richvel 2013-04-01 10:09:33
keys 1 - 0, not 0 - 9 5d6190b600f5fc98d16e7b459b55d44a5860fef7 Michael Fogleman 2013-03-31 23:49:26
Suggest multiple ways to run in OS X 84e6e2e1c45bdcbd18105258dc501c207c101aa1 Adam McKerlie 2013-03-31 17:34:59
Tweaked textures to be more vibrant and simillar to original Minecraft f5827045a0022a04cba25bda68dec73989d90b6e Piotr Grabowski 2013-03-31 16:22:36
Use Pyglet 1.2 for OS X 6c348ae97adabac3e234295c40aa5d2617cf1eb9 Adam McKerlie 2013-03-31 13:10:44
Added support for creating all types of breakable blocks. e825d879f9c1cd9b395451187297780592fea83b geppettodivacin 2013-03-31 04:08:19
use GLfloat instead of c_float 7042d8cb277aed7bdd4c875f9ff647bff7156898 Michael Fogleman 2013-03-31 00:24:41
pep8 818cc44e41f7a0b2e7f3cc7199b2f8cce32d4658 jminardi 2013-03-30 07:30:34
Commit 9adeeb887151560a9e3663c1e03bd1ebf210b6ae - change kwargs to be more self consistent
Author: jminardi
Author date (UTC): 2013-04-05 06:47
Committer name: jminardi
Committer date (UTC): 2013-04-05 06:47
Parent(s): 1f9a8f7745560f170bd38f9ccdfd20828a34561c
Signing key:
Tree: c17ae80215e845e5f7e3de421f725c8457b7ae36
File Lines added Lines deleted
main.py 8 8
File main.py changed (mode: 100644) (index 7dc4a5f..4b7a7a0)
... ... class Model(object):
221 221 """ """
222 222 self.add_block(position, texture, False) self.add_block(position, texture, False)
223 223
224 def add_block(self, position, texture, sync=True):
224 def add_block(self, position, texture, immediate=True):
225 225 """ Add a block with the given `texture` and `position` to the world. """ Add a block with the given `texture` and `position` to the world.
226 226
227 227 Parameters Parameters
 
... ... class Model(object):
231 231 texture : list of len 3 texture : list of len 3
232 232 The coordinates of the texture squares. Use `tex_coords()` to The coordinates of the texture squares. Use `tex_coords()` to
233 233 generate. generate.
234 sync : bool
234 immediate : bool
235 235 Whether or not to draw the block immediately. Whether or not to draw the block immediately.
236 236
237 237 """ """
238 238 if position in self.world: if position in self.world:
239 self.remove_block(position, sync)
239 self.remove_block(position, immediate)
240 240 self.world[position] = texture self.world[position] = texture
241 241 self.sectors.setdefault(sectorize(position), []).append(position) self.sectors.setdefault(sectorize(position), []).append(position)
242 if sync:
242 if immediate:
243 243 if self.exposed(position): if self.exposed(position):
244 244 self.show_block(position) self.show_block(position)
245 245 self.check_neighbors(position) self.check_neighbors(position)
246 246
247 def remove_block(self, position, sync=True):
247 def remove_block(self, position, immediate=True):
248 248 """ Remove the block at the given `position`. """ Remove the block at the given `position`.
249 249
250 250 Parameters Parameters
251 251 ---------- ----------
252 252 position : tuple of len 3 position : tuple of len 3
253 253 The (x, y, z) position of the block to remove. The (x, y, z) position of the block to remove.
254 sync : bool
254 immediate : bool
255 255 Whether or not to immediately remove block from canvas. Whether or not to immediately remove block from canvas.
256 256
257 257 """ """
258 258 del self.world[position] del self.world[position]
259 259 self.sectors[sectorize(position)].remove(position) self.sectors[sectorize(position)].remove(position)
260 if sync:
260 if immediate:
261 261 if position in self.shown: if position in self.shown:
262 262 self.hide_block(position) self.hide_block(position)
263 263 self.check_neighbors(position) self.check_neighbors(position)
 
... ... class Model(object):
407 407 """ Process the entire queue while taking periodic breaks. This allows """ Process the entire queue while taking periodic breaks. This allows
408 408 the game loop to run smoothly. The queue contains calls to the game loop to run smoothly. The queue contains calls to
409 409 _show_block() and _hide_block() so this method should be called if _show_block() and _hide_block() so this method should be called if
410 add_block() or remove_block() was called with sync=False
410 add_block() or remove_block() was called with immediate=False
411 411
412 412 """ """
413 413 start = time.clock() start = time.clock()
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/fogman/nakamoto-station

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/fogman/nakamoto-station

Clone this repository using git:
git clone git://git.rocketgit.com/user/fogman/nakamoto-station

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main