I Made 3D MINECRAFT in PYTHON using Ursina!
HTML-код
- Опубликовано: 8 июн 2024
- In this Python tutorial I code a minecraft clone using a 3d library called Ursina. I create the main mechanics of minecraft which will allow us to place and destroy blocks to build up our world.
Code & assets on github: github.com/russs123/minecraft...
Credits for assets used:
Low poly 3D blocks: devilsworkshop.itch.io/essent...
Timestamps:
00:00 Intro
00:25 Project Setup
01:07 Create App
03:20 Create Player
04:45 Setup Block Class
08:15 Generate Terrain
11:25 Place Down Blocks
14:20 Destroy Blocks
16:30 Select Different Block Types
18:30 Randomize Terrain With Perlin Noise
Python is the language that makes most sense to me.
Ive been trying to learn all these different languages but so far python is the only one that has really clicked for me.
Im excited to give this engine a try
Same! Im so excited to try this!
I agree! Learn PYTHON! :D sure there's faster, more complicated languages. but not really when you consider the speed at which you can develop. and it's so much fun!
I've been messing around with Ursina lately and wanted to expand the minecraft demo that's in the official docs to add some more features. Hope you like it!
A written version of the tutorial is on my website here: www.codingwithruss.com/ursina/minecraft-in-python-3d-game-tutorial/
WTH! I WAS LITERALLY JUST SEARCHING HOW TO MAKE MINECRAFT IN URSINA AND YOUR VIDEO WAS THERE, YOU R A SAVIOUIR
Glad I could help :D
Thank you for the video!
Without you, I would not have known that there is 3D in Python 🤯
Haha I spent so much time doing 2D that I didn't really consider 3D in python as an option
Can you please do a tutorial on how to add a title screen and multiple mode selection like flat and this mode?
This is very cool, are you going to make it a series?
Thank you! I don't think I'll turn this one into a series but I may do more in ursina
I would have thought, since Panda3D had built-in Perlin Noise, so would Ursina, but appears not. Anyway, this is a perfect springboard. I developed a moderately sophisticated terrain generator using Pyglet but that engine is too low-level for me and without spending more time than I care to learning OpenGL, I cannot get the performance I need out of it. Ursina's (and Panda's) Mesh class is far more intuitive, plus I have experience with it.
I wont be using these textures and I don't see a license for the code, so unless you alert me otherwise, I'll be re-releasing whatever I use, plus all my work under GPLv3. Thanks!
Cheers!
Hey could you please tell me how to increase the size of the map like the width?
Hey coding with Russ, found your channel based on your reflection on two years making games, I am also planning on learning python and making games and posting RUclips videos about them, and I just want one tip from you, I don’t care what part of the process it is about, but just one tip
Hey! Hmm one tip, that's difficult! If you're just starting out learning python then I would say start with small projects and progress to bigger ones as you get more familiar. It's tempting to jump into a big platformer from the start but it's very easy to get bogged down and lose motivation, so keep it simple to begin with.
can you please tell which app you use to code?
It says __init__() takes from 1 to 2 positional arguments but 3 were given please help
I have problems with the textures, the textures are not loading.
Bro I like you very much. Because of you I can now program games❤ can you make an tutorial how to make a shader in Pygame that will be very interesting
Thank you! Glad the tutorials helped. I haven't messed around with shaders but if I do, then i'll make a tutorial as well.
Can you make a tutorial explaning how to make a 3d game in Unity or UE5 by the way when will you make another tutorial on a python 2d game??
I used the "groundEarth.obj" file, but the ground is a single large block. HELP
You should use pipenv to sandbox the version control or container.
Sir, can u teach us to add random entity's like zombies and how to expand the world
Like he said expanding the world would cause the game to slow down quickly you can change this:
for x in range(-10, 10):
for z in range(-10, 10):
you can change the values to higher numbers but after i chose 20 i was down to 60 fps
@ABigLumpofClay I decreased it to 5 and it works pretty well. But its small so I stick to 7.
@@gamalielgerona2391 5 is very low tho
do you know a way to convert all of the blocks into chunks? so it reduce the lag?
No, because they will load more in the background, so the FPS will be low
i do not get it why does it still say missing models, i have checked the path, IT IS RIGHT, but it still says missing models, same applies for textures, i have also tried the code from the github, making sure i didn't spell anything wrong but no, the problem is still there, if anyone can help me please help, thank you
Do you have downloaded the textures and the model?
@@KesballoGames yes i did, from the link in the description
@@KesballoGames nvm i switched to IDLE, i used pycharm and that's why i had issues, thanks for the help btw!
i have used your coding but it is showing warning for missing model please tell me how to sort out this
install the assets from the description and put them in your project
actually i have the same issue right now
very good. i saw same tutorial in code spacer and clear code channels first.
but you explain it more clearly and its so good
Thank you!
Can u make a 3d simple FPS in ursina python
Maybe!
Yes, of course you can!
My cursor gone vanished and I can't escape from this code, what do I do?
You can use the Shift + Q shortcut while the game window is open and it will disappear!
@@slavica1505Or alt+f4
how do we download the assets
ever thought about clicking the link in the description?
ursina module not work please help
Did you install it?
Not quite the minecraft on the video thumbnail is it!
Its better to have a sky so I just put 'sky = Sky()'
Plus, you can add 'window.fullscreen = True'.
Coding with russ please make your face reval
i am geting this eror help plzzz
set window position: Vec2(137, 77)
:prc(warning): changing default value for ConfigVariable paste-emit-keystrokes from '1' to '0'.
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
package_folder: C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\ursina
asset_folder: c:\mygames
Traceback (most recent call last):
File "c:\mygames\start.py", line 6, in
mouse_sensitivity=vec2(100, 100),
^^^^^^^^^^^^^^
TypeError: 'module' object is not callable
PS C:\mygames>
hi
👋
why does this not work, this is the code:
from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
import perlin_noise
app = Ursina()
player = FirstPersonController(position=(0,5,0))
ground = Entity(
model="plane",
scale=(3500,1,3500),
texture="grass",
collider="box")
block_textures { < - invalid syntax
"grass": load_texture("assets/textures/groundEarth.png")
}
class Block(Entity):
def _init_(self, position, block_type)
app.run()
if you could help that would be great!
You forgot the equal sign for the 'block_textures' dictionary.