Change background image
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to create programs for modular computers

Discussion in 'Coding' started by Atlantis, Dec 3, 2016.

  1. Atlantis

    Atlantis Retired Staff

    I've spent few hours putting together a guide on how to develop programs for modular computers. It is available on the wiki:
    https://wiki.baystation12.net/Modular_Computer_Development

    Feel free to post feedback on this guide here. If you have specific questions, either PM me here on forums, on IRC, or ask here (PMs are however likely to be responded to faster)
     
    Techhead likes this.
  2. foxchosen

    foxchosen Research Director

    Great stuff, I already saw it yesterday when I noticed it grow on wiki :)
    We should really put together something with all these guides and links.

    Paging @mustynonoparts as this is something that might help to get you in the field, it seems easy enough to understand (to me, at least)
     
  3. Sweet, thanks for pinging me on this. This is great.

    Edit: I just started reading this and I just realized this page requires experience in BYOND coding. Noooooooooooooooooooooooooooooooooooooo.
    @Atlantis Thanks for taking your time to make this, this is great.
     
    foxchosen likes this.
  4. nearlyNon

    nearlyNon Petty Officer First Class

    so uh, I don't suppose anyone has a copy of this lying around? considering that uh, the old wiki is dead.
     
  5. Za_Redman

    Za_Redman Donator

  6. afterthought

    afterthought Developer

    It may be referring to https://wiki.baystation12.net/NanoUI, which is mostly up to date except GLOB.nanomanager has been replaced with SSnano. You're probably best off looking at existing programs as examples and asking in #coding for further guidance.

    In my experience, the main design considerations when making a modular computer program (in addition to those related to just making a nanoui interface) are (1) does it auto-update and (2) do you use nano_module/program, store state on the program, and call computer-only procs, or do you store state on the program datum and avoid doing any computer-specific stuff. (1) is, in principle, a trade-off between simplicity to write and performance, but apparently it's not even that expensive in the grand scheme of things to have it auto-update, so might as well err on the side of auto-updating. (2) affects whether borgs and AI can use it via their built-in "subsystem" feature, but if the program needs to handle computer parts, other programs, or computer-based access features, you may as well just use nano_module/program. If you do want it to be borg/AI friendly, you can take a look at the email client and administration programs for examples.

    There are some specific vars/flags for whether it is available on NTnet, whether it needs NTnet features to function, whether it can only run on certain types of computers, and whether it needs extra access to run; all of this can be seen by looking at other programs as a guide.
     
  7. Atlantis

    Atlantis Retired Staff

    I'm afraid i don't keep backups of wiki pages, but you can try using the following as reference:
    https://github.com/Baystation12/Bay...omputers/file_system/programs/generic/game.dm

    It actually serves as a code reference for the wiki guide. TLDR of what you have to do for most programs, is to create a NanoModule which handles the actual logic for your program. All you need then is a stub program where you specify path to the nano module, and some other things (onscreen icon, size, NTNet requirements,...)

    I don't really code for bay anymore, but feel free to ask if you need help of any kind, and i'll do my best to help you with your problem.