Jump to content

Recommended Posts

M2 Download Center

Download Here ( 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.

 

gl1sH9E.png

 

Preview

Spoiler

071700kVOwZEQ.gif
071700xQN7SHV.gif
071700Rb411Bz.gif

 

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:

https://mega.nz/file/Fx8CBIAL#YEKYaUKaGTT1js1AS-AAyZY7jhPxAWZd2fjqnzqQLJ8

 

  • Metin2 Dev 2
  • Love 4
  • Love 1
  • Good 2
  • Lmao 2
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.