Announcement

Collapse
No announcement yet.

Parsing Delimiters (theory)

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

  • #46
    Final game play



    The colors mean something different this time. I already drew enough about overwrite and extend features, those haven't changed really. This is to illustrate my new fancy method of operations.

    Man, this really is pretty involved. I know you just see a couple of lines. You can probably even guess what they mean, but that's the "because" stuff.

    Here we go:

    I now treat Import() like a function. It accepts an unlimited amount of arguments. The only rule is that the first argument has to be the url of the script you want to import. Past that you can stick as many (comma separated) "names" as you like.

    Here is where the involved part comes and it goes all the way to the beginning of the parse (lol). My system grabs the contents of a file and considers it a string, the very next thing it does is sequester "strings" and replace them with a token ("TXT[0]"). The 0 represents the index that the actual string was stored in, on stringArray.

    Just understand that now we have an Array of anything that was in quotes.

    The next thing it does is remove comments, followed by removing whitespace. Then it looks for an import. Now, in my import "function" all the "names" have already been stored in stringArray (because they were in quotes). Import is found and the url is parsed from the list. The contents of that file are then retrieved and all of what I said happens again. Only difference is, this time, there are all those names hanging around. My script converts that names list to an array and for every name in the array it duplicates the current content and adds it to itself. It then looks for $TARGETNAME and replaces it with the current name.

    Inner EDIT: I never made it clear why it mattered that the names were already stored in the stringArray. I realized upon writing this edit that, it doesn't matter (lol). That's why I never made it clear.

    So, in English, what does this mean? Well, consider that the old import method would have to do a fresh load for every time you wanted to duplicate the script. This way, I already have the script, why not just duplicate it to itself for as many times as I need it? In the duplication I am also assigning it a unique name.

    So, that blows my catch 22 that I never explained, clean out the water. My examples are getting stronger as this develops, but I don't have quite enough yet for this to really get it's point across. For now, you will have to imagine that the content on the right, far outweighs, the reproductive and morphing code on the left.

    Like I said, I'm not gearing this to duplicating a textbox. Which unfortunately is the best I have right now. That will change.

    EDIT: You do not have to type import as much. That's another +.
    Last edited by MadGypsy; 01-11-2013, 05:05 PM.
    http://www.nextgenquake.com

    Comment


    • #47
      I didn't make an update yesterday, because I spent it (primarily) considering things. I did work, but it was more of a finesse than an "update".

      there is no more:

      Code:
      display:
      {
          type:"SimpleShader"
      }
      display has been removed as a same-name and it has been replaced by shader, textfield and button. There are no more "types", or maybe it is more correct to say that types are now directly assigned as opposed to "noted" within.

      Now, on to the real material for this thread. I am going to port my current work to python. I chose python for a number of reasons.

      1) it's not too complicated to create browser plugins for a python driven display container
      2) python can utilize C languages
      3) python is compact

      Understand, I do not actually know how to program in python. I'm not very concerned with that fact. I'm about to go read some docs about python syntax and get busy.

      This is going to change everything though. My prior "flow" was to basically just trot along side flash for all the basic stuff that flash is ultimately known for, and once all of that was out of the way, I would start expanding the potential in a more original direction. My end game changed and flash became obsolete.

      This is good. I never wanted to use flash. It was a means to an end for what I thought I was building. Now I know what I'm building and I believe that python is my catalyst.
      http://www.nextgenquake.com

      Comment


      • #48
        More here soon. I am completely re-familiarized. Thanks, "me", for documenting all of this. I have an idea. Watch, this is gonna be sweet.
        http://www.nextgenquake.com

        Comment


        • #49
          HOLY F**K, NO WAY! I thought I was never gonna see you post in this thread again! Seems you didn't abandon your Darsing PRElimiterz project!!! Sweeeeeeeeeet
          Name's damage_inc, and killing is my business. Don't worry though, it's nothing personal! Oh wait... maybe it is

          Comment


          • #50
            I'm one giant cycle bro. I haven't abandoned any of my projects. Sitephyre is still on the table, I'll add to my QC as an "inbetween", I even still have ideas for my banner cms that will eventually come to fruition. I also have that "Kuler" thing I made and whereas it's basically done, I can actually plug it in to other stuff as a feature.

            Nothing gets abandoned (except my Quake maps, you wouldn't want to play them anyway, trust me)

            ---

            over the next few days I am going to work on my idea. The bottom line is, I wrote an extendible program language. That's what parsing delimiters is...my lil made up language (XXON - Generic Object Notation - which is heavily inspired by JSON). This shit works, I'm on a mission to finally make it do something.
            Last edited by MadGypsy; 06-24-2013, 12:49 AM.
            http://www.nextgenquake.com

            Comment


            • #51
              Woooah, I'm super duper glad that I paid close attention to what I wrote. This line just saved me a ton of headaches

              display has been removed as a same-name and it has been replaced by shader, textfield and button.
              How did this save me, you may wonder. Well I was using the most recent benchmark of my script, assuming that it was the most recent version period. However, I noticed that shader, button and textfield were not in the sameNames list. Aside from all my benchmark saves there was a class named XXONParser. Upon opening it I realized that it did have all of the proper sameNames. So, now I am not about to spend the next ?? amount of time trying to fix whatever could have been wrong/missing with the last benchmark. If I would not have written that above quote or come back to read it, I could have wasted a whoooole lot of time trying to figure out what is wrong.

              hooray.
              http://www.nextgenquake.com

              Comment


              • #52
                Holy Crap, today has been a headache anyway.

                1) I switched my project from flash to AIR and drama ensued
                2) I switched my project from the Flash IDE to the FlashDevelop IDE more drama ensued
                3) I tested my script after I got everything "ported over" and there was a very annoying bug

                TypeError: Error #1009: Cannot access a property or method of a null object reference.
                This bug was annoying because it doesn't tell me where the hell it is happening. Through trace statements I was able to isolate the spot that was throwing the error, but due to ambiguity I still had no freakin clue as to why. Finally (6 hours of grrrr later) I isolated the exact problem and corrected an oversight.

                Everything works now as it did in my last example post EXCEPT it refuses to embed fonts, because apparently I have to do it differently than I am for the new compiler I am using. I found that information, but I'm hella annoyed that this took all damn night. In short, I'm not even 100% at the spot that I thought I was already at...lol..sucky

                I'm not gonna hold a grudge though. I have a completely different environment which is properly setup and working to compile in Flex 4.6 with AIR 3.1 or just AIR 3.7. This is superduper great because now my entire Flash/Flex/Air development environment is on a USB stick, not bound with titanium chains to my HardDrive.

                Meh, maybe I'll go fix this fonts thing right now and finally get to my new ideas tomorrow.
                Last edited by MadGypsy; 06-25-2013, 12:01 AM.
                http://www.nextgenquake.com

                Comment


                • #53
                  Embedding of fonts is fixed, with an exception. The new way entails that I make an exception to embed every font that will be used. This means I have to write some font class that is dynamic enough to load any font name it is given and of course the exceptions for if the name doesn't exist.

                  But, I did write that for my one example font and it worked, now I just need to make it more abstract.
                  http://www.nextgenquake.com

                  Comment


                  • #54
                    you should make a blog with this stuff.
                    My Avatars!
                    Quake Leagues
                    Quake 1.5!!!
                    Definitive HD Quake

                    Comment


                    • #55
                      Naah, this is good enough. It already perfectly served it's purpose once (re-familiarizing). I don't want any more blogs/forums to keep track of.
                      http://www.nextgenquake.com

                      Comment


                      • #56
                        never thought you would turn that idea down considering how much you love to hear (or read) yourself talk. btw check out the poo cart!
                        My Avatars!
                        Quake Leagues
                        Quake 1.5!!!
                        Definitive HD Quake

                        Comment


                        • #57
                          considering how much you love to hear (or read) yourself talk
                          :/ - I also love to read golden_boy, Spike, Seven, Death Knight and sometimes Baker... Actually you could sum it up to any post with either some real information in it or in the case of Death Knight - a never ending story.

                          oh and Talisa, Capnbubs, Hogsy & team, Sock - for mod stuff

                          and I'm about to find myself reading a poo chart, because I read your stuff too.
                          http://www.nextgenquake.com

                          Comment


                          • #58
                            [QUOTE=MadGypsy;136037
                            and I'm about to find myself reading a poo chart, because I read your stuff too.[/QUOTE]

                            im flattered .
                            My Avatars!
                            Quake Leagues
                            Quake 1.5!!!
                            Definitive HD Quake

                            Comment


                            • #59
                              I am back on this for the 3rd time. lol, I know I jump around a lot, but there is a method to my madness. Allow me to illustrate the method:

                              1) Parsing Delimiters Theory: Intended to be a language that I design in every way, which allows for simple display, event and stream types to be instantiated and connected to form a more complex whole.

                              2) Sitephyre: A CMS. Nothing really to say here other than it is a CMS.

                              3) All my Radiant Work: All of it finished or not.

                              Now, none of that seems to fit together in the same puzzle, but it does.

                              Throughout all my Radiant work I realized that creating a presentation application would probably be the ideal way to teach how to use radiant. I wanted to be able to create slides and animations that display with short amounts of written data and allow the user some controls. I built that application en todo.

                              I used the xml language to store all data and wrote a simple engine to parse that data. That's great, but I already wrote an entire language and a parser so, why am I using XML? Also the presentation application would be a perfect first app example for my language (XXON - generic object notation)

                              That brought me back to Parsing Delimiters work. And ya know? I'm super glad it did. Having an application already in mind I was able to look at my PD work in another light, specifically my compiler. If I would have continued in the direction I was going my parser and my compiler would have been married to each other. That is not good in Object Oriented Programming land.

                              I have since decoupled a lot of it, but I still have more to do. Actually it is currently broken, but I forced all the breaks and know where they are. This means that my PD work is about to get a serious upgrade, across the board. Maybe some features will be reconsidered and new ones added. I know where I need this to go in order to accomplish creating the presentation app so, I'm looking at this differently than when I was designing into the darkness.

                              I need to make the presentation app possible without programming the app straight into the engine. This means I need to make everything plug and play. Which means I have to keep everything universal. Consider a stream, a stream could be audio or video and the way you play those is not the same. I want my engine to be intuitive to these things to some degree, but still allow room for user modification.

                              --

                              I've covered how Radiant a Presentation App and Parsing Delimiters go together in the same puzzle, but I haven't explained Sitephyre. It may be obvious in one sense that I will use the internet to display all of this work and sitephyre, being a CMS, would be the ideal way to do this. What isn't obvious is XXON can talk to PHP and Javascript and they can talk back. This means that all apps that are made can be database driven ones which can also control other elements on the actual page. Elements that aren't even in the app. This means that my app turns the entire page into an app, or at least it can. And voila' there you have it. Sitephyre becomes something entirely unique due to being powered by custom applications that were created in a language I invented.

                              I have a very looooooong way to go. I can create this. I already have in smaller chunks. I just need to Bigify it.

                              Currently I am writing the book on my code for parsing and compiling text into qualified Objects. I have to. This script is intense and if I don't make "the big picture" something a bit smaller I'll never get this to the next level. The "book" is only actually about 2 pages. And that's good.
                              Last edited by MadGypsy; 09-11-2013, 10:11 PM.
                              http://www.nextgenquake.com

                              Comment


                              • #60
                                More: (this is more for me than you - almost like early specs)

                                Container Types:


                                slides: object
                                a container which holds a series of images and/or image sequences. controllable via buttons or controls
                                Code:
                                slides:
                                {
                                	targetname:"slideshow",
                                	target:"info_panel",
                                	fps:24,		//for image sequences
                                	speed:0,		//for overall slideshow, 0 second delay, meaning user navigated
                                	image[0]:"path/to/image1.png",
                                	image[1]:
                                	{
                                		path:"path/to/image2.png",
                                		alpha:.6
                                	}
                                	image[2]:
                                	{
                                		path:"relative/path/",	//no file specified, must be an image sequence folder.
                                		frames:48,
                                	}
                                }
                                controls: object
                                primarily just a container that allows you to assign a target to all contained buttons simultaneously and allows you to move/effect all the buttons as a panel.
                                Code:
                                controls:
                                {
                                	target:"video_stream",
                                	buttonSpace:2,
                                	buttonX:"width",	//width of controls+buttonSpace
                                	buttonY:0,
                                	x:400,
                                	y:30,
                                	include:("play_btn","pause_btn","next_btn","prev_btn")
                                }
                                button: object
                                Code:
                                button:
                                {
                                	target:"video_stream",
                                	targetname:"play_btn",
                                	buttonType:"videoPlay"
                                	mouseUp:
                                	{
                                		image:"path/to/up.png"
                                	},
                                	mouseOver:
                                	{
                                		image:"path/to/over.png",
                                		alpha:.5,
                                		tween:
                                		{
                                			fadeIn:
                                			{
                                				prop:"alpha",
                                				pow:"strong",
                                				ease:"inOut",
                                				start:.5,
                                				end:1,
                                				duration:.7
                                			}
                                		}
                                	},
                                	mouseDown:
                                	{
                                		image:"path/to/down.png"
                                	},
                                	mouseOut:
                                	{
                                		tween:
                                		{
                                			fadeOut:
                                			{
                                				prop:"alpha",
                                				pow:"strong",
                                				ease:"inOut",
                                				start:1,
                                				end:.5,
                                				duration:.7
                                			}
                                		}
                                	}
                                }
                                image: string/object
                                * string - relative path of image. All properties default
                                * object - all properties are assignable
                                Code:
                                image:"path/to/image.png"
                                
                                image:
                                {
                                	path:"path/to/image.png",
                                	x:40,
                                	y:40,
                                	height:480,
                                	width:640,
                                	alpha:.5
                                }
                                image[num]: string/object - same as above but used to store either an image sequence (animation) or a playlist of images

                                table/datagrid : multi dimensional array - identical to an html table in almost every way functionally.

                                Code:
                                datagrid:
                                {
                                	rows:20,
                                	columns:5,
                                	data:"lib/data.php"	//must be preformatted into a multidimensional array that fits your row/column layout. ex: array[col][row]
                                }
                                textbox: object
                                A simple textbox display
                                Code:
                                textbox:
                                {
                                	text:"some text",
                                	background:false,
                                	selectable:false,
                                	type:"dynamic",
                                	x:40,
                                	y:40,
                                	color:"0xff0000",
                                	font:"Impact"
                                }
                                video: object - a simple video display manageable by the control or button object.

                                audio: object - a simple audio object manageable by the control or button object


                                Event Types:


                                mouseUp:{}
                                mouseOver:{}
                                mouseDown:{}
                                mouseIn:{}
                                mouseOut:{}
                                mouseMove:{}


                                mouse events are somewhat intuitive. The data that you put inside a mouse event object gives it clues as to what it it supposed to do.

                                Code:
                                //go to a web page
                                object:
                                {
                                	mouseDown:
                                	{
                                		url:"http://path/to/something.(php/html)"
                                	}
                                }
                                //load data from a relative path, this could work with php as well
                                object:
                                {
                                	mouseDown:
                                	{
                                		path:"path/to/image.png"
                                	}
                                }
                                tween: object

                                tweens are animation effects that are applied to Display Objects. A tween can contain as many tween objects as desired. The name of the tween object is not considered. The engine simply processes all and whatever objects that are within tween.

                                Code:
                                tween:
                                {
                                	fadeOut:
                                	{
                                		prop:"alpha",
                                		pow:"strong",
                                		ease:"inOut",
                                		start:1,
                                		end:0,
                                		duration:.7
                                	},
                                	slideOut:
                                	{
                                		prop:y,
                                		pow:"strong",
                                		ease:"in",
                                		start:0,
                                		end:-50,
                                		duration.5
                                	}
                                }
                                stream: object - I need to think more about this

                                Common Properties:

                                x: x position of element
                                y: y position of element
                                z: z position of element (currently useless, use scale)
                                scale: scales x and y dimensions equally according to ratio perspective
                                scale(XYZ): scales the appropriate property
                                rotate(XYZ): rotates along the appropriate axis
                                alpha: transparency of object 0 to 1
                                height: height of object
                                width: width of object

                                Special Tokens:


                                %TARGETNAME: string - overwritten in import
                                $targetname[name]: used in implement object to target which import to overwrite and/or extend
                                %num: where num represents it's overwrite index in the overwrite array


                                Operational Objects

                                import("path/to/file", "overwrite targetname 1", "overwrite targetname 2", etc)

                                this will import multiple instances of the same file and overwrite it's special token %TARGETNAME with the appropriate name

                                overwrite: - array
                                just an array of values which are positioned in the index to match overwrite tokens
                                Code:
                                overwite:("%0",%1,"%2","%3")
                                implement: object
                                used to overwrite and extend imported objects

                                Code:
                                import("path/to/import.xxon", "hw_text", "gw_text"),
                                implement:
                                {
                                	target:$targetname[hw_text],	//hmmm can't remember why I am doing it like this. may be unnecessary
                                	overwrite:("Hello World",40,16,"Impact"),
                                	//extend the import
                                	height:24,
                                	x:30,
                                	y:10
                                }
                                implement:
                                {
                                	target:$targetname[gw_text],
                                	overwrite:("Goodbye World",40,16,"Impact"),
                                	//extend the import
                                	height:24,
                                	x:90,
                                	y:10
                                }
                                There's more but I'm sick of writing for now.
                                Last edited by MadGypsy; 09-12-2013, 12:18 AM.
                                http://www.nextgenquake.com

                                Comment

                                Working...
                                X