Code Monkey home page Code Monkey logo

mo3d_pygame's Introduction

wkta's GitHub Stats

About me

  • 📫 Contact: thomas.iw [aT] kata.games
  • 🔭 Currently working on the Kata.games system
  • 👯 Wanna collaborate on completing the pyved-engine (Open-source game engine!), see here

mo3d_pygame's People

Contributors

wkta avatar

Watchers

 avatar  avatar

mo3d_pygame's Issues

[Crash] Essayer d'approcher le cube quand celui-ci occupe entièrement l'écran lève une erreur bloquante

Etapes pour reproduire le bug:

  1. Lancer l'application
  2. N'appuyer sur aucune autre touche que la touche Z
  3. Maintenir la touche Z enfoncée jusqu'au crash

Résultat attendu:

Le cube continue de s'approcher de la caméra, ou la dépasse par derrière

Résultat obtenu:

L'application crashe

Environnement:

  • Windows 8.1
  • python version 3.1
  • pygame version 1.9.1release-svn2575
  • numpy version 1.7.1

Fichier joint:

Capture d'écran de l'erreur levée et de la dernière image de l'application
erreur approcher cube z

Commentaires:

L'erreur vient d'un problème de cast d'un infini positif en entier, à la ligne 183:
points += [(int(ex) + int(surface.get_width() / 2), int(ey) + int(surface.get_height() / 2))]

La valeur infinie est issue d'une division par zéro deux lignes au-dessus:
f = 500 / z
ex, ey = x * f, y * f
points += [(int(ex) + int(surface.get_width() / 2), int(ey) + int(surface.get_height() / 2))]
Si z vaut 0, la valeur infinie est assignée à f

Contourner cette erreur - par exemple en posant f = 1 ou f = 10**-10 si z = 0 ne corrige pas entièrement le problème. L'application ne crashe plus, mais le cube disparaît avant même de passer derrière la caméra lorsqu'on l'approche trop. Cet effet est mieux visible si le cube est penché.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.