User Tag List

Page 10 of 12 FirstFirst ... 8 9 10 11 12 LastLast
Results 91 to 100 of 115

Thread: AngelScript: The Revenge

  1. #91
    Keese
    ZC Developer

    Join Date
    Jan 2007
    Age
    35
    Posts
    52
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    800
    Level
    9
    vBActivity - Bars
    Lv. Percent
    91.57%
    Right. While we're speaking of the horrors of zscript, I realized I never mentioned the latest bit I cooked up:
    Code:
    //////////////////////////////////////////////////////////////////
    // Pointers are numbers holding a reference to a specific index of a specific
    // array. This library deals with the creation and manipulation of pointers.
    //
    // Pointers are numbers that are split into 2 parts. The integer portion of
    // the number (XXX.0000) is the pointer's index into the zscript array. The
    // decimal portion of the number (000.XXXX) is the number of the zscript array
    // which the pointer is pointing into.
    //
    // All functions, if the array number is 0, will instead treat the integer
    // portion as the array number, and assume an index of 0. This lets you treat
    // arrays themselves as pointers to their 0 index.
    
    
    ////////////////////////////////////////////////////////////////
    // Creation
    
    
    // This creates a pointer to a given array. If given a pointer itself, it will
    // do nothing and return it instead.
    int GP_Pointer(int arg) {
        // If arg is a pointer, just return it.
        if (10000 * (arg % 1)) {return arg;}
        // Otherwise, create a new pointer to the first spot in the array.
        return 0.0001 * arg;}
    
    
    // This takes an array or a pointer, and returns a new pointer offset from the
    // first by the given amount.
    int GP_Pointer(int pointer, int offset) {
        // If arg is a pointer, just add the offset to it.
        if (10000 * (pointer % 1)) {return pointer + offset;}
        // Otherwise, create a new pointer from the array.
        return 0.0001 * pointer + offset;}
    
    
    ////////////////////////////////////////////////////////////////
    // Manipulation
    
    // Return the value that the pointer is pointing at, with the index offset by
    // the given number.
    int GP_Pointer_Get(int pointer, int offset) {
        // If pointer is actually an array, just return the 0 position of that
        // array.
        int array = 10000 * (pointer % 1);
        if (!array) {return pointer[offset];}
        // Otherwise return the pointer's value. (Array lookup truncates, so we
        // don't need to.)
        return array[pointer + offset];}
    
    // Set the value of a pointer, with the index offset by the given amount.
    void GP_Pointer_Set(int pointer, int offset, int value) {
    	// If pointer is actually an array, just set the offset position of that array.
    	int array = 10000 * (pointer % 1);
    	if (!array) {pointer[offset] = value; return;}
    	// Otherwise, set the pointer normally. (Array lookup truncates, so we don't
    	// need to.)
    	array[pointer + offset] = value;}
    It works wonderfully. The only problem is it's a tad bit slow.

  2. #92
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,827
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.3%
    Yes, this is another problem: ZScript is slow. Especially arrays. I don't want to rathole on this right now though; instead, if any of you guys want to do a performance comparison between c++, ZScript, and AS, I'll add some high precision timers and we can benchmark. We can even start a deadpool.

    Quote Originally Posted by Moosh View Post
    I see no use in doing this with global arrays so no worries there. And echoing what Grayswandir said, I learned to do this from looking at some of Saffith's scripts. I LEARNED IT FROM YOU, DAD! I LEARNED IT FROM WATCHING YOU!
    Heh. One of the reasons why I never released the GRIKARUGUN scripts alongside the quest file was because it's like a truckload bunch of stuff you should never do. That, and it's practically incomprehensible. Bad Saffith.


    Quote Originally Posted by SUCCESSOR View Post
    O.o

    You can do this?! Why do you do this? Why not just pass one big laser array?
    Laziness. x_x
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #93
    Empty and become Moosh Moosh's Avatar
    Join Date
    Oct 2012
    Posts
    57
    Mentioned
    13 Post(s)
    Tagged
    4 Thread(s)
    vBActivity - Stats
    Points
    644
    Level
    9
    vBActivity - Bars
    Lv. Percent
    1.28%
    Quote Originally Posted by SUCCESSOR View Post
    O.o

    You can do this?! Why do you do this? Why not just pass one big laser array?
    Readability mostly. I find it easier to read when there's multiple parallel arrays than when there's one with a bunch of multiplication or an incomprehensible mess of nested setter and getter functions. I use the one big array method if I'm working with global arrays, but with FFC scripts I haven't been hurt yet by wasting a few variables.

  4. #94
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    Why are we even talking about ZScript here...
    This is a discussion about the implementation of angelscript need i remind you guys about that?
    If you still want to use zscript thats your business.
    If you want to switch over to angelscript that's fine too.
    Last edited by Tamamo; 02-06-2017 at 10:16 AM.

  5. #95
    Banned
    Join Date
    May 2015
    Posts
    141
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    667
    Level
    9
    vBActivity - Bars
    Lv. Percent
    14.48%
    Quote Originally Posted by Tamamo View Post
    Why are we even talking about ZScript here...
    This is a discussion about angelscript need i remind you guys about that?
    If you still want to use zscript thats your business.
    If you want to switch over to angelscript that's fine too.
    Because this is topic about Angelscript replacing ZScript. Of course there is going to be talk about ZScript.

  6. #96
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    38
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,582
    Level
    30
    vBActivity - Bars
    Lv. Percent
    54.35%
    Quote Originally Posted by Dimentio View Post
    Because this is topic about Angelscript replacing ZScript. Of course there is going to be talk about ZScript.
    This is a topic about implementing AngelScript. The hypothetical future of Zscript discussion is getting a little old and tiring.

  7. #97
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    Quote Originally Posted by SUCCESSOR View Post
    This is a topic about implementing AngelScript. The hypothetical future of Zscript discussion is getting a little old and tiring.
    I feel the same way you do buddy. In fact... It's time i step back in as official zc ambassador since apparently @ZoriaRPG ; and i'm just going to be blunk, sucks at his job and doesn't even know what that means. It has nothing to do with the community, it has to do with keeping the develop team from falling apart.
    @ZoriaRPG @Grayswandir @Dimentio
    if you have nothing else to say about the implementation of angelscript. then feel free to make another thread to discussion compatibility. It's really sad when i'm forced to put my foot down here cause you kids don't know how to stop.
    When nobody wanted to go with my suggestion to implement LUA instead of AS i chose to respecte everyone elses decision. It would be nice if you would show me the same courtesy.

  8. #98
    Banned
    Join Date
    May 2015
    Posts
    141
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    667
    Level
    9
    vBActivity - Bars
    Lv. Percent
    14.48%
    Quote Originally Posted by Tamamo View Post
    I feel the same way you do buddy. In fact... It's time i step back in as official zc ambassador since apparently @ZoriaRPG ; and i'm just going to be blunk, sucks at his job and doesn't even know what that means. It has nothing to do with the community, it has to do with keeping the develop team from falling apart.
    @ZoriaRPG @Grayswandir @Dimentio
    if you have nothing else to say about the implementation of angelscript. then feel free to make another thread to discussion compatibility. It's really sad when i'm forced to put my foot down here cause you kids don't know how to stop.
    When nobody wanted to go with my suggestion to implement LUA instead of AS i chose to respecte everyone elses decision. It would be nice if you would show me the same courtesy.
    Wait, who made you in charge, again?
    .
    Anyways, any discussion on Angelscript is inherently linked to ZScript discussion, so I fail to see why we need two separate topics for this (especially since I don't recall the change to Angelscript ever being... well, confirmed (unless that was somehow decided already and I missed it)).

  9. #99
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    especially since I don't recall the change to Angelscript ever being... well, confirmed
    It was decided eons ago, by Saffith and Gleeok both . They removed it with every attention to come back to it later. >_>

  10. #100
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    38
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,582
    Level
    30
    vBActivity - Bars
    Lv. Percent
    54.35%
    Children! Children...

    Quote Originally Posted by Dimentio View Post
    Anyways, any discussion on Angelscript is inherently linked to ZScript discussion...
    Because the discussion on Zscript hasn't been constructive. It's been mostly whining about what *might* happen with Zscript. This isn't the thread to discuss what may or may not happen with Zscript in the future. It's not constructive.

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social