• IP Copied!
    Loading...
  • Coding updates/bug fixes take time

    MrMe5303

    Mythical
    MrMe5303
    MrMe5303 MrMe5303
    For those that don't know a lot about coding, it takes time. Every app on your phone is actually hundreds of pages of letters, numbers and symbols put together. Here is the code for a very basic pong game that I found online
    ong.py
    #PONG pygame

    import random
    import pygame, sys
    from pygame.locals import *

    pygame.init()
    fps = pygame.time.Clock()

    #colors
    WHITE = (255,255,255)
    RED = (255,0,0)
    GREEN = (0,255,0)
    BLACK = (0,0,0)

    #globals
    WIDTH = 600
    HEIGHT = 400
    BALL_RADIUS = 20
    PAD_WIDTH = 8
    PAD_HEIGHT = 80
    HALF_PAD_WIDTH = PAD_WIDTH / 2
    HALF_PAD_HEIGHT = PAD_HEIGHT / 2
    ball_pos = [0,0]
    ball_vel = [0,0]
    paddle1_vel = 0
    paddle2_vel = 0
    l_score = 0
    r_score = 0

    #canvas declaration
    window = pygame.display.set_mode((WIDTH, HEIGHT), 0, 32)
    pygame.display.set_caption('Hello World')

    # helper function that spawns a ball, returns a position vector and a velocity vector
    # if right is True, spawn to the right, else spawn to the left
    def ball_init(right):
    global ball_pos, ball_vel # these are vectors stored as lists
    ball_pos = [WIDTH/2,HEIGHT/2]
    horz = random.randrange(2,4)
    vert = random.randrange(1,3)

    if right == False:
    horz = - horz

    ball_vel = [horz,-vert]

    # define event handlers
    def init():
    global paddle1_pos, paddle2_pos, paddle1_vel, paddle2_vel,l_score,r_score # these are floats
    global score1, score2 # these are ints
    paddle1_pos = [HALF_PAD_WIDTH - 1,HEIGHT/2]
    paddle2_pos = [WIDTH +1 - HALF_PAD_WIDTH,HEIGHT/2]
    l_score = 0
    r_score = 0
    if random.randrange(0,2) == 0:
    ball_init(True)
    else:
    ball_init(False)


    #draw function of canvas
    def draw(canvas):
    global paddle1_pos, paddle2_pos, ball_pos, ball_vel, l_score, r_score

    canvas.fill(BLACK)
    pygame.draw.line(canvas, WHITE, [WIDTH / 2, 0],[WIDTH / 2, HEIGHT], 1)
    pygame.draw.line(canvas, WHITE, [PAD_WIDTH, 0],[PAD_WIDTH, HEIGHT], 1)
    pygame.draw.line(canvas, WHITE, [WIDTH - PAD_WIDTH, 0],[WIDTH - PAD_WIDTH, HEIGHT], 1)
    pygame.draw.circle(canvas, WHITE, [WIDTH//2, HEIGHT//2], 70, 1)

    # update paddle's vertical position, keep paddle on the screen
    if paddle1_pos[1] > HALF_PAD_HEIGHT and paddle1_pos[1] < HEIGHT - HALF_PAD_HEIGHT:
    paddle1_pos[1] += paddle1_vel
    elif paddle1_pos[1] == HALF_PAD_HEIGHT and paddle1_vel > 0:
    paddle1_pos[1] += paddle1_vel
    elif paddle1_pos[1] == HEIGHT - HALF_PAD_HEIGHT and paddle1_vel < 0:
    paddle1_pos[1] += paddle1_vel

    if paddle2_pos[1] > HALF_PAD_HEIGHT and paddle2_pos[1] < HEIGHT - HALF_PAD_HEIGHT:
    paddle2_pos[1] += paddle2_vel
    elif paddle2_pos[1] == HALF_PAD_HEIGHT and paddle2_vel > 0:
    paddle2_pos[1] += paddle2_vel
    elif paddle2_pos[1] == HEIGHT - HALF_PAD_HEIGHT and paddle2_vel < 0:
    paddle2_pos[1] += paddle2_vel

    #update ball
    ball_pos[0] += int(ball_vel[0])
    ball_pos[1] += int(ball_vel[1])

    #draw paddles and ball
    pygame.draw.circle(canvas, RED, ball_pos, 20, 0)
    pygame.draw.polygon(canvas, GREEN, [[paddle1_pos[0] - HALF_PAD_WIDTH, paddle1_pos[1] - HALF_PAD_HEIGHT], [paddle1_pos[0] - HALF_PAD_WIDTH, paddle1_pos[1] + HALF_PAD_HEIGHT], [paddle1_pos[0] + HALF_PAD_WIDTH, paddle1_pos[1] + HALF_PAD_HEIGHT], [paddle1_pos[0] + HALF_PAD_WIDTH, paddle1_pos[1] - HALF_PAD_HEIGHT]], 0)
    pygame.draw.polygon(canvas, GREEN, [[paddle2_pos[0] - HALF_PAD_WIDTH, paddle2_pos[1] - HALF_PAD_HEIGHT], [paddle2_pos[0] - HALF_PAD_WIDTH, paddle2_pos[1] + HALF_PAD_HEIGHT], [paddle2_pos[0] + HALF_PAD_WIDTH, paddle2_pos[1] + HALF_PAD_HEIGHT], [paddle2_pos[0] + HALF_PAD_WIDTH, paddle2_pos[1] - HALF_PAD_HEIGHT]], 0)

    #ball collision check on top and bottom walls
    if int(ball_pos[1]) <= BALL_RADIUS:
    ball_vel[1] = - ball_vel[1]
    if int(ball_pos[1]) >= HEIGHT + 1 - BALL_RADIUS:
    ball_vel[1] = -ball_vel[1]

    #ball collison check on gutters or paddles
    if int(ball_pos[0]) <= BALL_RADIUS + PAD_WIDTH and int(ball_pos[1]) in range(paddle1_pos[1] - HALF_PAD_HEIGHT,paddle1_pos[1] + HALF_PAD_HEIGHT,1):
    ball_vel[0] = -ball_vel[0]
    ball_vel[0] *= 1.1
    ball_vel[1] *= 1.1
    elif int(ball_pos[0]) <= BALL_RADIUS + PAD_WIDTH:
    r_score += 1
    ball_init(True)

    if int(ball_pos[0]) >= WIDTH + 1 - BALL_RADIUS - PAD_WIDTH and int(ball_pos[1]) in range(paddle2_pos[1] - HALF_PAD_HEIGHT,paddle2_pos[1] + HALF_PAD_HEIGHT,1):
    ball_vel[0] = -ball_vel[0]
    ball_vel[0] *= 1.1
    ball_vel[1] *= 1.1
    elif int(ball_pos[0]) >= WIDTH + 1 - BALL_RADIUS - PAD_WIDTH:
    l_score += 1
    ball_init(False)

    #update scores
    myfont1 = pygame.font.SysFont("Comic Sans MS", 20)
    label1 = myfont1.render("Score "+str(l_score), 1, (255,255,0))
    canvas.blit(label1, (50,20))

    myfont2 = pygame.font.SysFont("Comic Sans MS", 20)
    label2 = myfont2.render("Score "+str(r_score), 1, (255,255,0))
    canvas.blit(label2, (470, 20))


    #keydown handler
    def keydown(event):
    global paddle1_vel, paddle2_vel

    if event.key == K_UP:
    paddle2_vel = -8
    elif event.key == K_DOWN:
    paddle2_vel = 8
    elif event.key == K_w:
    paddle1_vel = -8
    elif event.key == K_s:
    paddle1_vel = 8

    #keyup handler
    def keyup(event):
    global paddle1_vel, paddle2_vel

    if event.key in (K_w, K_s):
    paddle1_vel = 0
    elif event.key in (K_UP, K_DOWN):
    paddle2_vel = 0

    init()


    #game loop
    while True:

    draw(window)

    for event in pygame.event.get():

    if event.type == KEYDOWN:
    keydown(event)
    elif event.type == KEYUP:
    keyup(event)
    elif event.type == QUIT:
    pygame.quit()
    sys.exit()

    pygame.display.update()
    fps.tick(60)
    No imagine how many pages of code there would be for multiple different weapons, weapons that keep track of bullets shot, how far the bullets go, the gravity of the bullets, the damage the bullets do, the reloading. These are some of the thing that need to be coded for just the guns alone. There is also cars, Npc's, warps, kits, achievements and so forth.


    When ever you make changes to the code (updates) there will be parts of the coding that get ruined or don't run properly with each other (creating bugs) and to fix these problems they have to search through the code MANUALLY and pinpoint the error and figure out how to fix it. (This is most likely why in the bug report forum they asked to to re act the bug/glitch, helping them find where the bug most likely is in the code)

    Just thought I'll let you know that coding everything for HavocMC isn't as simple as most of you think it is.
     

    Firelillx

    Mythical
    Firelillx
    Firelillx Firelillx
    I totally agree with your post- coding takes a lot of time and is hard work. I just think other servers invest in development so the bulk of the work is not on one person. Other servers can have more timely updates with less errors because they have more people working on development and they test for bugs before releasing the update to the public.


    I can only speak for myself, but I know when I talk about the server updates, I 100% understand that some errors take longer to fix than others. But at the same time, this server seems to be inefficient in this area compared to other servers (who probably make less $ from donors too).
     

    Cat_Squirrel_Inc

    Mythical
    Cat_Squirrel_Inc
    Cat_Squirrel_Inc Cat_Squirrel_Inc
    Let me say this: Yes, coding takes a ton of time. I personally don't dis the amount of time it takes, as I do know (my friend codes). But the fact that DOES take so long, makes me wonder why they can't hire extra coders. Heck, hire more helpers in general! The server used to rake in the money, but they squandered it, at least, that's how it seems. At this point, it is the owners faults for not taking care of the server. We need a hard reset and a clean sweep of the staff, new owners as well.
     

    Firelillx

    Mythical
    Firelillx
    Firelillx Firelillx
    Let me say this: Yes, coding takes a ton of time. I personally don't dis the amount of time it takes, as I do know (my friend codes). But the fact that DOES take so long, makes me wonder why they can't hire extra coders. Heck, hire more helpers in general! The server used to rake in the money, but they squandered it, at least, that's how it seems. At this point, it is the owners faults for not taking care of the server. We need a hard reset and a clean sweep of the staff, new owners as well.


    I don't think you can just wipe out the owners and get new ones...they um...own the server XD

    I don't agree with their decisions but at the end of the day, they own it.
     

    Cat_Squirrel_Inc

    Mythical
    Cat_Squirrel_Inc
    Cat_Squirrel_Inc Cat_Squirrel_Inc
    I don't think you can just wipe out the owners and get new ones...they um...own the server XD

    I don't agree with their decisions but at the end of the day, they own it.
    My meaning was, the owners need to be replaced. Sell the server. The owners are probably grown a** adults who have lives that take away from MC. Then you ask yourself, do they really want to be managing a ton of kids who whine and complain about everything? No. I say it would be a reasonable action to get new, younger owners who have more spare time.