On All Things Gaming...

On Digital Games... => Game Projects => Topic started by: Benesato on 04 July, 2018, 21:38:34

Title: Python Tower Defence Mk1
Post by: Benesato on 04 July, 2018, 21:38:34
Just getting the ball rolling. Uploading a place-holder image and seeing how things look, format-wise.

def rotate_image(image, angle):
    originalBoundingBox = image.get_rect()
    rotatedImage = pygame.transform.rotate(image, angle)
    rotatedBoundingBox = originalBoundingBox.copy()
    rotatedBoundingBox.center = rotatedImage.get_rect().center
    rotatedImage = rotatedImage.subsurface(rotatedBoundingBox).copy()
    return rotatedImage


this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")
Title: Re: Python Tower Defence Mk1
Post by: Loswaith on 09 July, 2018, 12:06:31
Just a heads up, there is a code block to maintain formatting as needed

Code: [Select]
def rotate_image(image, angle):
    originalBoundingBox = image.get_rect()
    rotatedImage = pygame.transform.rotate(image, angle)
    rotatedBoundingBox = originalBoundingBox.copy()
    rotatedBoundingBox.center = rotatedImage.get_rect().center
    rotatedImage = rotatedImage.subsurface(rotatedBoundingBox).copy()
    return rotatedImage


this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")
Title: Re: Python Tower Defence Mk1
Post by: Benesato on 09 July, 2018, 22:14:55
Ahh, OK. Didn't know about that, though it seems to keep the formatting OK anyway.

this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")

Code: [Select]
this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")
Title: Re: Python Tower Defence Mk1
Post by: Loswaith on 10 July, 2018, 13:53:27
It does for smaller stuff if it's not too much of an issue, but if doing something with many lines it condenses it into a scroll box. keeping the overall post from becoming huge :)