LaserBootstrap

De Neurohack.cc.
Aller à : Navigation, rechercher

Assuming basic python knowledge, this page will explain how to use the empty laser game framework with built in simulator (needs pygame) : you can develop everywhere no ilda laser needed.  

Simulator.jpg

Sommaire

Download code

https://github.com/tmpbci/Cookie-Paris-2017-Laser-competition-examples

Objects points generators

  • Look for ready made objects points generators like logo.py, cube.py,.. Duplicate one of them to create yours and modify accordingly.
  • Their draw function refers to 3 available commands : Line (from to point A to point B), Polyline (a list of points) et LineTo (draw to point A). Desired color is also mandatory.
  • Laser are "slow", flickering will occur if you don't think your objects and lines order to minimize laser beam movements.

Objects handling

Let's use the cube example cube.py :

Cube.jpg
  • Search in main.py to init the object points generator like gstt.cb = cube.Cube()
  • If you want to modify some of your object parameters from main.py. Use something like gstt.cb.Change(gstt.cubeangleX,gstt.cubeangleY,gstt.cubeangleZ)
  • Be sure to call in the main loop something like gstt.cb.Draw(fwork) to actually display your object.

Different states

  • Read the code and you will understand different game states like drawing logo display.
  • logo.py :
Logo.jpeg
  • A futuristic race game animation is included using : track.py and ship.py. Again be sure to locate in main.py how we change objects properties like gstt.ship.Move(gstt.shipX,gstt.shipY).
Wipe.jpg
  • Also included there is lastl.py that can load a 3D object stl. Use only a few vertices objects if you don't want flickering.
  • This is just simple democode for drawing lines with an ILDA laser in python. There is no hidden points nor laser beam path optimization. If you do develop these needed improvments or create better code : please share.
  • For the Laser competition @ Cookie Paris 2017 a demo state order has been added, like levels in a traditionnal game (gstt.demostate)

Help

  • A few people a Jack Hackerspace in Paris were at a previous laser game jam. You can show up wednesday evening during their public meeting.
  • Drop a mail to sam at neurohack.cc

Other python examples without builtin simulator

  • A death star tunnel :
Swtunnel.jpg
Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Boîte à outils