Skip to main content

URSINA - Gaming engine - opensource-python

 HERE COMES THE EASY PYTHON GAMING ENGINE

DESIGN AND DEVELOP GAMES AND PLAY AND EVEN TRAIN UR GAMES

FOR NEURAL NETWORKS


go and download and install pretty easy -

https://www.ursinaengine.org/installation.html


once the installation is done

run this sample from the site which is simple cube movement using keys

similar to what we have played during our earlier gaming days


https://www.ursinaengine.org/introduction_tutorial.html

 


 

 sample  code for simple 3D game design-


from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
 
app = Ursina()
 
cube_orange = Entity(model='cube', color=color.orange, scale_y=20,texture='white_cube')
cube_orange_right = duplicate(cube_orange, origin_z=20)
blue_cube = Entity(model='cube', color=color.blue, scale_y=2, origin_x=5,texture='vignette')
duplicate(cube_orange,origin_x=10)
duplicate(cube_orange,origin_x=20)
duplicate(cube_orange,origin_x=30)
duplicate(cube_orange,origin_x=40)
duplicate(cube_orange,origin_x=50)
duplicate(cube_orange,origin_x=60)
duplicate(cube_orange_right,origin_x=10)
duplicate(cube_orange_right,origin_x=20)
duplicate(cube_orange_right,origin_x=30)
duplicate(cube_orange_right,origin_x=40)
duplicate(cube_orange_right,origin_x=50)
duplicate(cube_orange_right,origin_x=60)
duplicate(blue_cube,origin_x=15)
duplicate(blue_cube,origin_x=25)
duplicate(blue_cube,origin_x=35)
duplicate(blue_cube,origin_x=45)
duplicate(blue_cube,origin_x=55)
duplicate(blue_cube,origin_x=65)
 
moving_cube_left = Entity(model='cube',  color=color.green, has_pickup=False , origin_x=-5)
ball = Entity(model='cube', scale=2, collider='box', speed=0)
 
 
ground = Entity(model='plane', texture='white_cube', scale=1000, collider='box')
 
player = FirstPersonController(model='cube', origin_y=-.5, color=color.orange, has_pickup=False)
camera.z = -5
Sky()
 
def moving_cube_left_drive():
    while (True):
        print(moving_cube_left.x)
        moving_cube_left.x += 0.1
 
def update():   # update gets automatically called.
    player.x += held_keys['d'] * .1
    player.x -= held_keys['a'] * .1
    moving_cube_left.y = moving_cube_left.y * .1  
    ball.x += ball.x * time.dt
     
 
 
app.run()
 


once the set up is done try playing the game

using keys W A S D .

ENJOY GAMING!


                                                    

Comments

Popular posts from this blog

SHA-256 initial values

The simple workout to arrive at the initial values for sha-256 The first 32 bit of the fractional part of the sqroot (first 8 prime number 2-19) Alright what does it say  Sqrroot(prime)- Let’s say the first prime is 2 Sqroot(2)  = 1.414213562373095 Convert to hexadecimal- Since we are worried about the fractional part alone Converting the fractional part would be easy Fractional part- 0.414213562373095 Multiply the fractional part with 16 to arrive at hex 0.414213562373095*16= 6.62741699796952 0.62741699796952*16= 10.03867196751232 0.03867196751232*16=0.61875148019712 0.61875148019712*16=9.90002368315392 0.90002368315392*16=14.40037893046272 0.40037893046272*16=6.40606288740352 0.40606288740352*16=6.49700619845632 0.49700619845632*16=7.95209917530112 Resulting hexadecimal would be 6a09e667 which is  h0 := 0x6a09e667 Iam going to stop at the 8th iteration , why is that ? Since we are interested in 32 bit (8*4=32) Alright to make it clear  Convert hexade...

Linear Regression with one variable - Introduction

 It is not but making a some how clear relationship among variables the dependent and independent variables. talking in terms of maths the equation can be used meaningfully for something may be to determine /predict values from data. if y = m * x + b  the values for m , b can be anything but has to appropriate to predict y  so the loss which is  difference from existing to prediction is close to zero ~0 to start with we can say the one variable as -x  in some scenario m , b are called variables    the equation stated about is a line equation we have any equation  y = 2*x  y = x*x y = 2x +2x*x  so why the need of all these equations , it is all about playing data now a days in machine learning problems we create a data sets , lets consider as x  y to be a value of x the datas . y = datas  when we express the data as a function and plot in the graph we get the curves  take some random data x and plot x and y  x =1 , 2, ...