Where to begin? I have coded games in the past using engines. From drag and drop to GML (game maker language). I dabbled in python and java. I even have made small websites. I was not much involved in theses heavily until I had come across the game Grey Hack. This hacking sim had coding in a language most call GreyScript.
I got engrossed with GreyScript; I thought I knew everything about it until someone had mention that it was a fork from another language. I inquired and found out it was derived from a simple, easy to learn language called MiniScript. After messing with Mini Micro for the first time I fell in love with the language.
The simplicity of this language out weighs the learning curve for others. If you didn't know how to code, or know where to start learning some basic coding practices or logic theories or methods; MiniScript has an entire wiki and a wonderful community that is there to help support and provide feedback. Many users of MiniScript had come up with wonderful ideas and projects. They have shared these amongst each other, either on itch.io, forums, or any place that is accepting of their games. Language is clean and most everything has a page within the MiniScript Wiki. Even my own kids love the language.
The community involved in MiniScript also performs several events throughout the year for good fun and practice. When I am not coding in Java, Python, or any other language; I tend to find myself locked in coding away in Mini Micro.
Myself, I have several projects in MiniScript language. Each worked on based on mood and priority:
- Conquest RPG
- Autonomous World
- OS (within Mini Micro)
The above projects are all done using MiniScript. Below gifs/code (ignore the mouse) is what Mini Micro/MiniScript is capable of and is a current project number 2 on the list.
Below code was used to achieve this:
Code:
//imports
import "mini_peeps"
globals["mini_peeps"] = mini_peeps.mini_peeps
x_cords = range(0, (gfx.width - 10))
y_cords = range(0, (gfx.height - 10))
max_entities = 200
entities = []
items = []
storages = {}
berry_bush = {}
berry_bush.type = "food"
berry_bush.symbol = "#"
berry_bush.COLOR = color.blue
berry_bush.x = 0
berry_bush.y = 0
berry_bush.nutrients = 25
create_mini = function(count)
for i in range(0, count -1)
mini_me = new mini_peeps
mini_me.gen_cords x_cords, y_cords
mini_me.gen_dominateHand
mini_me.gen_gender
mini_me.to_do = []
globals.entities.push mini_me
end for
end function
create_mini 3
update = function
clear
for entity in entities
entity.draw
end for
end function
//begin sim
while true
update
for entity in entities
entity.brain x_cords, y_cords
end for
yield
end while
Code that was imported in:
mini_peeps = {}
mini_peeps.x = 0
mini_peeps.y = 0
mini_peeps.symbol = "@"
mini_peeps.COLOR = color.fuchsia
mini_peeps.gender = ""
mini_peeps.rest = 0
mini_peeps.to_do = null
mini_peeps.max_hunger = 100
mini_peeps.hunger = 0
mini_peeps.dominate_hand = ""
mini_peeps.hands = {"left":[], "right":[]}
mini_peeps.draw = function
gfx.print self.symbol, self.x, self.y, self.COLOR
end function
mini_peeps.gen_gender = function
genders = ["male", "female"]
self.gender = genders[ceil(rnd * genders.len -1)]
end function
mini_peeps.gen_dominateHand = function
dominate_hands = ["left", "right"]
self.dominate_hand = dominate_hands[ceil(rnd * dominate_hands.len -1)]
end function
mini_peeps.gen_cords = function(xcords, ycords)
self.x = xcords[ceil(rnd * xcords.len -1)]
self.y = ycords[ceil(rnd * ycords.len -1)]
end function
mini_peeps.action = function
for item in self.to_do
if item.type == "move" then
if self.x < item.x and self.x != item.x then self.x = self.x + 1
if self.x > item.x and self.x != item.x then self.x = self.x - 1
if self.y < item.y and self.y != item.y then self.y = self.y + 1
if self.y > item.y and self.y != item.y then self.y = self.y - 1
if self.x == item.x and self.y == item.y then self.to_do.remove __item_idx
end if
end for
end function
mini_peeps.brain = function(xcords, ycords)
dice = 0
actions = ["move"]
targetable = ["food"]
if self.to_do.len != 0 then
self.action
return
end if
if self.rest != 0 then
self.rest = self.rest - 1
return
end if
dice = ceil(rnd * 8)
if dice == 4 then self.x = self.x + 1
if dice == 5 then self.x = self.x - 1
if dice == 6 then self.y = self.y + 1
if dice == 3 then self.y = self.y - 1
if dice == 7 then self.rest = ceil(rnd * 200)
if dice == 8 or dice == 2 or dice == 1 then
action = {}
action.type = ""
action.x = 0
action.y = 0
action.target = ""
local_action = new action
local_action.type = actions[ceil(rnd * actions.len -1)]
if local_action.type == "move" then
local_action.x = xcords[ceil(rnd * xcords.len - 1)]
local_action.y = ycords[ceil(rnd * ycords.len -1)]
end if
self.to_do.push local_action
end if
end function
I do plan on sharing more of thoughts and experiences with miniscript. I have ran into oops moments, doh moments. But everyone has been there and everyone has hit that "writers block" while coding. MiniScript coding looks imtimidating at first, but once you dive into it, it is super fun and super easy to try out, play around in and learn from it. I will say this language has gotten me to to be fully involved with other languages such as Python and Java, and it has made learning them and understanding them in a better perspective and view. All done by just practicing and learning in MiniScript. Will see you guys again soon!
Comments
Post a Comment