JVerge
Displaying 1-12 of 12 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
rafael_esper

I'm a experienced Java programmer, even though I started my game experience with Verge long time ago. In one of my last projects, I've implemented the load/save .map and .vsp in Java.

So, I was wondering, is there a room for a JVerge implementation (Java + Verge)? I see the following benefits:

- Multi-plataform;
- I could run and debug Verge code in some advanced IDE like Eclipse or Netbeans;
- Could be implemented as an API, and could atract the attention of the (huge) Java community;
- I know there are already 2d game engines for Java, like Pulp, Easyway (based on LWJGL), Slick, and others. But I'm already used to Verge, its files, etc.

What do you think?

Posted on 2011-11-11 04:10:09

mcgrue

You should talk to aen.

Posted on 2011-11-11 07:25:21

aen

[23:27:12] <@aen> all verge love is good love
[23:27:20] <@aen> verge welcomes you and your coffee bean overlords

Posted on 2011-11-11 07:39:12

rafael_esper

- Playing .MOD, .S3M and .XM is working in Java.

- .MP3 also working (JLayer library).

- And also .VGM files! (see Art and Music Discussion forum).

- I'm able to plot .MAP files in the screen. No animations yet.

I'm not sure on what will be the next step, but one of the last steps will be the VC parser and Lua parser. I'd rather make a converter than implement all parsing stuff. The converter would do things like... making all code lowerstring, except for texts inside strings, and so on.

Posted on 2011-12-05 21:31:14

mcgrue

Awesome!

Is this on github?

Posted on 2011-12-05 23:02:31

rafael_esper

This is a good idea. I'll manage to put my source code there as soon as possible. Just work on some tweaks before.

Posted on 2011-12-06 15:39:45

rafael_esper

Ok, some news:

- Not in Gith yet! (I'm going to make it soon)
- Playing .MOD, .S3M, .XM, .MP3, .WAV, .VGM, .VGZ and some others formats;
- Reading and saving .map, .vsp, .chr (version 2, 4 and 5)
- Map rendering, controls, player, entities, animations, showpage... the main engine is all here.
- Loading Config file.

Needs to be done:
- Function calls (this is a fundamental step)
- VC lib Drawing functions (this is going to be easy)
- Fonts
- VC Parser and/or Lua Parser (probably won't be done)
- Make it more OO
- Full screen is very slow, I need to adapt it to the graphic JGame implementation I'm using. 320x240 works fine, through.
- Add logging capabilities

Any suggestion is much appreciated.

Regards,
Rafael, the Esper

Posted on 2012-01-22 15:44:31 (last edited on 2012-01-22 15:52:15)

mcgrue

giiiiiithub? :D

Posted on 2012-01-23 20:11:55

rafael_esper

Ok, I really have the guts to come back here without placing my JVerge code in Github, but I have a reason (not a good one):

I'm finishing the engine code and converting Sully to this new engine. Since my last reply I've spent +50 hours working with it, and now I have:

- Function calls, hooks and all this stuff;
- VC lib Drawing functions (almost all of them: blit, tblit, setlucent, setpixel, grabregion, circle, rect, fill*, triangle, silhouette etc);
- Fonts (Java cross-platform fonts and a VFont object corresponding to Verge fonts);
- Fast full screen (had to deal with double buffering and Volatile images).

NEEDS TO BE DONE:
- Github (Ok, next post I promise the code is going to be there)
- Investigate some screen flickering when using colorfilter (like putting the screen to grayscale)
- Test unused functions so far, and develop test functions
- Add proper logging capabilities
- Finish Sully conversion
- Document code and include LICENSE and CREDITS

I would also like to make it more OO, because in order to have a code like:

	static void DrawBox(int a, int b, int c, int d) {
		setlucent(15);
		rectfill(a+4,b+4,c+a,d+b, new Color(30,30,150), screen);
		rect(a+3,b+3,c+a-3,d+b-3,new Color(60,60,60), screen);
		rect(a+2,b+2,c+a-2,d+b-2,new Color(90,90,90), screen);
		rect(a+1,b+1,c+a-1,d+b-1,new Color(90,90,90), screen);
		rect(a,b,c+a,d+b,new Color(60,60,60), screen);
		setlucent(0);
	}


The rect, rectfill, setlucent and screen need to be Public and Static in Java. So there are a lot of those methods.

Mcgrue, when I release the code in Github, I would also like to release some screenshots, as I currently have 2 working demos and soon Sully will work too. Can I host them here?

Thanks, and I'd really appreciate any suggestion, questions or comments.

Rafael, the Esper.

Posted on 2012-03-10 19:57:08

mcgrue

Oh, man. Of course you can host them here. Let's go front page with this shiznits :D

Posted on 2012-03-11 05:04:47

rafael_esper

JVERGE: what is it?

JVerge is an attempt to bring all the Verge engine into Java. All the C-dependent code was removed and changed by a Java counterpart.

That means: all video/sound/music/keyboard/mouse code. The VC library code was adapted as needed (rect/circle/triangle/blit/etc), and some functions weren't implemented, specially the File, Socket, Movie playback and Window functions.

JVerge has some new features: wrapable maps, as described in another topic, and the ability to play VGM/VGZ files (from Sega Master System, Genesis and other consoles).

JVerge does NOT parse VC or LUA scripts. It's more like a Java API, so you write code in Java and use JVerge functionality.
Java is multiplataform, so I hope JVerge runs ok in any Windows, Mac, Linux and other systems with a Java Virtual Machine (JVM). In the future, maybe it could be possible to adapt it to Android and other similar platforms.

I have implemented three demos to show JVerge working:

- Phantasy Star remake: I've converted just a small portion of my original Verge PS remake, because I plan to come back later and actually finish this project. It's a common FF/PS-like game, with a top view and 2D chars walking in the map. It's using a 480x320 resolution, same as Ipad, I think.

- Alex Kidd: It's here to show that Verge is not just about RPGs. Alex Kidd was a popular 2D platform game in Sega Master System. I've added my own levels and plan to extend it later.

- Sully Chronicles: Well, converting Sully was very useful to fix a lot of errors, misconceptions and buggy code in my JVerge engine conversion. Now the engine is way more stable. But I've performed a direct conversion - that was faster than rewriting the Sully code to the Java paradigm.

I've packed them in .JAR executable jars (just run java -jar X.jar). It's also possible and recommended to developers to use an IDE like Eclipse or Netbeans, place the project there and see the source code running smoothly, understand it better, etc.
They are also separate projects/GIT repositories. For developers: Ak, Ps and Sully are dependent of JVerge. If you just want to experiment the demos, there are a 'redist' folder in each project with an executable JAR.

https://github.com/rafael-esper/JVerge
https://github.com/rafael-esper/Ak
https://github.com/rafael-esper/Sully
https://github.com/rafael-esper/PS

There are some screenshots in JVerge 'screenshots' folder.

Some important notes
- F5 for sound off/on
- F6 for full screen
- F7/F8 to increase/decrease frame delay.
- You can write your custom verge.cfg and place it in the same folder of the .jar file
- If it is running very slowly, try to run via "java -jar X.jar" or install a new version of Java and associate it with .jar files. Windows comes with a very outdate version o Java.

JVERGE: The Future

In a next release, I plan to change the JVerge code into something more OO, like placing the methods inside the domain classes, e.g., printstring inside VFont, rect/circle/blit/etc inside VImage, playmusic inside VMusic, and so on.

There are some unimplemented functions, possible bugs, and interesting things to do.

If someone is interested in the project, I'd be happy to help extending JVerge to whatever we can think of. I'm eager to receive some feedback, suggestions, etc.

NOTES ON SULLY CONVERSION

My initial goal was to show that the main tech demo would work properly with the Java engine, but now it is an example of a mindless bad programming practice: lots of static and public methods and properties, lots of static imports, and a general disoriented object programming.

- Some variables were converted to boolean. In Java you can't do: "while(count)", if count is an int. Need to change to "while(count !=0)"
- Add "break" clause after each "case" in the "switch" clause (unlike VC).
- A lot of methods and properties were changed to static. This is so anti-OO. :-(
- There is no script code being interpreted, it's just Java code. So the map() function can't just stop the remaining code to run.
- In order to implement the Sully introduction (that can be escaped anytime with Esc), I've opted to create a Java thread and use the ugly and deprecated method stop. I could have done this in a more elegant way, but the code would be changed a lot more.
- Java imports are different from C includes. So in order to call a function of an outer file, that would be normally included in C, I had to add a "path" parameter to the callfunction method.
- Unlike VC, Java is case-sensitive. A lot of calls were changed because of this.
- As SetClip is not yet implemented, I've changed a little the textbox behavior to produce the same effects.
- The "|" text delimiter was changed to "&", because "|" has another meaning to regex String function. Needed to change this in all Menus and Shops.
- I've performed some changes in the simpletype_rpg package, creating the structs (in Java, classes) in the corresponding classes. Not enough to be really OO, though.
- Reimplemented the data_load with Java File API. Not very hard to convert (just text files). But the token separator was changed to a tab ("\t"), and just ONE tab in the .dat files.
- Data_load strcmp was different from expected, so changed !strcmp to strcmp and vice-versa
- The item "Cap" is just three letters long, so was interpreted as junk, because of MIN_LINE_LENGTH. Changed to LongCap.
- I've changed some MenuOff() and MenuOn() calls to EntStart() and EntFinish(), because somehow, the player wasn't stopped in the dramatic scenes, shops, etc.
- There were some bugs in the original code, like accessing a -1 index in an array in the AddPlayerI() function. Those bugs become evident in the Java code, as it's now allowed.
- There were some strange TextBox without the comma (like TextBox(PORTRAIT, "a" "b", "c"); How these were working?!
- Load/Saving works fine outside the executable Jars (like in Eclipse or just running java directly). But when packing the code in a .JAR, I wasn't able to deal with saving files externally to the JAR, but loading files works fine. I'm thinking about a solution to this problem.
- I had a lot of problems with case-sensitive stuff (because JAR files are case-sensitive).
- There were some unused variables.
- I see that there is another version of Sully somewhere, judging by screenshots. Is the code available?

Posted on 2012-04-28 15:13:49 (last edited on 2012-04-29 18:40:45)

mcgrue

The 2005 version of Sully (Which I put about 5 months into) was a victim of v3's lack of debugging tools, and was (and is) ridiculously unstable.

I've actually just been working on recoding it in XNA to release on Xbox with Gayo, Hahn and Kildorf. It's being heavily altered (a buttload of new art and music), and the "original flavor" Sully will remain in the public domain, though.

Posted on 2012-04-29 20:20:28


Displaying 1-12 of 12 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.