Code Monkey home page Code Monkey logo

doom-style-game's Introduction

DOOM style 3d (raycasting) game in Python (based on Wolfenstein 3d)

Control: 'WASD' + mouse

doom

doom-style-game's People

Contributors

stanislavpetrovv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doom-style-game's Issues

AnimatedSprite.get_images method returns sprite images in incorrect order

Development on mac may result in the return of sprite images in the incorrect order. For example, your weapon may start off in the firing state and look strange when using it, or the animation of npc's may look odd. I propose using the natsort library to sort the animated sprite pngs. So add this to the requirements.txt:
natsort==8.2.0
and change
def get_images(self, path): images = deque() for file_name in os.listdir(path): if os.path.isfile(os.path.join(path, file_name)): img = pg.image.load(path + '/' + file_name).convert_alpha() images.append(img) return images
to:
def get_images(self, path): images = deque() file_names = natsorted(os.listdir(path)) for file_name in file_names: if os.path.isfile(os.path.join(path, file_name)): img = pg.image.load(f'{path}/{file_name}').convert_alpha() images.append(img) return images
but i'm open to any better alternatives.

It may also be the case that I'm the only one with this issue.

Cant rotate player ?

I am loving this tutorial on youtube and working my way through it
I have a really weird behaviour tho
in the 2d map and on the projection
when I move left and right its doesnt rotate, only moves the player horizontally or vertically ?
I just cant work out why ?

SyntaxError: invalid syntax

i have error in this line, please help me
pg.display.set_caption(f'{self.clock.get_fps() :.1f}')
^
SyntaxError: invalid syntax

ValueError: Cannot scale to negative size

While trying out object_renderer.py (around the the 20:15 mark in the video), I'll encounter an error, often when I turn at the same time I'm moving. I've even copy-pasted lines from the repo into my own copy and it still gives the same error. Here's the error text:

pygame 2.1.2 (SDL 2.0.18, Python 3.10.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "/Users/tom/Desktop/Python/RaycastingGame/main.py", line 53, in <module>
    game.run()
  File "/Users/tom/Desktop/Python/RaycastingGame/main.py", line 47, in run
    self.update()
  File "/Users/tom/Desktop/Python/RaycastingGame/main.py", line 27, in update
    self.raycasting.update()
  File "/Users/tom/Desktop/Python/RaycastingGame/raycasting.py", line 111, in update
    self.get_objects_to_render()
  File "/Users/tom/Desktop/Python/RaycastingGame/raycasting.py", line 21, in get_objects_to_render
    wall_column = pg.transform.scale(wall_column, (SCALE, proj_height))
ValueError: Cannot scale to negative size

I'm guessing involves some kind of math, but I wouldn't know where and how to begin to fix it. Any thoughts?

integer argument expected got float

On starting of main.py I get the error:

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "main.py", line 72, in <module>
    game = Game()
  File "main.py", line 25, in __init__
    self.new_game()
  File "main.py", line 33, in new_game
    self.weapon = Weapon(self)
  File "/tmp/DOOM-style-Game/weapon.py", line 8, in __init__
    [pg.transform.smoothscale(img, (self.image.get_width() * scale, self.image.get_height() * scale))
  File "/tmp/DOOM-style-Game/weapon.py", line 8, in <listcomp>
    [pg.transform.smoothscale(img, (self.image.get_width() * scale, self.image.get_height() * scale))
TypeError: integer argument expected, got float

Error while converting this repo to exe in one file via pyinstaller.

Traceback (most recent call last):
File "main.py", line 72, in
File "main.py", line 25, in init
File "main.py", line 30, in new_game
File "object_renderer.py", line 9, in init
self.wall_textures = self.load_wall_textures()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "object_renderer.py", line 59, in load_wall_textures
1: self.get_texture('resources/textures/1.png'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "object_renderer.py", line 54, in get_texture
texture = pg.image.load(path).convert_alpha()
^^^^^^^^^^^^^^^^^^^
FileNotFoundError: No file 'resources/textures/1.png' found in working directory 'C:\Users\REDACTED\Desktop\DOOM-style-Game Output'.

I put the correct script location, the correct icon, i put all the correct directories and subdirectories, and also put all the other .py files in additional files section, and then converted it, but it gives the error above, like there is a file there????

help

OMG plz read

SO GOOD!!!
Plz make it so that it is not so sensitive plz?

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.