Announcement

Collapse
No announcement yet.

Radiant Virtuoso Q1 Gamepack ver 2.many

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MadGypsy
    replied
    6:39 - let's see where I am in 4 hours. I want to get back to where I was before the rewrite. IDK if I'll make it today but I'm about to give it a lot of effort.

    I need to write an ambiguous graphics class. Which is kind of a lot. drawRect, drawRoundRect, drawElipse, drawCircle, fill, gradientFill, bitmapFill, moveTo, lineTo, curveTo... that's the gist but there is more like that. Then I need to write the interface that I spoke of earlier. All that will be followed by some gigantic loop process that reads my entire object and creates the actual elements that the child objects describe.

    Hmmmm, I think that will get me back to a completed shell. BUT it will also have me starting the build menu with an entire display system in place. The way I create ui elements for the shell will be the same system I use for the app. That's the entire reason I rewrote it... so I can reuse a lot of the code. Not just for this app, though. Entire display system equals exactly that. I can use this system as my standard and create complicated elements with nothing but an Object descriptor and a class to attach it to.

    That class does not even need to be compiled into the app or the shell. It could be compiled as an external library and my object will still find it.
    Last edited by MadGypsy; 08-16-2014, 05:58 PM.

    Leave a comment:


  • MadGypsy
    replied
    fuck that guy. Any presidential candidate that uses the words "fundamentally change" in reference to the free-est nation on the planet needs to be immediately shot and buried in China.

    Leave a comment:


  • PrimalLove
    replied
    @Mad

    Lol Obama reference!

    Leave a comment:


  • MadGypsy
    replied
    I realized lastnight that my 0 class is not going to work with shapes. This is because textfields expose their properties in vars but shapes use functions.

    textfield.text ="summin"
    vs
    myShape.drawRect(10, 10, 600, 400)

    no big deal. I'll just put 0 in 1, put the 0 equivalent for shape in Shapes 1 and replace 0 with an interface. If you don't know, interfaces are just classes of empty functions. Almost like a declaration list. Any class that implements an interface must have filled out versions of the functions which are present in the interface, no more, no less. The reason you do this is to force structure and a generification of tasks. In this case we would be generifying the processes necessary to assign properties and instantiate any visible thing. The implementation provides the specifics but all implementations follow the same exact signature/structure as the core interface.

    There is another perk to interfaces. Lets say I have an interface named IVisible. And let's say I have 2 implementations TextField and Shape. I can do something like this.

    private var visibleThing:IVisible;

    then I can create a situation where a check or decision is made for what IVisible should ultimately be in any given situation. Meaning, either

    visibleThing = new TextField()
    or
    visibleThing = new Shape()

    is totally legit. That's because both of these types implement IVisible. This stops me from having to make a var for every possible outcome. I can use one var to represent everything. In cases where that var is looped into different endTypes I can simply clone the results into an Array or Object and return the entire array or object as a package of results.

    Since we are talking about visible objects I would push the results into an array and then forEach the array adding it's contents to the stage via its position in the array
    Last edited by MadGypsy; 08-16-2014, 07:49 AM.

    Leave a comment:


  • MadGypsy
    replied
    @mindz
    I don't want to discourage you but I don't believe my code would be a good place to start. I program using design pattern concepts. It would be real tough for you to learn my code if you don't also understand design patterns. It would be like trying to build a car before you know how to drive one.

    If you really want to learn programming, pick up QC. It's a simple little language with a very simple compile environment. You don't have to worry about stuff like design patterns with QC as its just one long procedural run from one end to the other with very little abstraction and encap.

    Leave a comment:


  • Mindf!3ldzX
    replied
    ahahahaha, good one especially the omega brain part

    Soon as this project reaches your approval of being completed (atleast, out of heavy-WIP realm) I'll probably use your 'stuffs' to join the ranks even if starting off as Private Mindzor

    Leave a comment:


  • MadGypsy
    replied
    @mindz

    that means you are about to become a genius. Let it happen. Once your first brain explodes it uncovers your alpha brain core which then consumes your first brain like a gigantic spaghetti monster.From there you just need to plug yourself into an electric socket for a second. This will fuse the alpha brain to the first brain, clearing new neurological highways between the two giving you what we call a "Steven Hawking".

    There is tale of an omega brain but only spike knows how to get that...lol. There are rumors that you need to eat the fuck out of some Wheaties and watch at least 400 college lectures Clockwork Orange style but, nobody has confirmed this.

    Bottom line is, if you don't do something you'll spend the rest of your life with what we call an "Obama" and that could seriously deprecate your ability to have a good idea, ever make even one good decision and tell lies that aren't blatantly obvious.
    Last edited by MadGypsy; 08-15-2014, 07:31 AM.

    Leave a comment:


  • Mindf!3ldzX
    replied
    I just read the posts front to back, and I will admit my brains going to explode. haha.

    Leave a comment:


  • MadGypsy
    replied
    ...I just want my code to be reusable. Basically, the ultimate thing you are trying to make is going to be fed an Object of properties. How convenient, I wrote this Object parser thingy that can turn text into Objects.

    The twain have met.

    @you got it going, brother!

    looking at it it's like code poetry to me. If I was posting classes you would see it's really clean. And, in a way I will post classes cause I'll make the project masters available when the app is released.
    Last edited by MadGypsy; 08-14-2014, 09:01 PM.

    Leave a comment:


  • Dutch
    replied
    You got it going, brother! You suffer from the same problem I have, which isn't really a problem at all, it's good. You redo everything you do multiple times. Takes a lot longer, but is way better.

    Leave a comment:


  • MadGypsy
    replied
    ok, wow, well I take it back I wont finish the rewrite tonight. Not cause I'm not trying though. I had this code epiphany (so to speak). Ill try to explain this using numbers. The higher the value the more specific the code is:

    0 has the abilty to set properties. It also has one function that should be overridden in any subclass
    1 extends 0 and adds the ability to delegate the property setting. It also overrides the function I mentioned and returns the completed object of it's type.
    2 is the type of 1 and is assigned to be the return value of 1 after 1 has been fully created. 2 also has the ability to read and write to itself
    3 extends 2 and therefore is a returned 1. This class sets the required conditions to become itself

    and that's why I cant finish tonight.

    edit: consider
    0 dynamicPropertySetter
    1 textFieldObject, 1 ShapeObject - injects type specific data into dynamicPropertySetter as a subclass
    2 TextField - has a textFieldObject and becomes the returned value of it. Also contains TextField neutral commands
    2 Shape - same thing I just wrote but as it partains to ShapeObject
    3 titleField - subclasses TextField. This class actually starts the entire process. It's fed the properties. If you read this backwards ut would be whats really happening. This class also checks for more specific properties that are required to be this type of TextField.

    meaning

    3 addressField -
    3 barShape
    3 buttonOverState
    3 trim_upper

    hopefully that makes it clear why I chose this way for every 1 I make a 2 that is a blank generic version of 1's return value, and then a lot of 3's from that 2. 0 must exist or it would be in every 1.

    oh and there will be 4's. These will be composites of 3's. up,over,down,hitArea - there are four 3's that you would find in a button, and that button would be a 4. It would also be the new first thing. This would hold the properties for all 4 button states. Wait, my bad you wouldn't make four 3s for the button states. Youd just make one and use ut four times.
    Last edited by MadGypsy; 08-14-2014, 08:44 PM.

    Leave a comment:


  • MadGypsy
    replied
    Well I split 2 classes into 8 classes and 3 interfaces. There is a little more to do. I have elite code for everything regarding external information. Now I just need to fix the scripts that display UI elements. That's not a big deal cause it's only 4 things but I'm done for the night.

    Tomorrow I'll finish this rewrite and then i'm going to do the same thing for my actual app script. From thete I intend to finish the app script continuing from the solid OOP foundation I laid. This is going to be so much better. My previous code was impossible to follow and everything was exposed to everything. The code is so encapsulated now you could swallow it like a pill.

    Leave a comment:


  • MadGypsy
    replied
    I check data before and after it is created. For instance, I may have a string of data that I want to parse into an object. First thing I would do is make sure the data string isn't empty or null. From there, if I was expecting the Object to have certain required vars, I would check for each of the required vars. In most cases (but not all) if the string or object check failed I would throw an error with an explanation of the problem.

    @professor

    lol, I Iike your style... kill em with kindness. Touche'

    ..........

    I'm about done with the start over. The thing is, my program was incredibly procedural and far too specific. Let me explain this with shapes. I built a red square of exactly 10x10 dimensions. This isn't bad it just isn't really good. The rewrite has me building a framework of interfaces that are capable of building any shape of any color and size. Those possibilities are implemented by a framework that defines the resulting shape more specifically.

    In short, I switched out my procedural spaghetti code for design patterns and good OOP. The results are a much more strict and clear route to results.

    Leave a comment:


  • RL Clown
    replied
    MadGypsy, I'm asking you this question because you seem to be a very knowledgeable person... I apologize for going off-topic but this is very important stuff here. Seriously, how would you correct error codes in data? I apologize if I'm not using the correct terminology. Before you answer this question, I understand that my question is vague. It depends on how big or how long the data is... But suppose that we had an average sized piece of data... Example: The Quake Guy (Ranger) is trying to use his grenade launcher. The problem is: He cannot fire a single grenade. How would I correct the error? Is there a logical approach?

    PS: Would you like to be a University professor?

    Leave a comment:


  • MadGypsy
    replied
    I'm starting over. It's not a true start-over since all of the questions have been answered but, I am going back to the very beginning and am going to rewrite this in it's entirety. The reason is simple. I don't like the flow of the code and I know I can write it better.

    Leave a comment:

Working...
X