Znirk's Forum Posts

  • With "play music", the xAudio2 plugin pauses to reload the file -- the so-called "loop music" is more of a "start over as soon as the computer feels that now would be a nice time for it".

    You can "load resource to channel (+loop)" and "play channel" for gapless looping, but that won't work with an mp3 file.

    In any case, mp3 is a bad format for gapless looping: because it was originally designed for video soundtracks, it only supports lengths of multiples of ... 1/24 second or some such video frame rate. If you encode a sound of any other length to mp3, the end is padded with silence to the next frame boundary; so even with perfectly gapless looping, most mp3 files you can produce will have a gap encoded right into the sound data.

    In summary: sorry, I can't solve your problem unless you can make a _really short_ loop, save it as .wav and use it as a "sound" rather than "music".

  • WIYF.

    In short: While some motherboards are a bit more flexible, basically you need two identical modules. Not just the same size, but the same speed rating and chip configuration. To be on the safe side, buy the same model twice. Most manufacturers even offer "matching pair" packages of two memory modules. The main advantage of that format is that one package is cheaper to store and ship than two, so you might save a tiny bit of money.

    1 GB + 256 MB will never work in dual-channel mode, no matter how adventurous your motherboard is feeling. On the other hand, it might still be "better" than 2x 512 MB in some situations, simply because it's more memory. A bit slower, yes, but still much much faster than swapping to the hard disk.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • >ATTACK SITE
    
    [with your bare hands]
    
    Violence isn't the answer to this one.[/code:2nu3ocnk]
  • Couldn't you just use separate Card Game objects?

    "Could", yes; but unless I'm missing something, "just" is a bit optimistic. Keeping separate decks would indeed be easy that way, but I'm assuming here usually a game that uses multiple decks would want them shuffled together into one big pile. You'd have to do something like:

    Check some flags to see which decks have cards left in them (and jump to the "No Cards Left" route if none have).

    Generate a random number between 1 and (number of remaining decks).

    Draw a random card from the chosen deck -- AFAICT there's no case switch statement and no way to pick an object based on the content of a variable, so this in itself is a whole christmas tree of ... I don't even know ... Compare events? Anyway, get that value and write it to a global variable; otherwise we'll have to write the deck-picking structure twice.

    If the card is "-1", that means the deck had no cards left after all: update the flags and start over. Otherwise, we're done.

    So, yeah, it's possible, but possible in a way that makes reimplementing the plugin in event code (or Python, once that's fixed) seem the easy option.

  • If this is turning into a feature request thread, I'd like to throw out a few suggestions for discussion.

    • Action: return card to deck (card number). Append the parameter to the end of the list of not-yet-drawn cards. (Perhaps perform a sanity check and complain via the debugger if the parameter is on that list already? But what if multiple decks are implemented?) Useful for games where cards can be drawn but not actually put into play, e.g. Solitaire. Also for games where you occasionally need to shuffle the cards that have been played, but not the players' hands (Crazy 8s and its five hundred million variants spring to mind). Alternative: maintain two lists. The "draw pile" is what is called the "deck" in the current implementation; the "discard pile" is initially empty and can have specific cards added to it via an action. Another action appends the discard pile (maintaining the order) to the draw pile and clears the discard. Problem: sanity checks become even more complicated ("User wants to add card #15 to the discard pile, so if the number of cards #15 in the draw pile plus the number of cards #15 in the discard pile equals the number of decks in use, throw an error message on the debugger.")
    • Conditions: same rank (card number, card number), same suit (card number, card number). Return true if the two parameters refer to cards of the same rank or suit respectively. For bonus points, accept an arbitrary number of parameters and return true only if they all match.
    • For convenience and readability, add "suit" and "rank" expressions that basically do card%13 and floor(card/13) respectively. (Or (card%13)+1 and ceil(card/13), if you prefer to number the ranks and suits from 1 rather than 0).
    • Allow multiple decks. This probably shouldn't be runtime-editable because removing a deck in mid-air is messy and underdefined. A property "number of decks" that defaults to 1 seems more plausible. Also, I don't expect users to want to know which specific deck a card came from; so a "draw pile" with two decks could simply(?) have two copies each of the numbers 1..52.
    • As an alternative, ignore everything I said above and go for flexibility: have a property "number of cards" that can be set to an arbitrary number. Remove all the conditions and let the users calculate (or look up in an array) what each number means in card terms. This would open the object as a shuffling mechanism for games with non-standard deck sizes (CCGs, Tarock and many more), but make it slightly less convenient for actual traditional card games.
  • placing a canvas object behind everything and pasting all the bones into it...then using image manipulator to save it

    Does that work, and how? According to the image manipulator's action names, it only copies from sprites, not canvasses. You can specify a canvas, or even the MouseKeyboard object, as the parameter; but using it that way doesn't seem to do much except crash.

  • [Reply to self -- found it.]

    It's all there, in System Expressions and Expressions.

  • You mean in your hands or inna face?

  • Before any objects, I'd like to see documentation on those math operators that are not expressions in an object. A plain uncommented list of what exists is the most important part of this -- I don't really need definitions of "integer division", "logarithm" or "sqare root", but I do want a place (other than the source code) to look up which ones are supported and what the exact spelling and syntax is.

  • Looky here.

  • As requested over there, here's a commented cap of "first steps with the CardGame object". (Actually the request was for a tutorial involving a simple game, but hey, we're all literate here, rgith?)

  • Oy. There's three fairly different things going on in here. Or two, if you leave encryption aside for the time being.

    The base64 functions in PHP are an implementation of one of the content encoding schemes in MIME (rfc2045). They convert arbitrary bytes into (and back from) strings of 7-bit-ascii characters, which you can then send through channels designed to handle text but not binary traffic. Base64 en-/decoding is not cryptographic. It's not designed to be hard to attack, and even if it were, there is no key involved: Anyone can decode anyone's base64-encoded data. That's the point, really.

    I don't see much use for this in Construct; but maybe I just lack imagination -- I don't really see the constructy need for crypto either.

    md5 is a different beast entirely. It's a hash function which calculates a relatively short "fingerprint" of any file you throw at it. This is (intended to be, although there are weaknesses in practice) cryptographically secure in the sense that although many different random collections of bits will produce the same md5 value, an attacker shouldn't be able to construct a legitimate-looking but different file to match a given hash. But it's an irreversible operation: you can't "decrypt" it, there's no way to extract the original file from the hash. All you can do is run the hash operation on a file you're given and compare the result with a known-good value. If the values match, you can assume that the file you have is an unchanged copy of the original.

    Something like this might be used in Construct to check if in-game downloads are complete and uncorrupted, or if you want to make it a little harder for your players to edit their save files; but it doesn't seem like the most pressing of concerns.

  • > PC FTW... Nuff Said 8)

    >

    It's a bit ironic you say that with a BSOD avatar...

    Maybe that was an "FTW" as in "Fails To Work".

  • Comme projet "open source", c'est justement un an et quelques jours, oui.

    In the context of the thread: I understand some French, but I'm not much good at speaking or writing. I expect it's OK to ask questions in any language, but if you don't use English, fewer people will be able to help you.

  • I've signed up; same user name. Make me an "editor", pretty please with grated cheese on top?