Python in the game world
Upcoming SlideShare
Loading in...5
×
 

Python in the game world

on

  • 1,002 views

Used in SKY presentation

Used in SKY presentation

http://www.sky.is/index.php?option=com_content&view=article&id=1780:2012-vinnuumhverfi-forritarans&catid=25&Itemid=100074

Statistics

Views

Total Views
1,002
Views on SlideShare
930
Embed Views
72

Actions

Likes
0
Downloads
3
Comments
0

4 Embeds 72

http://www.gudmundurjon.net 56
http://gudmundurjon.azurewebsites.net 7
http://gudmundurjonblog.cloudapp.net 5
http://gudmundur.azurewebsites.net 4

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Python in the game world Python in the game world Presentation Transcript

    • Python í leikjaheiminum Guðmundur Jón Halldórsson Tölvunarfræðingur frá HR CCP Games 2012
    • Python• Höfundur málsins er Guido van Rossum• Málið er skýrt eftir „Monty Python‘s Flying Circus“• Python kóðinn er „Open Source“• Dæmi um mismunandi útfærslur: – CPython – PyPy ( 5x hraðara en CPython ) – IronPython (Microsoft útgáfa af Python) – Stackless ( CCP Games ) – ...
    • Nokkrir kostir við Python• Stórt standard library• Gagnvirk skel• Víðtæka grafískan pakka• Mjög færanlegt, með túlk fyrir flest stýrikerfi• Styður hlutbundna högun, fjöl erfðir, klasa, namespaces, módúla, hluti, villur og late (runtime) binding• Styður functional og structured programming methods ásamt hlutbundinni höfun• Very high-level dynamic data types• Dynamic type checking• Sjálfvirk rusla söfnun• Run type checking• Auðveldlega samþætt við C, C++, …, Java og .NET
    • Stackless• Microthreads – „Tasklets“ Hjúpar föll til að leyfi þeim að vera keyrð sem „microthreads“• Channels – Tví átta samskipti milli „tasklets“• Scheduling – „Round robin scheduler“. Schedule tasklets• Serialization – Tasklets má serialize á disk til að halda áfram með framkvæmd síðar
    • Python/Ruby/Lua Family Tree
    • Dæmi um leiki skrifaða í Python• Battle Field 2 og 2142 • Snakeworlds• Battlefield Heroes • SolarWolf • Umbra• BalazarBrothers • Interstate Outlaws• EVE Online • Evil Greg Vs. Eight Year Olds• Freedom Force • Toontown• Mount&Blade • Pirate of the Caribbena• OpenRTS Online• pydance • Code3D• PySol • Termal Enforcer• Slune • Traitors Gate 2
    • Áhugaverð leikjavéla/söfn• PyGame• PySoy• Pyglet• Python-Orge• Panda3d• Blender3d• Horde3d (Mjög áhugaverð)• ...og svo má lengi telja
    • VídeóDÆMI PANDA3D
    • VídeóDÆMI BLENDER3D
    • Panda3d dæmiProcedure CubeVídeóDÆMI PYTHON
    • Skref• Teikna tening• Snúa tening• Hjálparföll (event) – toogleLightsUp – toogleLightsSide – toogleTex – makeSquare• Tengja event-a fyrir [1, 2, 3]• Hlaða inn texture (mynd)
    • Teikna tening UpVinstri Fram Hægri Bak Niður
    • Teikna teningsquare0 = makeSquare(-1,-1,-1, 1,-1, 1)square1 = makeSquare(-1, 1,-1, 1, 1, 1)square2 = makeSquare(-1, 1, 1, 1,-1, 1)square3 = makeSquare(-1, 1,-1, 1,-1,-1)square4 = makeSquare(-1,-1,-1,-1, 1, 1)square5 = makeSquare( 1,-1,-1, 1, 1, 1)snode = GeomNode(square)snode.addGeom(square0)snode.addGeom(square1)snode.addGeom(square2)snode.addGeom(square3)snode.addGeom(square4)snode.addGeom(square5)cube = render.attachNewNode(snode)
    • Snúa, tengja og hlaða# snúacube.hprInterval(5.5, Point3(360,360,360)).loop()# tengjaself.accept("1", self.toggleTex)self.accept("2", self.toggleLightsSide)self.accept("3", self.toggleLightsUp)# hlaða texture sem er myndself.testTexture=loader.loadTexture("maps/photo.png")
    • Spurning• Netfang gudmundurjon@hotmail.com• Twitter @gudmundurjon• LinkedIn gudmundurjon@hotmail.com
    • Áhugaverðir hlekkirPython• http://www.python.org• http://www.stackless.com• http://www.ironpython.net/• http://pypy.org/• http://wiki.python.org/moin/PythonGames• http://www.python.org/about/success/3D• http://www.panda3d.org• http://www.blender.org• http://www.horde3d.orgYoutube• http://www.youtube.com/watch?v=WwMHnJC08vo&feature=related• http://www.youtube.com/watch?v=mQ4qr5bEP6U&feature=mfu_in_order&list=ULKóða dæmi• C:Panda3D-1.7.2samplesProcedural-CubeTut-Procedural-Cube.py