Im new to BYOND. My 1st attempt is a very basic tower defense style game. Ive been looking all over the forums and articles, but cant seem to find any real tutorials on Mobs.
Such as, having them spawn at a certain time, having them move toward a specific object, giving them stats such as damage and health.
I used to use Game Maker and all this stuff was covered and very easy to acquire... Im having a hard time zeroing in on ANY specifics on BYOND.
Any suggestions?
ID:156911
Jul 4 2010, 10:58 am
|
|
I suggest you read these and you should look in the reference at the procs Bump, Locate, and read about the Hud or Lummox Jr's skin reference and THE skin reference so that you can learn how to use bars. If you want icon bars, look up a demo.
[EDIT] ARG Acwraith answered 1st :P. Good thing he covered basically what I didn't. |
Chitownhustla wrote:
Such as, having them spawn at a certain time, having them move toward a specific object, giving them stats such as damage and health. Look up in the reference: proc, var, (the following are all sub-sections of proc) sleep step_to step_toward walk_to walk_toward new Give a mob a variable (which can be used as a stat) such as mob A "verb" is a procedure that players can make happen whenever they want. The following one is an ability that will create a bodyguard for you. Also, anything following a pair of slashes // is a comment and doesn't get compiled. mob And an ability that will make your bodyguard always stand between you and an object you choose. mob I have not shown you how to make a tower defense game, but I have just shown you everything you need to know to answer the questions you asked, which is most of what you probably need for a tower defense. Now read up on "object oriented programming" and how to do it in Byond. It's pretty simple. Because I'm feeling extra nice right now, here's a small demo. The part that sets up all the beacons, attackers and defenders and everything; don't let that discourage you into thinking that's how things are often done in Byond. Normally you would set up that stuff in a map file, but I'm not making a map file in this demo, so I'm adding everything programatically. var I did not test the above code, but the basic idea applies. However, IMPORTANT NOTE: the above code is generally not how you would do each of the things. I tried to keep it very simple and straightforward for someone that is coming from a different game-maker and not used to "the Byond way." I have to say this, or a bunch of other people will quickly reply to critisize what I whipped up for you. I just did not want to introduce and explain a lot of little quirks and overwhelm you all at once. For a single example of such a quirk; someone is bound to say "Don't do if(bodyguard == null)or if(bodyguard != null). Instead you should just do if(bodyguard) and if(!bodyguard)" but there are reasons behind these things which delve deeper into the heart of Byond syntax and semantics, which is inherited from the C++ programming language. Anywho, this should get you going in the right direction. Another important note!! Obviously, you would have to assign an icon to each of the units in the above demo or you won't be able to see them. I used to use Game Maker and all this stuff was covered and very easy to acquire... Im having a hard time zeroing in on ANY specifics on BYOND. Since Byond is very general-purpose, there are probably not any tutorials specifically about tower defense games and the things that they require. Tutorials are going to be more general-purpose. The idea is that you learn how to program using Byond's very simple language, then you apply it however you want. The tools you have available to you are very abstract on purpose; that allows it to be more general and usable for many kinds of games. Hence the requirement that you gain a basic understanding of computer programming concepts. It still shields you from a lot of low level programming details that you would need in real computer programming languages and is oriented toward game making though. Even so, I do have to admit that Byond is lacking in the tutorial department. I haven't looked at what's available in years, but last I knew the only decent things to get you started were Zilal's beginning Byond tutorial, and there was the guide, which you can get at from the "Developers" tab at the top of the web page. I learned from Zilal's tutorial, then I picked up most everything else by reading the reference (Yes, I know it's like a dictionary, but it has good material) and reading this forum and asking questions here. |
In response to Loduwijk
|
|
this is amazing.
i havnt read through it all yet, but i want to extend a HUGE THANK YOU for taking the effort to post all this information. i cant wait to get crackin on it!!! thanks again!!!! |
You can create things with new at any time you wish. You can also use the spawn() and sleep() procs to set timers.
There are a a family of walk() procs you can use to move mobs or objs towards or away from goals.
Variables (stats) can be assigned to any type of datum by using the var keyword. For damage or health, you can assign numbers to the variables that you can later modify.