PDA

View Full Version : [Engine] Pokemon Java Kit


Umbreon
September 2nd, 2012, 10:16 AM
Pokemon Java Kit


Intro:
Have you ever wanted to create your own pokemon game but your to lazy to program your own or don't know how? To cheap for rpg maker xp or another professional rpg system? WRONG! I am now creating a game engine dedicated to pokemon for.... FREE!


Current Features:
Smooth map movement/scrolling (like an rpg should) (include player movements/turning)
Complete NPC support (movement/teleporting/messages/erase/self switches/ect.)
Bike (only the speed movement not graphics)
Multipul region badge support (Like G/S/C)
Sub Script engine of Javascript (used for events and it binds the main essentials too)
A neatly organized system for easy to use/change system (ummm not a feature really)
FULL keyboard support (wouldn't be a good system without it)
FULL mouse support (even the little things like moving/entering the window/ect.)

Comming Soon Features:
Battle System (Includes the pokemon/item class)
Data Bank (Stores data on externals (items/pokemon/tms/trainers/ect.) like poke_essentials' compiler script)
Region Maps (Support for displaying region maps)
Menu Support (displays main menus)


Comming Later On....
Anything I can think of while I finish the comming soon feature list.

Images and Videos:

Cpu Tests
Also note my debug text V (if you wanted to keep track on my positions)
Mocks you for no badge...
http://desmond.imageshack.us/Himg266/scaled.php?server=266&filename=talk1.png&res=landing

I have no tree sprite, the little kid does fine for now (not being cruel on purpose if you think that)
http://desmond.imageshack.us/Himg801/scaled.php?server=801&filename=tree1v.png&res=crop

To lazy to make a better badge text but it works fine
http://desmond.imageshack.us/Himg560/scaled.php?server=560&filename=badge1.png&res=landing
He says something different now
http://desmond.imageshack.us/Himg404/scaled.php?server=404&filename=badge2l.png&res=landing

Now you don't mock me...
http://desmond.imageshack.us/Himg268/scaled.php?server=268&filename=talk2o.png&res=landing

It's gone (again this was only because I had no tree sprite and I needed to give a visual)
http://desmond.imageshack.us/Himg534/scaled.php?server=534&filename=tree2s.png&res=landing

No videos yet


Bugs:
Compiling to a JAR won't load any files (This is actually reading from the jar's filepath)
The main bugs can be found in the download

Credits:
Hansiec -- Complete scripting of the WHOLE system (excluding that from what is included with java)
Who ever ripped the graphics from pokemon g/s to Pokemon: Metallic Silver (includes the sprites) and a very little amount of referencing (mainly for the JFrame)
Completely programmed with: Eclipse

Releases:
Current release: Version 1.0 (https://rapidshare.com/files/2127363227/JPK.zip)

Xavier_PokeNation
September 2nd, 2012, 01:02 PM
Good luck with this. I suggest you to use tiled for maps instead of that ;)

Umbreon
September 5th, 2012, 06:03 PM
Good luck with this. I suggest you to use tiled for maps instead of that ;)

I agree, I already implemented poke-tiles which is a modified version of tiled for Java


I've also added simple trainer/wild battles

Imags
September 5th, 2012, 11:58 PM
I may use this then you have implemented more features. :)

KingCharizard
September 6th, 2012, 01:45 AM
Uhh I love how it always seems people create more than one account to bump their topics.. :) anyways good luck with this

Umbreon
September 6th, 2012, 07:39 AM
Uhh I love how it always seems people create more than one account to bump their topics.. :) anyways good luck with this

Honestly, I only have 1 account.

Flameguru
September 7th, 2012, 07:03 PM
Looks a little similar to something I made years ago :P

You didn't post any code so I have no idea what all you've actually changed from my engine besides the color of the positioning font.

All of the listed bugs I have fixed in my latest version but I have not updated the source on Google Code in a long time nor do I plan to.

Good luck, I grew tired of working on my Java Engine a long time ago and I'd love to finish it but I'm just far too busy these days.

Yuoaman
September 7th, 2012, 08:30 PM
Honestly, I only have 1 account.

Come on, Ho-oh 112, we shouldn't have to play these games anymore. I thought we had moved past this. You disappoint me, son.

Umbreon
September 8th, 2012, 06:37 AM
Come on, Ho-oh 112, we shouldn't have to play these games anymore. I thought we had moved past this. You disappoint me, son.

I was seeing who here can tell the difference, looks like at least you have that perspective.


although those are my only accounts.



Looks a little similar to something I made years ago :P

You didn't post any code so I have no idea what all you've actually changed from my engine besides the color of the positioning font.

All of the listed bugs I have fixed in my latest version but I have not updated the source on Google Code in a long time nor do I plan to.

Good luck, I grew tired of working on my Java Engine a long time ago and I'd love to finish it but I'm just far too busy these days.


nothing, it's all mine except the graphics and some small amounts of code.

Also I have fixed all my bugs too.

Umbreon
September 9th, 2012, 10:09 AM
Alright I added a small pre-release to this.

includes:
Source of project (which has more features than listed above.)
Source of Poke-Tiles

Poke-tiles

Basic/Collision tileset data

DOA_Hitomi
September 10th, 2012, 02:16 PM
Cool, is it possible to use more updated sprites? (Nothing against the 2nd Generation games) Almost every other starter kit uses graphics from atleast the 3rd Generation.^^ lol

DaSpirit
September 10th, 2012, 06:09 PM
It took me a while to compile lol. I'm too used to Visual Studio. lol

Anyway, I have a few complaints about this game. It seems as if the player struggles to move. The player is supposed to bounce as he walks also. I am wondering why you stretched the sprites, it would look a lot better if you didn't. You should probably use HG/SS for the graphics instead of outdated 2nd and 3rd generation ones. Also, why don't the textbox messages scroll?

Umbreon
September 11th, 2012, 08:00 AM
It took me a while to compile lol. I'm too used to Visual Studio. lol

Anyway, I have a few complaints about this game. It seems as if the player struggles to move. The player is supposed to bounce as he walks also. I am wondering why you stretched the sprites, it would look a lot better if you didn't. You should probably use HG/SS for the graphics instead of outdated 2nd and 3rd generation ones. Also, why don't the textbox messages scroll?


1: Java's key listeners aren't that great
2: graphics
3: not me
4: Alright, I think after I learn how to display the tiles using a depth system
5: I am still working on that.

DaSpirit
September 11th, 2012, 10:19 AM
1: Java's key listeners aren't that great
2: graphics
3: not me
4: Alright, I think after I learn how to display the tiles using a depth system
5: I am still working on that.

Everything you described have solutions. I easily found a solution (http://answers.yahoo.com/question/index?qid=20080321182453AA534jT) to your key problem. I suggest you fix your graphics. It's a 1 minute fix. I don't know how you did not notice it. You did stretch the sprites, I'm looking at your graphics folder now. A depth system shouldn't be hard. It should be a 3 dimensional array that determines which tile to use and which depth (depth would be your z, and you only need 3, ground, middle and top).

Flameguru
September 11th, 2012, 11:15 AM
Everything you described have solutions. I easily found a solution (http://answers.yahoo.com/question/index?qid=20080321182453AA534jT) to your key problem. I suggest you fix your graphics. It's a 1 minute fix. I don't know how you did not notice it. You did stretch the sprites, I'm looking at your graphics folder now. A depth system shouldn't be hard. It should be a 3 dimensional array that determines which tile to use and which depth (depth would be your z, and you only need 3, ground, middle and top).

I'm not quite sure how you can have so many gripes about graphical elements so early on in the development of hansiec's engine.

As to this whole stretched graphics, what are you talking about? All tiles are 32x32 and the player sprite is 32x42 due to a 10 pixel overlap to give a sense of depth when the player is in front of a building, sign, npc, etc. I know that because I'm the one he got those graphics from (although indirectly). If he was using 3rd gen tiles they would still be 32x32. Suggesting to use HG/SS Tiles is not a good idea and will severely complicate things and it really doesn't matter what tiles he provides, anyone who uses the engine should use their own custom ones so that their game is actually taken seriously and isn't just something they whipped up in 10 minutes.

As for actual depth, I am sure he implemented layers of tiles (probably amount of 3 layers) and if he hasnt, he will. Your point about the player bouncing really only shows that you have no intent to help with whats actually important (ie: the game logic and implementation) and is once again just another graphical gripe.

hansiec, good luck with the engine. If you ever need help let me know. I haven't looked over your code at all yet (only bothered to compile it and run it ) but if I find some free time I'll give it a look and see how you're handling everything.

DaSpirit
September 11th, 2012, 05:09 PM
Okay, before I start, I want to say that I'm not trying to be rude, I'm only saying my thoughts. People always get angry at me lol

I'm not quite sure how you can have so many gripes about graphical elements so early on in the development of hansiec's engine.
You're right, it is VERY early in development. In my opinion, it's too early to be released. I've been working on a Pokemon engine for GameMaker 2 months now and I really don't think it's ready to be shown in public, but in terms of features, I have more than this one.


As to this whole stretched graphics, what are you talking about? All tiles are 32x32 and the player sprite is 32x42 due to a 10 pixel overlap to give a sense of depth when the player is in front of a building, sign, npc, etc. I know that because I'm the one he got those graphics from (although indirectly). If he was using 3rd gen tiles they would still be 32x32. Suggesting to use HG/SS Tiles is not a good idea and will severely complicate things and it really doesn't matter what tiles he provides, anyone who uses the engine should use their own custom ones so that their game is actually taken seriously and isn't just something they whipped up in 10 minutes.
The tiles are stretched from their original resolution, that's what I meant. I think it will look better (albeit small) if kept in the normal resolution. I don't think that using HG/SS tiles is a bad idea. It's a bad idea to use the BW tiles on the other hand, because there are none. The HG/SS tiles are 2D and you can make a tileset very quickly by making a script that will delete all tiles that there are multiple of in a map. Visual presentation is very important, you can't deny that. You can have the game with the best gameplay, but if the graphics are bad, then no one will take interest in it.


As for actual depth, I am sure he implemented layers of tiles (probably amount of 3 layers) and if he hasnt, he will. Your point about the player bouncing really only shows that you have no intent to help with whats actually important (ie: the game logic and implementation) and is once again just another graphical gripe.
Once he has made some sort of implementation or asks about one, I will try to help. Although my experience with OOP is mostly on the C++ side, the concepts are the same with Java.

One thing I'd like to suggest is to use a system such as Deoxygen. It really helps with other people who are trying to read your code. I didn't even know which file to start looking in.

Umbreon
September 12th, 2012, 09:58 AM
Everything you described have solutions. I easily found a solution (http://answers.yahoo.com/question/index?qid=20080321182453AA534jT) to your key problem. I suggest you fix your graphics. It's a 1 minute fix. I don't know how you did not notice it. You did stretch the sprites, I'm looking at your graphics folder now. A depth system shouldn't be hard. It should be a 3 dimensional array that determines which tile to use and which depth (depth would be your z, and you only need 3, ground, middle and top).

Alright the graphics are not mine it's from flame guru's engine I honestly don't feel like moving to C++ and thanks for the tip on the 3D array (I will start on this)

UnderMybrella
September 29th, 2012, 01:46 PM
Cool! I'm making my game in Java, but I've promised myself I would make the majority of my code myself, when possible.

However, this sounds great!

Also, in terms of compiling (I assume you are talking about saving), use a file class, but make sure to somehow encrypt the compiled stuff, or else it would be easy to modify the save file.

Umbreon
September 30th, 2012, 10:04 AM
Cool! I'm making my game in Java, but I've promised myself I would make the majority of my code myself, when possible.

However, this sounds great!

Also, in terms of compiling (I assume you are talking about saving), use a file class, but make sure to somehow encrypt the compiled stuff, or else it would be easy to modify the save file.


Yeah, making code yourself is much better than relying on other's code because it's easier for you as an individual to understand.

Also I do encrypt my saves. (I can improve the saving though)

I also need to update the first post to the newest data, I just felt too lazy to do so.

Dying Light
October 24th, 2012, 01:26 PM
Ya know what I just realized?

If this project were to be completed, implementing a Java game into a web page is easy. So you could thus make a fully web-capable Pokémon game that doesn't require a download.

In the instance of Minecraft, they allow browser-based gaming and allow someone to download the .exe, which the same could be done here. It's purely amazing!

Umbreon
October 25th, 2012, 06:38 AM
Ya know what I just realized?

If this project were to be completed, implementing a Java game into a web page is easy. So you could thus make a fully web-capable Pokémon game that doesn't require a download.

In the instance of Minecraft, they allow browser-based gaming and allow someone to download the .exe, which the same could be done here. It's purely amazing!

Thanks, I do work on this little by little, but not enough these days, but I do plan on completing this, maybe switching graphics displays to open GL for possible 3D support.

Dying Light
October 25th, 2012, 07:35 AM
Thanks, I do work on this little by little, but not enough these days, but I do plan on completing this, maybe switching graphics displays to open GL for possible 3D support.
I definitely support and encourage this project. I also think switching to OpenGL would be a very nice feature, as even Minecraft uses it. Good luck on this!

Umbreon
October 25th, 2012, 08:41 AM
I definitely support and encourage this project. I also think switching to OpenGL would be a very nice feature, as even Minecraft uses it. Good luck on this!

Alright, I've already done the switch to OpenGL, but I am re-writing my engine as of I didn't think the way this was originally written was most optimal at all.

Xavier_PokeNation
October 25th, 2012, 01:16 PM
Alright, I've already done the switch to OpenGL, but I am re-writing my engine as of I didn't think the way this was originally written was most optimal at all.

When you switched to opengl, didn't it start using more CPU?

DaSpirit
October 25th, 2012, 04:29 PM
When you switched to opengl, didn't it start using more CPU?
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.

Dying Light
October 25th, 2012, 06:58 PM
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.

Xavier_PokeNation
October 26th, 2012, 03:03 AM
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. :P 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.

Umbreon
October 26th, 2012, 06:31 AM
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.

Umbreon
October 28th, 2012, 10:10 AM
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:
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.)

DaSpirit
October 28th, 2012, 11:07 AM
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?


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.

Umbreon
October 28th, 2012, 11:18 AM
Wait, so the FPS is not capped? Wouldn't you be wasting CPU cycles then?
True, I'll cap the FPS around 100 FPS


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.

NuclearWizard
November 14th, 2012, 12:07 PM
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.

Umbreon
November 14th, 2012, 05:04 PM
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.

DaSpirit
November 14th, 2012, 05:06 PM
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.

Umbreon
November 14th, 2012, 05:47 PM
Not really a long time if you are patient like me.

NuclearWizard
November 14th, 2012, 06:35 PM
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?

Umbreon
November 14th, 2012, 06:46 PM
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.

Umbreon
November 23rd, 2012, 08:13 PM
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.

Xavier_PokeNation
November 24th, 2012, 04:07 PM
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

Umbreon
November 24th, 2012, 05:11 PM
Alright then here's a preview:


66603

DaSpirit
November 24th, 2012, 06:13 PM
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 (http://www.tylerburton.ca/2010/08/make-java-guis-less-ugly-or-how-i-learned-to-love-swt/).

Umbreon
November 24th, 2012, 06:46 PM
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 (http://www.tylerburton.ca/2010/08/make-java-guis-less-ugly-or-how-i-learned-to-love-swt/).

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).

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.

delta38
December 14th, 2012, 04:31 PM
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

Ayutac
January 9th, 2013, 01:44 AM
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...