Giter Club home page Giter Club logo

Comments (6)

johanberntsson avatar johanberntsson commented on July 17, 2024

I would say that this is simply bad practice, and that it would be better to rewrite your code. What you define is the short_name property of the object, and if you check the Designer's Manual (DM4) you will find no example of short_name that is anything other than a single word or short phrase, suitable to write on a single line. There is a good reason for this; z3 games cannot customize their status line, and always drawn with on one line. Adding newlines would create problems. If you make a z5 game you have the option of supplying your own status line routine, and can customize the status line to be multiple lines.

It would be possible to add the filtering you suggest, but the goal of Ozmoo is to be as small and efficient as possible in order to run on very resource-restricted 8-bit platforms, and adding code for avoiding what is arguably a programming mistake is not worth it, IMO. Because of this, I suggest simply avoid adding newlines in short_name and instead modifying other parts of your game to get the desired effect. If you have further questions you can go to the support or programming -tips sections on the punyinform discord server.

from ozmoo.

crabcode avatar crabcode commented on July 17, 2024

Makes sense. To be clear, I didn't want to customize the status bar, just have the paragraphs separated by an extra line in the "body" of the output, and defining it in the short_name property (i.e. Object Forest "FOREST" with short_name "^ FOREST") works without breaking anything, then the status bar prints the first name and uses the short_name in the body.

I'm also noticing that I what I thought was a difference in size when I add the short_name property to all my rooms was just the difference in reduction by the compression, which results in the exact same file size, so not a problem on that end either.

Thanks!

from ozmoo.

fredrikr avatar fredrikr commented on July 17, 2024

@crabcode: If you're using PunyInform, to get the desired effect, just add this to your source before including puny.h:

Constant MSG_LOOK_BEFORE_ROOMNAME = "";

from ozmoo.

crabcode avatar crabcode commented on July 17, 2024

@fredrikr Ooh, thanks! I did eventually find the customization with LibraryMessages, but that's even simpler! :) Clearly lots to learn still.

from ozmoo.

fredrikr avatar fredrikr commented on July 17, 2024

Oh, sorry, the metod I pointed out isn't reliable. You need to declare it as a numeric constant and write code for it in your LibraryMessages routine!

Explanation: The library message system supports two kinds of messages - simple (strings) and complex (code). If a message is of the complex type in messages.h, you can't replace it with a simple message in your game. This is due to a technical limitation with the compiler. Replacing a simple message with a complex one is supported.

from ozmoo.

crabcode avatar crabcode commented on July 17, 2024

@fredrikr Ah ok, gotcha. It did work when I tried it out, but I'm using WinFrotz for quick testing and am starting to realize it might be a bit too forgiving, letting me get away with some pretty bad code at times that then confuses me when it doesn't translate to other systems. So that's helpful to know, thanks for clarifying!

from ozmoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.