Jump to content
EN
Play

Forum

Coding101


 Share

Recommended Posts

Title edited upon request.


Sadly, I have no idea how to do that, there are lot of online courses these days. Many of them are free. You might search around and sample what's available for aspiring game developers.

Share this post


Link to post
Share on other sites

 

Title edited upon request.


Sadly, I have no idea how to do that, there are lot of online courses these days. Many of them are free. You might search around and sample what's available for aspiring game developers.

 

Try watching YouTube programming tutorials. It's how I've learned it :)

Share this post


Link to post
Share on other sites

I'm most proficient with Visual Basic due to frequent use at school. Thing is, most languages are pretty similar once you understand the basic principles.

Share this post


Link to post
Share on other sites

I'm most proficient with Visual Basic due to frequent use at school. Thing is, most languages are pretty similar once you understand the basic principles.

Yeah, I agree. With most high-level languages, the simple stuff is pretty easy to understand 

Share this post


Link to post
Share on other sites

Anyone like Drawing???

 

Made this drawing board in Python :D

 

 

 

from tkinter import *


# Size of the board, you can change these
canvas_height = 2000
canvas_width = 1500
# Background Colour, you can change this
canvas_colour = "white" 
p1_x=canvas_width/2
p1_y=canvas_height/2
# Pen Colour, you can change this
p1_colour = "green"

p2_x=canvas_width/2
p2_y=canvas_height/2
# Pen Colour, you can change this
p2_colour = "red"

line_width = 50
line_length = 50
 
def p1_move_N(event):
    global p1_y
    canvas.create_line(p1_x, p1_y, p1_x, (p1_y-line_length), width=line_width, fill=p1_colour)
    p1_y = p1_y - line_length
 
def p1_move_S(event):
    global p1_y
    canvas.create_line(p1_x, p1_y, p1_x, p1_y+line_length, width=line_width, fill=p1_colour)
    p1_y = p1_y + line_length
 
def p1_move_E(event):
    global p1_x
    canvas.create_line(p1_x, p1_y, p1_x + line_length, p1_y, width=line_width, fill=p1_colour)
    p1_x = p1_x + line_length
 
def p1_move_W(event):
    global p1_x
    canvas.create_line(p1_x, p1_y, p1_x - line_length, p1_y, width=line_width, fill=p1_colour)
    p1_x = p1_x - line_length
 
#P2------------------------------------------------------------------------------------------------------
def p2_move_N(event):
    global p2_y
    canvas.create_line(p2_x, p2_y, p2_x, (p2_y-line_length), width=line_width, fill=p2_colour)
    p2_y = p2_y - line_length
 
def p2_move_S(event):
    global p2_y
    canvas.create_line(p2_x, p2_y, p2_x, p2_y+line_length, width=line_width, fill=p2_colour)
    p2_y = p2_y + line_length
 
def p2_move_E(event):
    global p2_x
    canvas.create_line(p2_x, p2_y, p2_x + line_length, p2_y, width=line_width, fill=p2_colour)
    p2_x = p2_x + line_length
 
def p2_move_W(event):
    global p2_x
    canvas.create_line(p2_x, p2_y, p2_x - line_length, p2_y, width=line_width, fill=p2_colour)
    p2_x = p2_x - line_length
 
def erase_all(event):
    canvas.delete(ALL)
    
window = Tk()
window.title("Drawing Board by Shad0w365")
canvas = Canvas(bg=canvas_colour, height=canvas_height, width=canvas_width, highlightthickness=0)
canvas.pack()
 
window.bind("<Up>", p1_move_N)
window.bind("<Down>", p1_move_S)
window.bind("<Right>", p1_move_E)
window.bind("<Left>", p1_move_W)
window.bind("w", p2_move_N)
window.bind("s", p2_move_S)
window.bind("d", p2_move_E)
window.bind("a", p2_move_W)
window.bind("u", erase_all)
 
window.mainloop()

 

Edited by r_GaIaxy2

Share this post


Link to post
Share on other sites

Anyone like Drawing???

 

Made this drawing board in Python :D

 

 

 

from tkinter import *


# Size of the board, you can change these
canvas_height = 2000
canvas_width = 1500
# Background Colour, you can change this
canvas_colour = "white" 
p1_x=canvas_width/2
p1_y=canvas_height/2
# Pen Colour, you can change this
p1_colour = "green"

p2_x=canvas_width/2
p2_y=canvas_height/2
# Pen Colour, you can change this
p2_colour = "red"

line_width = 50
line_length = 50
 
def p1_move_N(event):
    global p1_y
    canvas.create_line(p1_x, p1_y, p1_x, (p1_y-line_length), width=line_width, fill=p1_colour)
    p1_y = p1_y - line_length
 
def p1_move_S(event):
    global p1_y
    canvas.create_line(p1_x, p1_y, p1_x, p1_y+line_length, width=line_width, fill=p1_colour)
    p1_y = p1_y + line_length
 
def p1_move_E(event):
    global p1_x
    canvas.create_line(p1_x, p1_y, p1_x + line_length, p1_y, width=line_width, fill=p1_colour)
    p1_x = p1_x + line_length
 
def p1_move_W(event):
    global p1_x
    canvas.create_line(p1_x, p1_y, p1_x - line_length, p1_y, width=line_width, fill=p1_colour)
    p1_x = p1_x - line_length
 
#P2------------------------------------------------------------------------------------------------------
def p2_move_N(event):
    global p2_y
    canvas.create_line(p2_x, p2_y, p2_x, (p2_y-line_length), width=line_width, fill=p2_colour)
    p2_y = p2_y - line_length
 
def p2_move_S(event):
    global p2_y
    canvas.create_line(p2_x, p2_y, p2_x, p2_y+line_length, width=line_width, fill=p2_colour)
    p2_y = p2_y + line_length
 
def p2_move_E(event):
    global p2_x
    canvas.create_line(p2_x, p2_y, p2_x + line_length, p2_y, width=line_width, fill=p2_colour)
    p2_x = p2_x + line_length
 
def p2_move_W(event):
    global p2_x
    canvas.create_line(p2_x, p2_y, p2_x - line_length, p2_y, width=line_width, fill=p2_colour)
    p2_x = p2_x - line_length
 
def erase_all(event):
    canvas.delete(ALL)
    
window = Tk()
window.title("Drawing Board by Shad0w365")
canvas = Canvas(bg=canvas_colour, height=canvas_height, width=canvas_width, highlightthickness=0)
canvas.pack()
 
window.bind("<Up>", p1_move_N)
window.bind("<Down>", p1_move_S)
window.bind("<Right>", p1_move_E)
window.bind("<Left>", p1_move_W)
window.bind("w", p2_move_N)
window.bind("s", p2_move_S)
window.bind("d", p2_move_E)
window.bind("a", p2_move_W)
window.bind("u", erase_all)
 
window.mainloop()

 

python 2 or python 3?

Share this post


Link to post
Share on other sites

Anyone like Drawing???

 

Made this drawing board in Python :D

 

 

 

 

from tkinter import *


# Size of the board, you can change these
canvas_height = 2000
canvas_width = 1500
# Background Colour, you can change this
canvas_colour = "white" 
p1_x=canvas_width/2
p1_y=canvas_height/2
# Pen Colour, you can change this
p1_colour = "green"

p2_x=canvas_width/2
p2_y=canvas_height/2
# Pen Colour, you can change this
p2_colour = "red"

line_width = 50
line_length = 50
 
def p1_move_N(event):
    global p1_y
    canvas.create_line(p1_x, p1_y, p1_x, (p1_y-line_length), width=line_width, fill=p1_colour)
    p1_y = p1_y - line_length
 
def p1_move_S(event):
    global p1_y
    canvas.create_line(p1_x, p1_y, p1_x, p1_y+line_length, width=line_width, fill=p1_colour)
    p1_y = p1_y + line_length
 
def p1_move_E(event):
    global p1_x
    canvas.create_line(p1_x, p1_y, p1_x + line_length, p1_y, width=line_width, fill=p1_colour)
    p1_x = p1_x + line_length
 
def p1_move_W(event):
    global p1_x
    canvas.create_line(p1_x, p1_y, p1_x - line_length, p1_y, width=line_width, fill=p1_colour)
    p1_x = p1_x - line_length
 
#P2------------------------------------------------------------------------------------------------------
def p2_move_N(event):
    global p2_y
    canvas.create_line(p2_x, p2_y, p2_x, (p2_y-line_length), width=line_width, fill=p2_colour)
    p2_y = p2_y - line_length
 
def p2_move_S(event):
    global p2_y
    canvas.create_line(p2_x, p2_y, p2_x, p2_y+line_length, width=line_width, fill=p2_colour)
    p2_y = p2_y + line_length
 
def p2_move_E(event):
    global p2_x
    canvas.create_line(p2_x, p2_y, p2_x + line_length, p2_y, width=line_width, fill=p2_colour)
    p2_x = p2_x + line_length
 
def p2_move_W(event):
    global p2_x
    canvas.create_line(p2_x, p2_y, p2_x - line_length, p2_y, width=line_width, fill=p2_colour)
    p2_x = p2_x - line_length
 
def erase_all(event):
    canvas.delete(ALL)
    
window = Tk()
window.title("Drawing Board by Shad0w365")
canvas = Canvas(bg=canvas_colour, height=canvas_height, width=canvas_width, highlightthickness=0)
canvas.pack()
 
window.bind("<Up>", p1_move_N)
window.bind("<Down>", p1_move_S)
window.bind("<Right>", p1_move_E)
window.bind("<Left>", p1_move_W)
window.bind("w", p2_move_N)
window.bind("s", p2_move_S)
window.bind("d", p2_move_E)
window.bind("a", p2_move_W)
window.bind("u", erase_all)
 
window.mainloop()

Eh, not really on coding, I draw on sketch up.

Share this post


Link to post
Share on other sites

Made a simple timer cause why not :P

 

import time

seconds_timer = 00
minutes_timer = 00

for i in range(9999999):
    if seconds_timer == 60:
        minutes_timer += 1
        seconds_timer = 0
    print("{}:{}".format(minutes_timer, seconds_timer))
    time.sleep(1)
    seconds_timer += 1

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...