ILB_Snake v1.0.0
I_LIKE_BREAD7
Introduction
This plugin creates a Snake minigame.
Features
This plugin creates a new scene and plays a snake minigame.
The plugin handles input, graphics, and sound effects on its own, so can be used as-is, but can also be customized using parameters and plugin commands.
The plugin also allows you to define different skins for the snake's body and food.
It also saves the total score to a variable and lets you define custom common events to be played when the minigame starts, ends or is paused/cancelled (escape is pressed) by the player. That allows you to customize the behavior (display custom game instructions, display the total score, pause/cancel the game etc.)
The plugin handles keyboard input (up/down/left/right) and simple mouse controls (the snake will move towards the direction that was clicked).
Screenshots
How to Use
Add it using the plugin manager and configure the necessary plugin parameters.
The only parameters you have to change are the common event ids and the score variable id.
These are optional so if you don't want to use them you can set them to 0 instead.
If you do that the game will not run any custom common events and will not save the score to any variable.
For an example of how to use all the features see the attached demo.
Plugin Commands
* ILB_Snake start 5 # Starts the game at level 5 (lower levels are more difficult), accepts variables on the \V[ID] format, e.g. ILB_Snake start \V[1]
* ILB_Snake stop # Stops the minigame and returns to the map
* ILB_Snake reset # Resets the state of the game
* ILB_Snake snakeimageoffset 0,0 48,48 # Redefines the "Snake Image Offsets" parameter, the two image offsets (0,0 and 48,48) will now be alternating (one segment 0,0 next segment 48,48 and so on)
* ILB_Snake foodimageoffset 0,0 48,48 # Redefines the "Food Image Offsets" parameter, the two image offsets (0,0 and 48,48) will now be alternating (one food image 0,0 next 48,48 and so on)
* ILB_Snake snakeimage img/characters/Actor1 # Redefines the "Snake Image Path" parameter
* ILB_Snake foodimage img/characters/Actor2 # Redefines the "Food Image Path" parameter
* ILB_Snake eatse {"name":"Absorb1","volume":90,"pitch":100,"pan":0} {"name":"Absorb2","volume":90,"pitch":100,"pan":0} # Redefines the "Eat Sound Effects" parameter, the two sound effects will now alternate
* ILB_Snake crashse {"name":"Absorb1","volume":90,"pitch":100,"pan":0} # Redefines the "Crash Sound Effect" parameter
Demo
The common event, variable and switch ids are a little weird because I copied them from another project, but only the ones used in the demo have names, all the others are blank, so they shouldn't be too difficult to find.
Download
rpg-maker-stuff/mv/ILB_Snake.js at main · ILikeBread7/rpg-maker-stuff
Some RPG Maker plugins I made. Contribute to ILikeBread7/rpg-maker-stuff development by creating an account on GitHub.
github.com
I also have a bunch of other plugins in the same repository if you would like to check them out (all on the same terms)
rpg-maker-stuff/mv at main · ILikeBread7/rpg-maker-stuff
Some RPG Maker plugins I made. Contribute to ILikeBread7/rpg-maker-stuff development by creating an account on GitHub.
github.com
Terms and Credits
The plugin can be used for any purpose (free, commercial, editing, redistribution modified or unmodified).
Credit is welcome but not required. If you want to credit, credit me as I_LIKE_BREAD7 or ILikeBread7 (I use these interchangeably, but the version with the underscores is preferred if possible).
本贴来自国际rpgmaker官方论坛作者:I_LIKE_BREAD7处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/snake-minigame.170363/