Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply
 
Thread Tools
  #26    
Old October 25th, 2012 (6:58 PM).
Dying Light's Avatar
Dying Light Dying Light is offline
Pegasus Knight
     
    Join Date: Jun 2011
    Location: Exiled
    Gender: Male
    Nature: Hardy
    Posts: 368
    Quote:
    Originally Posted by DaSpirit View Post
    I don't use Java, but I know about OpenGL. If this happens then it is because of your OpenGL implementation does not use hardware acceleration. Most beginners use the fixed pipeline which is bad and old but everyone's computer supports. A good OpenGL implementation (but which older computers do not support) relies on shaders (generally versions 3.x and up). Shaders are done on the GPU rather the CPU which makes it a whole lot faster and less CPU intensive like which you are seeing.

    Under research, I found that the default Java 2D library uses hardware accelerations based on what is supported. The code probably makes it so that it chooses whichever highest OpenGL version you support and uses it. Your implementation probably only uses a single version.
    This is actually very true. For example, when I ran Minecraft on a brand new PC it had OpenGL errors because hardware acceleration wasn't allowing the main GPU to allocate shaders to the lighting system.
    __________________
    None

    “Our only limits are the ones we place on ourselves.”
    Reply With Quote

    Relevant Advertising!

      #27    
    Old October 26th, 2012 (3:03 AM).
    Xavier_PokeNation's Avatar
    Xavier_PokeNation Xavier_PokeNation is offline
       
      Join Date: Sep 2011
      Gender: Male
      Posts: 50
      Quote:
      Originally Posted by DaSpirit View Post
      I don't use Java, but I know about OpenGL. If this happens then it is because of your OpenGL implementation does not use hardware acceleration. Most beginners use the fixed pipeline which is bad and old but everyone's computer supports. A good OpenGL implementation (but which older computers do not support) relies on shaders (generally versions 3.x and up). Shaders are done on the GPU rather the CPU which makes it a whole lot faster and less CPU intensive like which you are seeing.

      Under research, I found that the default Java 2D library uses hardware accelerations based on what is supported. The code probably makes it so that it chooses whichever highest OpenGL version you support and uses it. Your implementation probably only uses a single version.
      I'm not talking about my implementation, because I dont have one. I was just asking because I've seen many java engines that use more CPU when using opengl compared with software rendering. One example is the well known mmorpg Runescape. And what I was going to say after his answer, was that since 2d pokemon games don't require an high fps value, he can put a cap on the fps and stay with java2d as it will use less CPU than the opengl implementation while having the same drawing performance.
      __________________

      Reply With Quote
        #28    
      Old October 26th, 2012 (6:31 AM). Edited October 26th, 2012 by Umbra.
      Umbra's Avatar
      Umbra Umbra is offline
      • Platinum Tier
       
      Join Date: Aug 2009
      Location: Nearby my feet.
      Age: 20
      Gender: Female
      Nature: Calm
      Posts: 1,745
      Yes, it started using slightly more CPU, but in exchange for 1000+ fps.

      Quick update here:

      I added tilesets instead of individual tile images, these can be any width/height as long as it's divisible by 32 (because each tile is 32x32 in size). (Tiles used in RMXP will work!) I also did the same for characters, meaning a character must be divisible by 4. (Again RMXP characters will work!)

      Edit:
      Larger maps which load EVERY LAST TILE at once (500x500x3) will get around 70-100 fps, but this does not include the anti-lag I will insert.
      Reply With Quote
        #29    
      Old October 28th, 2012 (10:10 AM). Edited October 28th, 2012 by Umbra.
      Umbra's Avatar
      Umbra Umbra is offline
      • Platinum Tier
       
      Join Date: Aug 2009
      Location: Nearby my feet.
      Age: 20
      Gender: Female
      Nature: Calm
      Posts: 1,745
      Alright, here's another update:

      I re-scratched the project (again I did not like the structure, but this time I do like the structure of my system)..
      Here are some things I added:
      Added a better image loader,
      Added some image functions (such as setting the alpha, color, rotation),
      Added 3D support, currently it's only a block, but it's getting there.
      Added A script parser for both Javascript and Ruby (Still finishing this up and yes this means that RMXP scripts MIGHT work),
      Added an HTML file such as what essentials used to have (I shall build this up along the way as I add more features).
      Added Scene Support (I don't know if I said this already, but it's like Scenes in essentials. Scene_Intro as an example)
      Classified my scripts (I added packages which contains the appropriate scripts inside)

      These are some of what I had completed from today and yesterday (which was when I scratched my system yet again)

      There is 1 bug currently (not much of a bug though) when loading images with a height or width greater than 1024 it brings the game crashes (the debug messages says it's because the image is too big)

      EDIT:
      Here's an image showing the current intro:
      Click image for larger version

Name:	image.png
Views:	30
Size:	133.6 KB
ID:	66399

      Also, I "stole" essentials title screen (I don't think it matters since I am giving Maruno credit for now until it's changed + it's in an open source kit.)
      Reply With Quote
        #30    
      Old October 28th, 2012 (11:07 AM).
      DaSpirit's Avatar
      DaSpirit DaSpirit is offline
      Mad Programmer
         
        Join Date: Jul 2007
        Location: New York City
        Gender: Male
        Nature: Quiet
        Posts: 240
        Quote:
        Originally Posted by hansiec View Post
        Yes, it started using slightly more CPU, but in exchange for 1000+ fps.
        Wait, so the FPS is not capped? Wouldn't you be wasting CPU cycles then?

        Quote:
        Originally Posted by hansiec View Post
        Added A script parser for both Javascript and Ruby (Still finishing this up and yes this means that RMXP scripts MIGHT work),
        That sounds weird. An interpreter in something that is already interpreted. But if it will make it easier for your users, then that's good I suppose.
        Reply With Quote
          #31    
        Old October 28th, 2012 (11:18 AM).
        Umbra's Avatar
        Umbra Umbra is offline
        • Platinum Tier
         
        Join Date: Aug 2009
        Location: Nearby my feet.
        Age: 20
        Gender: Female
        Nature: Calm
        Posts: 1,745
        Quote:
        Originally Posted by DaSpirit View Post
        Wait, so the FPS is not capped? Wouldn't you be wasting CPU cycles then?
        True, I'll cap the FPS around 100 FPS

        Quote:
        Originally Posted by DaSpirit View Post
        That sounds weird. An interpreter in something that is already interpreted. But if it will make it easier for your users, then that's good I suppose.
        I added a ruby interpreter so people could at least attempt to use some scripts from Essentials, and the JavaScript parser is built into Java, so I didn't really do much effort on the interpreters.
        Reply With Quote
          #32    
        Old November 14th, 2012 (12:07 PM).
        NuclearWizard NuclearWizard is offline
           
          Join Date: May 2010
          Posts: 42
          Did you use JRuby?

          That should have the best support for Ruby on the JVM.

          Also, Java works by interpreting any language into an intermediate representation, or IR. It is then compiled at runtime. So it's not going to slow anything down to use Ruby or JS on the JVM.

          Also, I might actually use this, since I am in charge of programming a fan game in Java at the moment.
          Reply With Quote
            #33    
          Old November 14th, 2012 (5:04 PM).
          Umbra's Avatar
          Umbra Umbra is offline
          • Platinum Tier
           
          Join Date: Aug 2009
          Location: Nearby my feet.
          Age: 20
          Gender: Female
          Nature: Calm
          Posts: 1,745
          I'll try out JRuby, I might be a better alternative than using the built in script engine. Anyways, I've been working c++ for a while. (so I can convince my dad to buy me visual studio instead of sitting with visual c++ express) Anyways, I'll get back to this soon, I do plan on working on this again in December.
          Reply With Quote
            #34    
          Old November 14th, 2012 (5:06 PM). Edited November 14th, 2012 by DaSpirit.
          DaSpirit's Avatar
          DaSpirit DaSpirit is offline
          Mad Programmer
             
            Join Date: Jul 2007
            Location: New York City
            Gender: Male
            Nature: Quiet
            Posts: 240
            What's wrong with Visual Studio C++ Express?

            Visual Studio in general just plain sucks. No constexpr, no initializer lists. It was disappointing.

            And in December? That's a long time.
            __________________
            Yes.
            Reply With Quote
              #35    
            Old November 14th, 2012 (5:47 PM).
            Umbra's Avatar
            Umbra Umbra is offline
            • Platinum Tier
             
            Join Date: Aug 2009
            Location: Nearby my feet.
            Age: 20
            Gender: Female
            Nature: Calm
            Posts: 1,745
            Not really a long time if you are patient like me.
            Reply With Quote
              #36    
            Old November 14th, 2012 (6:35 PM).
            NuclearWizard NuclearWizard is offline
               
              Join Date: May 2010
              Posts: 42
              Don't get that. NetBeans C++ is good.

              I personally just whip up a text editor and compile code. People tell me that I'm stupid and inefficient, but hey, works for me!

              Anyway...JRuby, as well as most other scripting languages for Java (including Java itself probably) use javax.script.

              I'm not even primarily a Java programmer (The fangame I'm working on at present, in fact, will be my first Java project.) and I know this stuff...hah.

              But yes, would you mind if I made my own engine based on this one?
              Reply With Quote
                #37    
              Old November 14th, 2012 (6:46 PM).
              Umbra's Avatar
              Umbra Umbra is offline
              • Platinum Tier
               
              Join Date: Aug 2009
              Location: Nearby my feet.
              Age: 20
              Gender: Female
              Nature: Calm
              Posts: 1,745
              I don't mind, you may do what you want, this can be extended into anything you want to (For any purpose at all) as long as I am in the credits list.
              Reply With Quote
                #38    
              Old November 23rd, 2012 (8:13 PM).
              Umbra's Avatar
              Umbra Umbra is offline
              • Platinum Tier
               
              Join Date: Aug 2009
              Location: Nearby my feet.
              Age: 20
              Gender: Female
              Nature: Calm
              Posts: 1,745
              Alright, updates...

              I am busy adding a complete editor (like what XP has), it will go more alongside of GM's view.

              Alright here's a poll now:

              Who wants me to make this engine Pokemon Exclusive

              OR

              Should it be a full game engine for any type of game you want to make


              Anyways I'll have an update to the editor when I have it's layout completed.
              Reply With Quote
                #39    
              Old November 24th, 2012 (4:07 PM).
              Xavier_PokeNation's Avatar
              Xavier_PokeNation Xavier_PokeNation is offline
                 
                Join Date: Sep 2011
                Gender: Male
                Posts: 50
                Quote:
                Originally Posted by hansiec View Post
                Alright, updates...

                I am busy adding a complete editor (like what XP has), it will go more alongside of GM's view.

                Alright here's a poll now:

                Who wants me to make this engine Pokemon Exclusive

                OR

                Should it be a full game engine for any type of game you want to make


                Anyways I'll have an update to the editor when I have it's layout completed.
                I think you should go with Pokemon Exclusive :p
                __________________

                Reply With Quote
                  #40    
                Old November 24th, 2012 (5:11 PM).
                Umbra's Avatar
                Umbra Umbra is offline
                • Platinum Tier
                 
                Join Date: Aug 2009
                Location: Nearby my feet.
                Age: 20
                Gender: Female
                Nature: Calm
                Posts: 1,745
                Alright then here's a preview:


                Click image for larger version

Name:	Java Pokemon Editor.png
Views:	22
Size:	67.4 KB
ID:	66603
                Reply With Quote
                  #41    
                Old November 24th, 2012 (6:13 PM).
                DaSpirit's Avatar
                DaSpirit DaSpirit is offline
                Mad Programmer
                   
                  Join Date: Jul 2007
                  Location: New York City
                  Gender: Male
                  Nature: Quiet
                  Posts: 240
                  As much as I love editors, the ones that are made in Java look terrible. It's still a neat idea and can let you separate and abstract things better than GameMaker would.

                  I've actually found something that can make that ugly GUI look better. It will give you a native window but it's up to you to use actually use it. An article here.
                  __________________
                  Yes.
                  Reply With Quote
                    #42    
                  Old November 24th, 2012 (6:46 PM).
                  Umbra's Avatar
                  Umbra Umbra is offline
                  • Platinum Tier
                   
                  Join Date: Aug 2009
                  Location: Nearby my feet.
                  Age: 20
                  Gender: Female
                  Nature: Calm
                  Posts: 1,745
                  Quote:
                  Originally Posted by DaSpirit View Post
                  As much as I love editors, the ones that are made in Java look terrible. It's still a neat idea and can let you separate and abstract things better than GameMaker would.

                  I've actually found something that can make that ugly GUI look better. It will give you a native window but it's up to you to use actually use it. An article here.
                  Alright, this one's in C++ and it's not for my kit before you ask (I made this long before I decided my kit).

                  Click image for larger version

Name:	Other Editor.png
Views:	24
Size:	25.8 KB
ID:	66604

                  Also forgot to say, the battle folder contains:

                  Pokemon Sprites -- Obviously the Pokemon Battle Sprites (debating to sub front and back folders)
                  Battle Backgrounds -- Obviously the Backgrounds for battles
                  -- Battle Characters Folder --
                  Pokemon -- Pokemon Data Storage
                  Trainers -- Trainer Data Storage (I'll split this into trainer types and trainers)

                  Also notice that I created 2 different map types, one which will be a regular map editor and the other (which will take a while) will be a fully featured 3D map editor.

                  Anyways, I'll check out the link for less ugly windows.
                  Reply With Quote
                    #43    
                  Old December 14th, 2012 (4:31 PM).
                  delta38's Avatar
                  delta38 delta38 is offline
                     
                    Join Date: Nov 2012
                    Gender: Male
                    Posts: 5
                    nice but seriously think about the graphics and stuff AND THAT WOULD BE COMPLETLY AWESOME! check out my thread about ideas if it gets approved
                    Reply With Quote
                      #44    
                    Old January 9th, 2013 (1:44 AM).
                    Ayutac's Avatar
                    Ayutac Ayutac is offline
                    Developer who wants your help
                       
                      Join Date: Dec 2011
                      Location: Germany
                      Age: 26
                      Gender: Male
                      Posts: 157
                      RPG-Maker costs money? I was kinda creating my own Java RPG-Maker too, but then I discovered Essentials and was satisfied :) (Yes I know this is not very logical)

                      Nevertheless I'm willing to help you, since I support Free Software. Going to make it open source too?

                      EDIT: Oh, and about the GUI: Java has something called "Look & Feel" where you can manipulate everything. Just ain't nobody got time for dat. I would really like you to stick to Java for the usability on all systems without annoying compiling...
                      __________________
                      Reply With Quote
                      Reply
                      Quick Reply

                      Sponsored Links
                      Thread Tools

                      Posting Rules
                      You may not post new threads
                      You may not post replies
                      You may not post attachments
                      You may not edit your posts

                      BB code is On
                      Smilies are On
                      [IMG] code is On
                      HTML code is Off

                      Forum Jump


                      All times are GMT -8. The time now is 7:59 AM.