Announcement

Collapse
No announcement yet.

WorldSpawn official WIP thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by bfg666 View Post
    Thanks. I even learned more than expected! Now I know ! means not (I didn't understand != in one of your previous examples, now I do).
    Haha I have a habit of using != as well. I'm sure I've confused some non-coders in the past but usually my context should make it obvious.

    BTW I don't really consider myself a 'coder'. I can do some pretty trick shit with QC, but QC is a light simplified version of C at best. Doesn't even scratch the surface of what gypsy is doing here. You basically have zero control of low level or even engine stuff, it's strictly game logic.
    'Replacement Player Models' Project

    Comment


    • last one - flip a boolean

      var bool:Boolean = true;
      bool = !bool;

      bool now equals false;

      And that's it. Now you know everything about programming in every language that was ever created. Go make something.

      @Dutch - <> is also "not equals" in many languages but >< isn't. Go figure. In languages like VBScript you have to use <> except booleans is NOT. as in

      If NOT boolVal Then doSummin Else doSumminElse EndIf

      just like that.
      Last edited by MadGypsy; 10-23-2016, 11:47 PM.
      http://www.nextgenquake.com

      Comment


      • @ it's strictly game logic.

        Not 100% true. It depends on the engine and extensions you use. FrikFile comes to mind. That extension allows you to read/write/append files via QC. This is a totally bad-ass extension. Coupled with the fte one below-below you could do some interesting things. Someone here (probably BFG) stated in another thread that maps are self contained and doing something in one map won't impact another. With some elbow grease you could create your own custom "database" that could be checked from one map to the next and totally have mapA impact mapB.

        Code:
        //FRIK_FILE
        //idea: FrikaC
        //darkplaces implementation: LordHavoc
        //builtin definitions:
        float(string s) stof = #81; // get numerical value from a string
        float(string filename, float mode) fopen = #110; // opens a file inside quake/gamedir/data/ (mode is FILE_READ, FILE_APPEND, or FILE_WRITE), returns fhandle >= 0 if successful, or fhandle < 0 if unable to open file for any reason
        void(float fhandle) fclose = #111; // closes a file
        string(float fhandle) fgets = #112; // reads a line of text from the file and returns as a tempstring
        void(float fhandle, string s, ...) fputs = #113; // writes a line of text to the end of the file
        float(string s) strlen = #114; // returns how many characters are in a string
        string(string s1, string s2, ...) strcat = #115; // concatenates two or more strings (for example "abc", "def" would return "abcdef") and returns as a tempstring
        string(string s, float start, float length) substring = #116; // returns a section of a string as a tempstring
        vector(string s) stov = #117; // returns vector value from a string
        string(string s, ...) strzone = #118; // makes a copy of a string into the string zone and returns it, this is often used to keep around a tempstring for longer periods of time (tempstrings are replaced often)
        void(string s) strunzone = #119; // removes a copy of a string from the string zone (you can not use that string again or it may crash!!!)
        //constants:
        float FILE_READ = 0;
        float FILE_APPEND = 1;
        float FILE_WRITE = 2;
        //cvars:
        //pr_zone_min_strings : default 64 (64k), min 64 (64k), max 8192 (8mb)
        //description:
        //provides text file access functions and string manipulation functions, note that you may want to set pr_zone_min_strings in the worldspawn function if 64k is not enough string zone space.
        //
        //NOTE: strzone functionality is partially superseded by
        //DP_QC_UNLIMITEDTEMPSTRINGS when longterm storage is not needed
        FTE_STRINGS also comes to mind, which allows you to manipulate strings
        Code:
        //FTE_STRINGS
        //idea: many
        //darkplaces implementation: KrimZon
        //description:
        //various string manipulation functions
        float(string str, string sub, float startpos) strstrofs = #221;
        float(string str, float ofs) str2chr = #222;
        string(float c, ...) chr2str = #223;
        string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
        string(float chars, string s, ...) strpad = #225;
        string(string info, string key, string value, ...) infoadd = #226;
        string(string info, string key) infoget = #227;
        float(string s1, string s2, float len) strncmp = #228;
        float(string s1, string s2) strcasecmp = #229;
        float(string s1, string s2, float len) strncasecmp = #230;
        // strconv parameters
        float CONV_SAME         = 0;
        float CONV_CASE_LOWER   = 1;
        float CONV_CASE_UPPER   = 2;
        float CONV_WHITE        = 1;
        float CONV_RED          = 2;
        float CONV_REDSPECIAL   = 3;
        float CONV_WHITESPECIAL = 4;
        float CONV_ALTERNATE_RW = 5;
        float CONV_ALTERNATE_WR = 6;
        Last edited by MadGypsy; 10-23-2016, 10:57 PM.
        http://www.nextgenquake.com

        Comment


        • Originally posted by MadGypsy View Post
          you can chain it

          (if)
          ?then
          else if)
          ?then
          :else
          Yes, I remember chaining such instructions in Basic, except those were written in plain english (though ? could be used for PRINT).

          Now you know everything about programming in every language that was ever created.
          Ha ha, now that may be a bit of a stretch...
          For instance:
          var bool:Boolean = true;
          bool = !bool;
          As I understand it, var bool defines a variable named bool, correct? I don't get the logic behind putting an else in that first line. Shouldn't the first term be if?
          ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
          ♪ What a glorious feelin' I'm haaaaaaappy again ♪

          Comment


          • you are confusing else and a type

            (if)?then:<-else;

            var bool:Boolean <- type

            in other words it doesn't say

            bool else Boolean

            it says

            bool is a Boolean

            qc equivalent (even though there is no boolean in qc)

            boolean bool = TRUE;

            colon only means else in a ternary statement and in many other languages it has no other use. In as3 it means type (if not in a ternary)

            I don't want to confuse you cause I already know this will be over your head but, the only thing I can think of other languages using colon for beyond ternaries is scope resolution operators like in PHP

            $class = 'AClass';
            $class::inner_static
            or
            $class::INNER_CONST

            where

            Code:
            class AClass {
            	const INNER_CONST = 'A constant value';
            	public static function inner_static() {
            		//summin
            	}
            }
            And if the variable or function you are trying to get is not static or const you have to use an "arrow" like typedefs in C

            AClass->myLilFunction();

            however, in As3, Javascript and a bunch of other languages in both cases you would just use a dot

            Oh right... you can also use the double colon for late static bindings in PHP. I'm not gonna explain it though cause if I don't stop I really will teach you every language...today. LOL
            Last edited by MadGypsy; 10-23-2016, 11:38 PM.
            http://www.nextgenquake.com

            Comment


            • OK, I get it, thanks.

              Originally posted by MadGypsy View Post
              you are confusing else and a type
              You gotta admit it's a bit confusing when you don't know that the same character can mean two different things.

              I'm not gonna explain it though cause if I don't stop I really will teach you every language...today. LOL
              Yeah, plus that's not the point of this thread, is it? It's already kind enough of you to have explained these few basic things to lil' old me, but you still have an engine to code.
              ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
              ♪ What a glorious feelin' I'm haaaaaaappy again ♪

              Comment


              • actually, I'm trying to figure out a logo. I hate it 100%. I'm going to go a completely different direction
                Last edited by MadGypsy; 10-24-2016, 12:34 AM.
                http://www.nextgenquake.com

                Comment


                • What do you have in mind? I'm no graphic designer but I'm a creative guy.

                  Edit: Actually, I've just had an idea. A logo needs to be very simple and immediately identifiable, right? I'm thinking of a very schematic representation of a world, made only with a few meridians and parallels, with a very streamlined S in the middle, more like a slightly wavy vertical line. The meridians could be erased at the top, making the "world" look a bit like a blossoming flower. What do you think? I could sketch it quickly but I don't have a scanner.
                  Last edited by Mugwump; 10-24-2016, 01:43 AM.
                  ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
                  ♪ What a glorious feelin' I'm haaaaaaappy again ♪

                  Comment


                  • @frikfile

                    Shit I forgot about this! I remember reading about this a long time ago and thought that was wicked cool. I also remember having the idea of updating/storing map-based information within an external file, such as dead monster properties (x,y,z origin, frame, angles) so that a map could later be re-visited by the player and the monsters are dead where you left them. Never got around to playing with it though, maybe one day. I imagine parms could be stored externally as well, which totally bypasses the 16 parm limitation (unless using FTE, which has 64 I believe). Thanks for the reminder.

                    At any rate, back to WorldSpawn. Sorry.

                    If you want my 2 cents on the logo...keep it neat and uncluttered, basic and eye-catchy. Something along the lines of the Unreal engine logo. It's unmistakeable and slick in my opinion.

                    'Replacement Player Models' Project

                    Comment




                    • It's sloppy and nasty, I also need to redraw it digitally but, I'm thinking something like this.
                      note: I never claimed to be good at drawing by hand...or any other way for that matter.

                      @ back to worldspawn, sorry
                      pbbbt, I wreck my thread more than all you guys combined . It always comes back around. I wouldn't worry about your 2 second OT that I instigated. Really, I don't mind off-topic stuff that is "on-convo" - and the convo isn't some train-wreck bullshit

                      @BFG
                      Heh, I sort of did what you mentioned and I didn't read what you said til just now,

                      edit: I might remove a "swirl". I'm not really into all the "666" stuff and that's totally 666. I didn't do that intentionally...or realize it til now.
                      Last edited by MadGypsy; 10-24-2016, 02:40 AM.
                      http://www.nextgenquake.com

                      Comment


                      • Originally posted by MadGypsy View Post
                        Heh, I sort of did what you mentioned and I didn't read what you said til just now
                        Well, you know the saying, great minds think alike...

                        It's pretty neat but yeah, lose the middle swirl, and if I were you I'd rotate it by 90 degrees so that the swirls figure an S for Spawn.

                        TBH, I'm not much into the 666 thing either. It was cool when I was a teen metalhead but now, I find it a bit puerile. That's why I chose Mugwump instead as my mapper alias on Func_. The bfg666 alias I chose a while back on some forum because I originally wanted bfg9000 but it was already taken. I'm thinking about harmonizing all my Quake forum accounts and change the bfg666 that I use here and on Quaddicted into Mugwump too.

                        Originally posted by Dutch View Post
                        I also remember having the idea of updating/storing map-based information within an external file, such as dead monster properties (x,y,z origin, frame, angles) so that a map could later be re-visited by the player and the monsters are dead where you left them. Never got around to playing with it though, maybe one day.
                        You should definitely try to do that. It would open up a whole slew of possibilities for mappers/modders. Like for example off the top of my head a locked door for which the key is in another map.
                        ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
                        ♪ What a glorious feelin' I'm haaaaaaappy again ♪

                        Comment


                        • early
                          http://www.nextgenquake.com

                          Comment


                          • Are the swirls gonna be in front of the world like this or more like the spiral arms of a galaxy joining in the center?
                            ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
                            ♪ What a glorious feelin' I'm haaaaaaappy again ♪

                            Comment


                            • idk - it's all organic with me. Almost every single thing I do in this world is with a "figure it out as you go" mentality. Do whatever you want and be prepared to adapt to the results..
                              http://www.nextgenquake.com

                              Comment


                              • Originally posted by MadGypsy View Post
                                Almost every single thing I do in this world is with a "figure it out as you go" mentality.
                                Yeah, I already got a whiff of that watching you build your engine.
                                ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
                                ♪ What a glorious feelin' I'm haaaaaaappy again ♪

                                Comment

                                Working...
                                X