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)
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
Update README.md 915700d390e41b804e2256bbc8a57e6c7eeadf3e Michael Fogleman 2013-03-29 13:36:19
markdown readme c7fe87c43b7fec820d2d9264c9ba4df7543882cd Michael Fogleman 2013-03-29 13:33:12
Commit f2e7549fef6e3b0f5875711d47b376643eebd176 - add more documentation
Author: jminardi
Author date (UTC): 2013-04-05 06:05
Committer name: jminardi
Committer date (UTC): 2013-04-05 06:05
Parent(s): 2da9daffe74883ea2f573fc494cef5faa8641419
Signing key:
Tree: 8d5e1d31d34a39abc4c356589a6a66ae1f4bb0d0
File Lines added Lines deleted
main.py 17 9
File main.py changed (mode: 100644) (index df276de..cab27a3)
... ... class Model(object):
125 125 # Mapping from sector to a list of positions inside that sector. # Mapping from sector to a list of positions inside that sector.
126 126 self.sectors = {} self.sectors = {}
127 127
128 # Simple function queue implementation.
128 # Simple function queue implementation. The queue is populated with
129 # _show_block() and _hide_block() calls
129 130 self.queue = [] self.queue = []
130 131
131 132 self._initialize() self._initialize()
 
... ... class Model(object):
150 151 # generate the hills randomly # generate the hills randomly
151 152 o = n - 10 o = n - 10
152 153 for _ in xrange(120): for _ in xrange(120):
153 a = random.randint(-o, o)
154 b = random.randint(-o, o)
155 c = -1
156 h = random.randint(1, 6)
157 s = random.randint(4, 8)
154 a = random.randint(-o, o) # x position of the hill
155 b = random.randint(-o, o) # z position of the hill
156 c = -1 # base of the hill
157 h = random.randint(1, 6) # height of the hill
158 h = 60
159 s = random.randint(4, 8) # 2 * s is the side length of the hill
160 s = 30
158 161 d = 1 d = 1
159 162 t = random.choice([GRASS, SAND, BRICK]) t = random.choice([GRASS, SAND, BRICK])
160 163 for y in xrange(c, c + h): for y in xrange(c, c + h):
 
... ... class Model(object):
165 168 if (x - 0) ** 2 + (z - 0) ** 2 < 5 ** 2: if (x - 0) ** 2 + (z - 0) ** 2 < 5 ** 2:
166 169 continue continue
167 170 self.init_block((x, y, z), t) self.init_block((x, y, z), t)
168 s -= d
171 s -= d # decrement side lenth so hills taper off
169 172
170 173 def hit_test(self, position, vector, max_distance=8): def hit_test(self, position, vector, max_distance=8):
171 174 """ Line of sight search from current position. If a block is """ Line of sight search from current position. If a block is
 
... ... class Model(object):
290 293 self.show_block(position) self.show_block(position)
291 294
292 295 def show_block(self, position, immediate=True): def show_block(self, position, immediate=True):
293 """ Show the block at the given `position`.
296 """ Show the block at the given `position`. This method assumes the
297 block has already been added with add_block()
294 298
295 299 Parameters Parameters
296 300 ---------- ----------
 
... ... class Model(object):
336 340 else: else:
337 341 index += 1 index += 1
338 342 # create vertex list # create vertex list
343 # FIXME Maybe `add_indexed()` should be used instead
339 344 self._shown[position] = self.batch.add(count, GL_QUADS, self.group, self._shown[position] = self.batch.add(count, GL_QUADS, self.group,
340 345 ('v3f/static', vertex_data), ('v3f/static', vertex_data),
341 346 ('t2f/static', texture_data)) ('t2f/static', texture_data))
 
... ... class Model(object):
423 428 func(*args) func(*args)
424 429
425 430 def process_queue(self): def process_queue(self):
426 """ Process the entire queue while taking periodic breaks.
431 """ Process the entire queue while taking periodic breaks. This allows
432 the game loop to run smoothly. The queue contains calls to
433 _show_block() and _hide_block() so this method should be called if
434 add_block() or remove_block() was called with sync=False
427 435
428 436 """ """
429 437 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