Hello everyone. I know there's a few people in this community that would like to know how to make their own game, and I am gonna show how to make a game, all I learned was with Falacy, Forum_Account, DM Reference Guide and some code tips with the languages I knew before DM.
I am gonna assume you all can create an environment, all files/source will be shared when we complete this simple game.
Just after you create your Environment, you will be asked to name your first code file, name it whatever you want. I'll call it Main.dm and then do the following:
Here we are setting the name of our world/game, I called it Bleach Game Tutorial, because I want to make it loosely based on Bleach anime with some RPG elements.
What we are accomplishing with map_format is how we want to display our map, I choose TILED_ICON_MAP format but that's not how I want because there's some differences between all map formats, and if I want to use larger icons, what should I use ? This one is for you.
View doesn't matter atm, I'l lget into it later on. And for last I am only setting /mob/Alive as our would mobs default.
I am setting our mob to be visible, why ? Just using it to avoid errors when compiling, but it will change in future.
Using Login procedure to be called whenever a player enters the game.
With src.loc = locate(25, 25, 2) I am setting the players location to a certain place in map, locate(x, y, z).
In Logout it's called whenever a player leaves the game, and deletes the mob.
Now, let's make the best icon to represent the grass in map! Let's make this a bit organizing and call it Turfs.dmi so you can put more turft icons later on.
Here's an example:
Now let's code it, first make a code file, I'll call it Turfs.dm and do the following:
Err, I organized that bad, we will organize that in next tutorial. That Grass is child or Misc, it belongs to Misc group. And we setting the turf icon.
Now we create the map, I'll name it MainMap and X: 50, Y: 50, Z: 2 <-- That means it's gonna have 2 levels. Press CTRL+K .. By this point yo udon't have any errors.
In your object tree, select turf, plus Misc and you should find your grass. Select it and then press click in Fill, now fill the whole map with grass! Compile again.
Press CTRL+R, it should start up with your map. You are invisible because our player doesn't have an icon yet, but hey you can walk in your grass.
See ya in next tutorial, if anyone needs any help, reply here and I'll do my best to explain.
I am gonna assume you all can create an environment, all files/source will be shared when we complete this simple game.
Just after you create your Environment, you will be asked to name your first code file, name it whatever you want. I'll call it Main.dm and then do the following:
- Code:
world
name = "Bleach Game Tutorial"
map_format = TILED_ICON_MAP
view = 9
mob = /mob/Alive
Here we are setting the name of our world/game, I called it Bleach Game Tutorial, because I want to make it loosely based on Bleach anime with some RPG elements.
What we are accomplishing with map_format is how we want to display our map, I choose TILED_ICON_MAP format but that's not how I want because there's some differences between all map formats, and if I want to use larger icons, what should I use ? This one is for you.
View doesn't matter atm, I'l lget into it later on. And for last I am only setting /mob/Alive as our would mobs default.
- Code:
mob/Alive
invisibility = 0
mob
Login()
src.loc = locate(5, 5, 1)
..()
Logout()
del src
..()
I am setting our mob to be visible, why ? Just using it to avoid errors when compiling, but it will change in future.
Using Login procedure to be called whenever a player enters the game.
With src.loc = locate(25, 25, 2) I am setting the players location to a certain place in map, locate(x, y, z).
In Logout it's called whenever a player leaves the game, and deletes the mob.
Now, let's make the best icon to represent the grass in map! Let's make this a bit organizing and call it Turfs.dmi so you can put more turft icons later on.
Here's an example:
Now let's code it, first make a code file, I'll call it Turfs.dm and do the following:
Err, I organized that bad, we will organize that in next tutorial. That Grass is child or Misc, it belongs to Misc group. And we setting the turf icon.
Now we create the map, I'll name it MainMap and X: 50, Y: 50, Z: 2 <-- That means it's gonna have 2 levels. Press CTRL+K .. By this point yo udon't have any errors.
In your object tree, select turf, plus Misc and you should find your grass. Select it and then press click in Fill, now fill the whole map with grass! Compile again.
Press CTRL+R, it should start up with your map. You are invisible because our player doesn't have an icon yet, but hey you can walk in your grass.
See ya in next tutorial, if anyone needs any help, reply here and I'll do my best to explain.