The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Scripts & Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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, 06:58 PM
Dying Light's Avatar
Dying Light
Assassin
 
Join Date: Jun 2011
Location: Somewhere cold...
Gender: Male
Nature: Hardy
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

Reply With Quote
  #27    
Old October 26th, 2012, 03:03 AM
Xavier_PokeNation's Avatar
Xavier_PokeNation
Togepi
 
Join Date: Sep 2011
Gender: Male
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, 06:31 AM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
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.

Last edited by Umbreon; October 26th, 2012 at 11:17 AM. Reason: Your double post has been automatically merged.
Reply With Quote
  #29    
Old October 28th, 2012, 10:10 AM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
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:	29
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.)

Last edited by Umbreon; October 28th, 2012 at 10:16 AM.
Reply With Quote
  #30    
Old October 28th, 2012, 11:07 AM
DaSpirit's Avatar
DaSpirit
Mad Programmer
 
Join Date: Jul 2007
Location: New York City
Gender: Male
Nature: Quiet
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
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
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
Unhatched Egg
 
Join Date: May 2010
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, 05:04 PM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
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, 05:06 PM
DaSpirit's Avatar
DaSpirit
Mad Programmer
 
Join Date: Jul 2007
Location: New York City
Gender: Male
Nature: Quiet
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.
__________________
My Links:

Last edited by DaSpirit; November 14th, 2012 at 05:18 PM.
Reply With Quote
  #35    
Old November 14th, 2012, 05:47 PM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
Not really a long time if you are patient like me.
Reply With Quote
  #36    
Old November 14th, 2012, 06:35 PM
NuclearWizard
Unhatched Egg
 
Join Date: May 2010
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, 06:46 PM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
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, 08:13 PM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
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, 04:07 PM
Xavier_PokeNation's Avatar
Xavier_PokeNation
Togepi
 
Join Date: Sep 2011
Gender: Male
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, 05:11 PM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
Alright then here's a preview:


Click image for larger version

Name:	Java Pokemon Editor.png
Views:	21
Size:	67.4 KB
ID:	66603
Reply With Quote
  #41    
Old November 24th, 2012, 06:13 PM
DaSpirit's Avatar
DaSpirit
Mad Programmer
 
Join Date: Jul 2007
Location: New York City
Gender: Male
Nature: Quiet
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.
__________________
My Links:
Reply With Quote
  #42    
Old November 24th, 2012, 06:46 PM
Umbreon's Avatar
Umbreon
Community Supporter
 
Join Date: Aug 2009
Location: Nearby my feet.
Age: 17
Gender: Male
Nature: Calm
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:	23
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, 04:31 PM
delta38's Avatar
delta38
Unhatched Egg
 
Join Date: Nov 2012
Gender: Male
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, 01:44 AM
Ayutac's Avatar
Ayutac
Developer who wants your help
 
Join Date: Dec 2011
Location: Germany
Age: 23
Gender: Male
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 10:24 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.