Crazy Tronners King of the Hill

Stuff about Crazy Tronners Wild Fortress and other Crazy-Tronners servers goes here.

Moderators: K-Yo, kyle

Post Reply
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1856
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Crazy Tronners King of the Hill

Post by kyle »

A new game mode has been born. It is king of the hill an idea Vanhayes and dubStep asked me to create. The object is to stay inside the zone without any other competitors getting inside. for every so many seconds that you stay in the zone you will be awarded so many points. The default values are for every 5 seconds you stay inside you get 1 point.

the settings

Code: Select all

KOH_SCORE 1
KOH_SCORE_TIME 5
how to spawn a zone

Code: Select all

SPAWN_ZONE koh posx posy radius growth xdir ydir interactive(1 or 0) r g b target_size
the code is in sty+ct

a sample script wrote in python

Code: Select all

#!/usr/bin/python
# -*- coding: utf-8 -*-
from sys import stdout, stdin
from os import stat
from time import sleep, time
from random import randint
from re import match

########################################################################
##                       Configuration setting                        ##
########################################################################

# file_paths
ladderlog = '/path/to/ladderlog.txt'
output_file='/path/to/cmds.txt'    # file to read into server

# miscellaneous  settings
next_round=0
game_time=-5


# Create a string from a a position in an array to the end of array
def g_build_string(array, startval):
	str=""
	for  i in range(startval, len(array)):
		str += array[i]
		str += " "
	return(str.strip())

#output the data to server
def o_writter(text):
    stdout.write(text)
    stdout.flush()
    f = open(output_file, 'a')
    f.write(text)
    f.close()

file = open(ladderlog,'r')

st_results = stat(ladderlog)
st_size = st_results[6]
file.seek(st_size)

while 1:
    where = file.tell()
    line = file.readline()
    if not line:
        sleep(1)
        file.seek(where)
    else:
        # START Strip the [L] if we are getting console log
        game_end_last=False
        if match("^\[L\]", line):
            line  = line.replace("[L]","", 1)
            line = line.strip()
        # END Strip the [L] if we are getting console log
        # START PLAYER_ENTERED <player> <ip> <grid  name>
        if match("^PLAYER_ENTERED", line):
            keywords = line.split()
            o_writter("CONSOLE_MESSAGE 0xff1c15* 0xeeff00Welcome 0xff1c15%-15s 0xeeff00to Crazy Tronners King of the Hill.            0xff1c15*\n" % (g_build_string(keywords , 3) ))
        # END PLAYER_ENTERED
        # START GAME_TIME watch the game time to update settings based on time
        if match("^GAME_TIME", line):
            keywords = line.split()
            game_time=int(keywords[1])
            if (game_time == -1):
                y=randint(0, 450)+25
                x=randint(0, 450)+25
                radius=randint(0, 15)+20
                o_writter("SPAWN_ZONE n king koh "+str(x)+" "+str(y)+" "+str(radius)+" 0\n")
            if (((game_time%25) == 0) and (game_time is not 0)):
                o_writter("COLLAPSE_ZONE king\n")
                y=randint(0, 450)+25
                x=randint(0, 450)+25
                radius=randint(0, 15)+20
                o_writter("SPAWN_ZONE n king koh "+str(x)+" "+str(y)+" "+str(radius)+" 0\n")
            # start of deadly bouncy balls
        # END of GAME_TIME
        # START ROUND_COMMENCING A new round is starting, let's prepare the following round.
        if match("^ROUND_COMMENCING", line):
            keywords = line.split()
            # find the current map being played, for settings.
            next_round=int(keywords[1])
            if ( (next_round > int(keywords[2])) or (next_round < 0) ):
                next_round=1
            if ( next_round == int(keywords[2]) ):
                o_writter("CENTER_MESSAGE Final Round \n")
            else:
                o_writter("CENTER_MESSAGE Round " + str(next_round) + " of " + keywords[2] + "\n")
            sleep(1)
Image

User avatar
MrsKsr
Shutout Match Winner
Posts: 807
Joined: Fri Feb 20, 2009 2:37 am
Location: Paris
Contact:

Re: Crazy Tronners King of the Hill

Post by MrsKsr »

yay!

/me loves it

ty kylee <333 =)
"You may say I'm a dreamer but I'm not the only one;
I hope some day you will join us, and the world can live as one"


“Too often we underestimate the power of a touch, a smile, a kind word, a listening ear, an honest compliment, or the smallest act of caring, all of which have the potential to turn a life around.”

I believe that to truly love is the ultimate expression of the will to live.

User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2335
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Crazy Tronners King of the Hill

Post by compguygene »

after playing in it yesterday, I decided I luv the physics, shooting settings, scoring, everything. I can see that you may fine tune it..but the basics are perfect kyle. Vanhuys and I thought that it might be nice to set an acceleration on the RIM_WALL, to help get around the map quicker.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm

User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1856
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Crazy Tronners King of the Hill

Post by kyle »

cycle_accel_rim is now 1
Image

User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2335
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Crazy Tronners King of the Hill

Post by compguygene »

Ty kyle....I will be in that server tonight to let you know what I think.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm

User avatar
pie goes moo
Round Winner
Posts: 306
Joined: Wed Aug 12, 2009 10:42 pm
Location: San Antonio, Texas, USA

Re: Crazy Tronners King of the Hill

Post by pie goes moo »

How do you play this? I went on a couple times and couldn't figure it out.
Image

User avatar
MrsKsr
Shutout Match Winner
Posts: 807
Joined: Fri Feb 20, 2009 2:37 am
Location: Paris
Contact:

Re: Crazy Tronners King of the Hill

Post by MrsKsr »

@ pie goes moo

The objective is to get to the white zones as fast as you can and stay there, if you can hold the zone for 5 seconds you will recieve points. As well as core dumping your enemies you can shoot them (brake). After a certain amount of time there is a winzone, which if you enter first win's you the round and again you recieve more points.

Enjoy =P
"You may say I'm a dreamer but I'm not the only one;
I hope some day you will join us, and the world can live as one"


“Too often we underestimate the power of a touch, a smile, a kind word, a listening ear, an honest compliment, or the smallest act of caring, all of which have the potential to turn a life around.”

I believe that to truly love is the ultimate expression of the will to live.

User avatar
pie goes moo
Round Winner
Posts: 306
Joined: Wed Aug 12, 2009 10:42 pm
Location: San Antonio, Texas, USA

Re: Crazy Tronners King of the Hill

Post by pie goes moo »

@dubStep Thanks, I really couldn't figure it out :wink:
Image

User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2335
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Crazy Tronners King of the Hill

Post by compguygene »

Just want to let you know, kyle. I just finished playing in the server with the new RIM_WALL_ACCEL 1. I think that it is just what is needed! Thanks.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm

User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1856
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Crazy Tronners King of the Hill

Post by kyle »

It now should spawn 1 zone for every 3 players
so
1-3 - 1 zone
4-6 - 2 zones
and so on

I haven't had enough players to test it yet but it should work
Image

Post Reply