Raised This Month: $32 Target: $400
 8% 

[ANY] Snake Minigame (Version 1.0)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Plugin ID:
2609
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    46 
    Plugin Description:
    Snake minigame in a panel including highscores.
    Old 10-17-2011 , 18:52   [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #1

    Snake
    A Snake and Snake 2 minigame simulation.

    What's the Source Engine without some retro games? Play Snake in a panel on the left while being dead or waiting for more players. Play with your movement keys and try to eat as much food before biting yourself or hitting the wall.



    Just type !snake (sm_snake) in chat to open the main menu and choose the gamemode.

    This plugin features 2 gamemodes.
    • Snake 1 style: Solid walls. Game over, if you touch the border of the gamefield
    • Snake 2: Sneaking through a wall brings you to the opposite side.

    Each gamemode has it's own top10 accessible from the !snake mainmenu.

    Sometimes there's going to be a second piece of food laying around. Try to get it fast, as it's not there forever! You're going to lose some weight and get shorter.

    Installation:
    1. Upload the snake.smx into you sourcemod/plugins folder.
    2. Edit your databases.cfg and add a "snake" section to save the highscores in. If you don't add anything, highscores will be stored in sourcemod's default "storage-local" sqlite database.
      1. SQLite:
        Code:
            "snake"
            {
                "driver"            "sqlite"
                "database"            "snake"
            }
      2. MySQL:
        Code:
            "snake"
            {
                "driver"            "mysql"
                "host"                "localhost"
                "database"            "snake"
                "user"                "youruser"
                "pass"                "yourpass"
                //"timeout"            "0"
                "port"            "3306"
            }
      3. If you use mysql, execute this query to create the table:
        PHP Code:
        CREATE TABLE `snake_players` (
        `
        steamidVARCHAR64 NOT NULL,
        `
        nameVARCHAR64 NOT NULL,
        `
        score1INT NOT NULL DEFAULT '0',
        `
        score2INT NOT NULL DEFAULT '0',
        PRIMARY KEY ( `steamid` )
        ENGINE InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
    Known issues:
    Some users' machines are unable to display UTF-8 chars ingame, so they won't be able to play this game as they will only see messy squares all over. It's clientside and i don't know how to fix that ;)

    Thanks to:
    • berni/Chanz for their fabulous smlib

    Did you see...:

    Note: This plugin won't compile on the forum due to it's custom include. Use the provided .smx or compile yourself.
    Attached Images
    File Type: jpg snakegamepanel.jpg (29.1 KB, 3212 views)
    Attached Files
    File Type: sp Get Plugin or Get Source (snake.sp - 1603 views - 24.8 KB)
    File Type: smx snake.smx (34.3 KB, 1991 views)
    __________________

    Last edited by Peace-Maker; 09-27-2016 at 18:16. Reason: Upload new screenshot
    Peace-Maker is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 10-17-2011 , 21:10   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #2

    Dear lord baby jesus your awesome!
    __________________
    Fearts is offline
    KyleS
    SourceMod Plugin Approver
    Join Date: Jul 2009
    Location: Segmentation Fault.
    Old 10-17-2011 , 22:27   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #3

    Quote:
    Originally Posted by Fearts View Post
    Dear lord baby jesus your awesome!
    KyleS is offline
    napalm00
    Veteran Member
    Join Date: Jun 2011
    Location: Italy, sadly
    Old 10-18-2011 , 00:55   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #4

    Come back when you make TF2 into TF2
    __________________
    napalm00 is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 10-18-2011 , 16:04   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #5

    I think we should call you
    GameMan (the idiot savant of gaming)

    Might be time for a peace-maker menu in CSS so we can access all your goodies quicker
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    Chronic1
    SourceMod Donor
    Join Date: Jun 2011
    Old 10-19-2011 , 01:08   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #6

    Can you slow down the snake for the one with walls? Its really hard, and the snake moves even faster when it goes up or down. Otherwise Excellent plugin idea! Im using the Tetris one too!
    __________________
    Chronic1 is offline
    sipster19
    Senior Member
    Join Date: Mar 2011
    Old 10-25-2011 , 10:58   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #7

    I found two problems with this plugin:

    1. The numbers are printed twice for the high scores.

    [IMG]http://img703.**************/img703/9694/snakebz.jpg[/IMG]

    2. It doesn't inform the player that by pressing 0, they can pause the game.

    [IMG]http://img849.**************/img849/954/snakepause.jpg[/IMG]

    Last edited by sipster19; 10-25-2011 at 10:59.
    sipster19 is offline
    lascage
    Member
    Join Date: Nov 2010
    Old 11-02-2011 , 09:00   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #8

    When i translate this in French, the compiler say invalid function or declaration in the first line.

    Help plz !

    Last edited by lascage; 11-02-2011 at 09:00.
    lascage is offline
    jungjunghoo
    Senior Member
    Join Date: Sep 2009
    Old 11-02-2011 , 10:31   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #9

    Quote:
    Originally Posted by lascage View Post
    When i translate this in French, the compiler say invalid function or declaration in the first line.

    Help plz !
    If you see AMX mod editor. You can see first line's word.
    delete and re-compile

    Last edited by jungjunghoo; 11-02-2011 at 10:32.
    jungjunghoo is offline
    lascage
    Member
    Join Date: Nov 2010
    Old 11-02-2011 , 15:57   Re: [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #10

    Quote:
    Originally Posted by jungjunghoo View Post
    If you see AMX mod editor. You can see first line's word.
    delete and re-compile
    What's AMX Mod Editor plz ? I don't see what you say !
    lascage is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 11:26.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode