ProfessorEnte 404 Posted March 4, 2021 Share Posted March 4, 2021 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hey, the idea to implement Snake in Metin2 came from MrSIB I think it's a cool idea and that's why I implemented it. Preview Spoiler Control w,a,s,d to control the snake spacebar = pause Settings You can set in the script if you are allowed to go through the wall or not and change the size of the drawn boxes or the playing field. Execute: e.g. in the game.py above to the imports: "import snakeGame" After logging into the game you will see the window. Settings Spoiler DEBUG = False ## Enable debug BOX_SIZE = 10 ## You can change the size of the drawn boxes as you like. I found 10 quite good. ## width and height are your playfield sizes. I found 200 quite good. But if you set the BOX_SIZE to 1 it is too big. GAME_BOARD_WIDTH = 200 GAME_BOARD_HEIGHT = 200 ## keyboard bindings KEY_RIGHT = app.DIK_D KEY_LEFT = app.DIK_A KEY_UP = app.DIK_W KEY_DOWN = app.DIK_S KEY_PAUSE = app.DIK_SPACE INCREASE_SPEED_AFTER_EAT_COUNT = 3 ## after the snake reaches the length 3, 6, 9, ... the speed is increased. SNAKE_START_COORDS = [[2,1],[1,1],[0,1]] ## head, tail, tail => Ooooo SNAKE_START_DIRECTION = KEY_RIGHT ## the starting direction of the snake START_SPEED = 1.2 ## 1.2 = slow (paint snake every 1.2s) MAX_SPEED = 0.5 ## 0 = fast BORDER_DEAD = True ## if the border is hit then dead (true) or pass through (false) ## https://doc.instantreality.org/tools/color_calculator/ SNAKE_COLOR = grp.GenerateColor(0.027, 0.490, 0.078, 1.0) SNAKE_HEAD_COLOR = grp.GenerateColor(0.176, 0.725, 0.235, 1.0) SNAKE_DEAD_COLOR = grp.GenerateColor(0.9, 0, 0, 1.0) FOOD_COLOR = grp.GenerateColor(0.9, 0.5, 0, 1.0) BORDER_COLOR = grp.GenerateColor(1, 1, 1, 1.0) Have fun! Download: This is the hidden content, please Sign In or Sign Up Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 9 1 3 6 2 11 Link to comment Share on other sites More sharing options...
RedStar 10 Posted March 5, 2021 Share Posted March 5, 2021 Really wonderful, but I preferred it with directional darts Link to comment Share on other sites More sharing options...
Recommended Posts