Announcement

Collapse
No announcement yet.

What's Going On

Collapse

There are currently 66 users online. 3 members and 63 guests.

Most users ever online was 1,083 at 04:38 AM on 2016-11-18.

Client progress

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

  • Client progress

    The goals I have with this client are:
    • remove the dependence on Graal
    • utilize hardware capabilities to a more significant extent (no 1980s 20 FPS cap, high performance that should be expected from a simple 2D game)
    • enable much more interesting graphical modifications through the use of shaders
    • provide a more C++ style (in terms of syntax, at least) scripting language that can be modified as needed
    • provide an option to have a server that doesn't use levels for its gameplay if desired
    • allow for more precise control of server and client communication, which is critical for smooth player/NPC movement
    • to have as little hard-coded as possible



    Highlights of work done so far:
    • Syntax error reporting for the script compiler is incredibly detailed to make it much easier to track down and understand what/where the code error is.
    • The scripting language is quite flexible and easy to use.



    Below is the current state of the client, including what needs to be done. Updates will be posted in this thread.

    Struckout text indicates a completed step.
    Red text indicates areas currently being worked on.
    Yellow text indicates areas previously under development that had to be put back on hold

    Code:
    Script engine
    
    Rendering core
      Image loading
      Text rendering (90%)
      Objects (60%)
    
    UI
      Basic window (50%)
      Basic controls
        Button (75%)
        Editbox (50%)
        Combobox
    
    Levels
      Graal format conversion
      Rendering
    
    Networking
    
    Server
    
    Script engine optimization

    The script language documentation is attached below.
    Attached Files
    Last edited by Codr; 2017-08-27, 08:26 AM.
    2ndwolf, pixelghost and 5 others like this.
  • #2

    I guess I that can pretend that I read and understood it.
    Originally posted by LoakeyRonso
    oh and the reason graal reborn is dead isn't what ever reason you want to blame it on , it's you . you publicly humiliate anyone who shows up , call them derogatory word's and treat them like shit . you close any thread you don't have any interest in even if other people do . slam their work without consideration for the person themself . how it is anyone can even consider you a decent human being is beyond me .
    3770

    Comment

    • #3

      I'd like to hear more about function pointers since it's the first time I read about it. As in bush.ForceRespawn, what triggers the respawn script to run?

      Will referencing work too if I do something like:
      library = new Library();
      library.addimage("universe.gif");

      cat = new Cat(library.images);

      library.resizeverything();

      -> in this case the library images inside cat would be resized too.

      And more importantly, will array dynamically resize themselves?
      Say I make a new array of size 5 then add something in the 7th position, will the array automagically resize itself?

      Comment

      • #4

        Originally posted by 2ndwolf View Post
        And more importantly, will array dynamically resize themselves?
        Say I make a new array of size 5 then add something in the 7th position, will the array automagically resize itself?
        While that's kinda a cool suggestion, I find it an encouragement to design your code in an improper fashion. If you wanted a dynamic array why not just request that codr implement a linked-list like structure within the language.
        On that note...
        I think it'd be nice to have such implemented data structures that could then be extended upon by end users to write something like a queue or a stack.

        Another thing, will arrays store objects or strictly floating points/integers. Because being able to store function pointers would be pretty groovy, at least in my opinion and with that, would you then allow mixed data types and entrust to the programmer that they be careful with how they assign values?
        Variable concatenation is also another thing I can see as being a nice feature if anyone would ever chose to use it but I'd assume that's a pretty standard feature you'd implement regardless.


        Comment

        • #5

          Originally posted by 2ndwolf View Post
          As in bush.ForceRespawn, what triggers the respawn script to run?
          In this case, it's a function you'd have to call yourself.


          Will referencing work too if I do something like:
          library = new Library();
          library.addimage("universe.gif");

          cat = new Cat(library.images);

          library.resizeverything();

          -> in this case the library images inside cat would be resized too.
          Nothing there is referenced. That could be valid code, but I don't see why you'd try to hand the entire array of images to "Cat". You're passing a copy to "Cat", so whatever you do to "library" afterward isn't going to affect the data "Cat" received. I didn't note that you can pass parameters to a function as references as well.


          And more importantly, will array dynamically resize themselves?
          Say I make a new array of size 5 then add something in the 7th position, will the array automagically resize itself?
          Of course.




          Originally posted by tricxta View Post
          While that's kinda a cool suggestion, I find it an encouragement to design your code in an improper fashion. If you wanted a dynamic array why not just request that codr implement a linked-list like structure within the language.
          Linked lists are horrible and overused.


          I think it'd be nice to have such implemented data structures that could then be extended upon by end users to write something like a queue or a stack.
          I'm not sure how this fits into a scripting language. You'd have to try to explain that more.


          Another thing, will arrays store objects or strictly floating points/integers. Because being able to store function pointers would be pretty groovy, at least in my opinion and with that, would you then allow mixed data types and entrust to the programmer that they be careful with how they assign values?
          Arrays can hold any variable type, including another array. It's up to the user to properly utilize the data.


          Variable concatenation is also another thing I can see as being a nice feature if anyone would ever chose to use it but I'd assume that's a pretty standard feature you'd implement regardless.
          Are you referring to the name of the variable? If so, then yes, dynamic names will be possible, just like Graal.
          Last edited by Codr; 2013-04-08, 12:26 PM.

          Comment

          • #6

            Push and pop pls

            Comment

            • #7

              Originally posted by Codr View Post
              Linked lists are horrible and overused.
              I don't know why you say that but I'll trust you on it.


              Originally posted by Codr View Post
              Are you referring to the name of the variable? If so, then yes, dynamic names will be possible, just like Graal.
              Awesome!


              Originally posted by hosler View Post
              Push and pop pls
              Lolll.


              Comment

              • #8

                Originally posted by tricxta View Post
                I don't know why you say that but I'll trust you on it.
                There are situations where they're the right choice, but people use them outside of those situations just because they like the name or something.

                Having memory spread out in random locations and "linked" together with pointers is an excellent way to torture your processor and slow everything down needlessly.

                Comment

                • #9

                  Originally posted by Codr View Post
                  Nothing there is referenced. That could be valid code, but I don't see why you'd try to hand the entire array of images to "Cat". You're passing a copy to "Cat", so whatever you do to "library" afterward isn't going to affect the data "Cat" received. I didn't note that you can pass parameters to a function as references as well.
                  All I know is that it is a feature Java has and that the code I'm basing myself on for my game uses that kind of technique... I haven't investigated much on alternatives but it sounded like a cool idea to use objects passed in other objects as pointers/references since I wouldn't need to refresh my object after modifying it through one of its methods.

                  A better example could be:
                  bush = new plant();
                  tree = new plant();
                  sprout = new plant();

                  if(area.wetness > 40){
                  plant.setrespawntime(10);
                  } else {
                  plant.setrespawntime(40);
                  }

                  In this case plant.setrespawntime would set all the plant's respawn times to 10 or 40.

                  Of course a workaround could be:
                  if(area.wetness > 40){
                  respawntime = 10;
                  } else {
                  respawntime = 40;
                  }

                  bush = new plant(respawntime);
                  tree = new plant(respawntime);
                  sprout = new plant(respawntime);
                  ...

                  By the way, how could I be able to access multiple objects with a for loop.
                  as in:
                  myArray = {bush,tree,sprout};
                  for(i = 0; i < myArray.size(); i++){
                  myArray[i].setrespawntime(40);
                  }

                  Would work but it's always sexier to have a for each construct:
                  for(element in myArray){
                  element.setrespawntime(40);
                  }

                  Will there also be a way to check if an object is of a given type or would we need to code it for every object?
                  for(element in myArray){
                  if(element.type == plant){ // in opposition to element.type == "plant" if I need to hardcode it.
                  element.setrespawntime(40);
                  }
                  }

                  Additionnaly, will I be able to compare strings without strequals and co? What kind of typing will you use? Duck? Sounds like you're aiming for duck typing so far but I just want to make sure.

                  Comment

                  • #10

                    Originally posted by 2ndwolf View Post
                    All I know is that it is a feature Java has and that the code I'm basing myself on for my game uses that kind of technique... I haven't investigated much on alternatives but it sounded like a cool idea to use objects passed in other objects as pointers/references since I wouldn't need to refresh my object after modifying it through one of its methods.

                    A better example could be:
                    bush = new plant();
                    tree = new plant();
                    sprout = new plant();

                    if(area.wetness > 40){
                    plant.setrespawntime(10);
                    } else {
                    plant.setrespawntime(40);
                    }

                    In this case plant.setrespawntime would set all the plant's respawn times to 10 or 40.
                    Ewww, nooooo. Please no.


                    Comment

                    • #11

                      Originally posted by tricxta View Post
                      Ewww, nooooo. Please no.
                      Why not? O_o

                      Comment

                      • #12

                        How about GS2 since we already know it works?
                        Originally posted by LoakeyRonso
                        oh and the reason graal reborn is dead isn't what ever reason you want to blame it on , it's you . you publicly humiliate anyone who shows up , call them derogatory word's and treat them like shit . you close any thread you don't have any interest in even if other people do . slam their work without consideration for the person themself . how it is anyone can even consider you a decent human being is beyond me .
                        3770

                        Comment

                        • #13

                          Haven't you read the other topic?
                          GS2 is a mess and pushes us into making messy code.

                          Comment

                          • #14

                            Mark forums read
                            Originally posted by LoakeyRonso
                            oh and the reason graal reborn is dead isn't what ever reason you want to blame it on , it's you . you publicly humiliate anyone who shows up , call them derogatory word's and treat them like shit . you close any thread you don't have any interest in even if other people do . slam their work without consideration for the person themself . how it is anyone can even consider you a decent human being is beyond me .
                            3770

                            Comment

                            • #15

                              GS2 isn't really THAT bad to most people. It's just unacceptable to me, and a language can definitely be done better.

                              Considering a compiler has to be made either way, it makes no sense at all to use an inferior language.

                              Comment

                              Working...
                              X