Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vgperson

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 »
31
Cute Discussion / Re: npc text scripting
« on: October 03, 2018, 06:24:20 PM »
I don't see any compression option on textures, but I'm on an older version of Unity. If there is a compression setting in newer versions, you might want to set that appropriately as well.

EDIT: Yeah, I guess there is, and you probably want High Quality or None. Also, it looks like there might be a built-in way of changing default import settings now too...?

32
Cute Discussion / Re: npc text scripting
« on: October 03, 2018, 03:31:52 AM »
1. Set the orthographic size of your main camera based on the base screen height. I don't remember exactly what this code is supposed to signify... but it works!

Code: [Select]
camera.orthographicSize = SCREENHEIGHT / 2.0f;
Setting resolution with Screen.SetResolution should just scale up properly. You may also have to ensure the Z position of your camera object is right, considering that my camera code sets the position as "(x, y, -10)" while everything else is at Z = 0.

2. Have all textures use Point filter mode, and maybe some other things. You can add an class that inherits AssetPostprocessor to your project to automatically override texture settings on import.

Code: [Select]
public class TexturePostProcessor : AssetPostprocessor
{
    void OnPreprocessTexture()
    {
        TextureImporterSettings settings = new TextureImporterSettings();
        TextureImporter importer = assetImporter as TextureImporter;
       
        importer.ReadTextureSettings(settings);
        settings.spriteAlignment = (int)SpriteAlignment.TopLeft;
        importer.SetTextureSettings(settings);
       
        importer.textureType = TextureImporterType.Advanced;
        importer.isReadable = true;
        importer.spritePixelsPerUnit = 1;
        importer.spritePivot = new Vector2(0, 1);
        importer.mipmapEnabled = false;
        importer.filterMode = FilterMode.Point;
        importer.maxTextureSize = 4096;
        importer.textureFormat = TextureImporterFormat.RGBA32;
    }
}

Some of the other things may or may not be essential. The pivot is set to the top-left by spritePivot and spriteAlignment. "World units" are equated to "pixels" by way of spritePixelsPerUnit = 1. I think isReadable allows it to be "referenced" by functions like GetPixels, which I use to generate frames from strips. I believe maxTextureSize is there because if a texture exceeds the max in one dimension (which happens for me with large horizontal font strips), it'll get compressed or something else that messes it up.

I also had "importer.wrapMode = TextureWrapMode.Clamp;" in this, but commented it out?? I want to say that was another element to fixing things like weird artifacts, but I guess it must not be essential. I'm pretty sure it has to do with what happens when you draw a texture at anything other than its actual size.

3. Never let anything have a fractional coordinate. If something does, I think it'll have proper pixel size, but be misaligned? I do all my movement through functions that only move in integers, so yeah. You could also have it snap position to integers every frame, but that could get pretty bad for performance.

33
Cute Discussion / Re: npc text scripting
« on: October 01, 2018, 03:43:05 AM »


Hey I Love Touhou

I could definitely get a perfect score eventually, but I'm a busy hime, so I'll stop there for now... maybe.

34
Cute Discussion / Re: npc text scripting
« on: August 28, 2018, 01:53:21 AM »
I thought that wasn't true, but it turns out you're right. (And those objects are still sitting in the final version for some reason?) That was Mitch's approach before I made it into the latter, which means they were also using show_message, which did... technically accomplish the "pausing until advancement" functionality.

My approach was also very messy. It had a "text" array containing the textbox messages, as well as an "act" array (except for some reason this one isn't an actual array: execute_string is used to find a variable named actX, where X is the line number??? Literally why could that not have been an array) which is executed by execute_string when each message box is shown. The latter could make branches happen by literally setting the "text" array to different messages. Libretta had a vaguely similar approach to branches, but like... a lot better than that.

Oh yeah, and Nakko-Bazookie did cutscenes in their own objects with an incrementing "stage" variable to accomplish actions between sets of messages (i.e. create text object with series of messages and set stage = 1; if object no longer exists && stage == 1, perform an action and set stage to 2...), but there were few enough that it wasn't so bad.

There were also Dabomstew's Pokemon fangame(s), which drew messages to the screen outside of the Draw function (which normally means it disappears in a frame or something)... then immediately "froze" the screen with a keyboard_wait loop before it would update again. Which is the true galaxy brain solution.

35
Cute Discussion / Re: npc text scripting
« on: August 27, 2018, 09:00:46 PM »
The problem is that the normal control structures of game-oriented languages typically aren't inherently suited to "pause execution of this code here until the textbox is advanced, or until some other thing happens, or for a certain amount of time." So you just gotta make your own processing that is.

Also, didn't know you were the person leaving typo reports on raocow's JIGGLY ZONE LP. The Mystery is Solve'd

36
Cute Discussion / Re: npc text scripting
« on: August 26, 2018, 09:34:36 PM »
Yeah, tracking variables that auto-pair with talk commands should work.

I would normally just manually manage a flag variable for this situation, because my system is mostly just a linear procession (with conditional branches) instead of having nested functions like that. This is how I would do it currently.

Code: [Select]
\if flag(Talked) == 0
   message 1
\if flag(Talked) == 1
   message 2
\if flag(Talked) == 2
   message 3

\flag(Talked, +1) // + means increment from current
\if flag(Talked) > 2
   \flag(Talked, 0) // set to 0

(Part of this working is a "starting value of 0" assumption like the one you can have in Game Maker; when a flag that didn't exist before is altered, it's treated as if it were originally 0. In fact, if a flag's value is 0, it's not even saved in the save file. This behavior is extremely useful for just adding flags as I need them.)

But if I were making a game that called for this a lot, I would add a switch statement to replace the ifs, and a function that encapsulates the end part:

Code: [Select]
\switch flag(Talked)
\case 0
   message 1
\case 1
   message 2
\case 2
   message 3
\end
\flagLoop(Talked, 0, 2)

And if I were really bothered about it I could just make a special \switch that incorporates flagLoop and maybe even checks the cases to know what values to loop. But yeah, not really common enough to warrant it in my case.

37
Cute Discussion / Re: News Posting
« on: August 12, 2018, 06:10:25 PM »
I feel like I may have told you how it works some point before, but Libretta's diagonal code works like this: when you aren't currently doing "tile movement" but are inputting at least one direction, it starts "tile movement" again. However, if you're holding two directions diagonally at this point, it "cancels" the input for the direction that you're currently facing to keep it from deciding to go that way.

So that's definitely an intentional way of doing it, and I dunno how it would happen unintentionally, but good job? Maybe there's something unbalanced about your horizontal and vertical movement, or the timing of when you start a new tile movement.

38
Cute Discussion / Re: la mulana 2 cutey club
« on: August 11, 2018, 06:04:17 AM »
Again, might have been a translation-based "retcon." [sp]The Japanese doesn't say they "began" it, but "governed it" (一族を治めた).[/sp] I still might have misremembered the LM2 stuff.

39
Cute Discussion / Re: la mulana 2 cutey club
« on: August 11, 2018, 05:53:56 AM »
I dunno, but [sp]there's at least one married couple among the First Children (Izanagi and Izanami), so the concept could've persisted from there??[/sp]

[sp]Also, I forget with all the Puzzle Knowledge pushing it out, but I want to say La-Mulana 2 does say there were more giants than just the nine, and those were just the last. "Siblings" could arguably be metaphorical as well.[/sp]

40
Cute Discussion / Re: la mulana 2 cutey club
« on: August 11, 2018, 04:31:28 AM »
It's probably just a translation thing where they assumed "kyoudai" was "brothers," But Still

EDIT: Found the line, and I'm exactly right, plus there aren't any gendered words about Ledo. But Trans In English

41
Cute Discussion / Re: la mulana 2 cutey club
« on: August 10, 2018, 06:26:02 PM »
Spoiler (click to show/hide)

42
Cute Discussion / Re: la mulana 2 cutey club
« on: August 09, 2018, 04:52:23 AM »
Track 60: Good Night, ULTIMATE JIGGLER

43
Cute Discussion / Re: la mulana 2 cutey club
« on: August 08, 2018, 06:45:06 AM »
Spoiler (click to show/hide)

44
Cute Discussion / Re: la mulana 2 cutey club
« on: August 08, 2018, 06:12:54 AM »
Good job!!

Spoiler (click to show/hide)

45
Cute Discussion / Re: la mulana 2 cutey club
« on: August 08, 2018, 04:06:50 AM »
Spoiler (click to show/hide)

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 »