Jump to content

Snake in Metin2


Recommended Posts

  • Bronze

M2 Download Center

This is the hidden content, please
( 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:

This is the hidden content, please

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 9
  • Sad 1
  • Lmao 3
  • Good 6
  • Love 2
  • Love 11
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Announcements



×
×
  • 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.