|
Post by FMY on Jan 6, 2007 22:43:32 GMT
Alright, stupid title. All I wanted to say is that I know enough java to start porting what we have to Java and to ameliorate that. I'm also going to try to make some more time for PT, and I'sm starting right now. Who knows, maybe we'll see the first Java Build somewhere this week! (Or month, we'll see). Oh, yeah, here's how we're going to parse the XML: java.sun.com/webservices/jaxp/index.jsp
|
|
|
Post by BonzaiRob on Jan 6, 2007 23:06:43 GMT
Yes! Yes! Hahaha yaaay! We'll start going places now! (Plus I can focus less on brain-hurty Java and carry on with mapping XML duties). EDIT: Just remembered something you need to take into account while porting - unless you want to amke a horribly complicated pseudo-camera system, it's not the player that moves, but everything else. That's why he stays in the middle. I have a feeling that for cutscenes where the camera moves, Nintendo would make a static version of the player, turn the real player invisible, and then move everything up or sideways like the player themselves. Same, kind of, for when you use the Pokémon centre escalator - the real player turns invisible and a static version is used instead. NPC People would move around on the map but still be moved by it when the player 'moves'. Good luck!
|
|
|
Post by FMY on Jan 7, 2007 1:19:07 GMT
I know the map normally moves, but it's really not much work to change a moving character into a moving map with a character that stands still. You just need to move the character 1 place, and move the screen 1 place in the other direction. That way, the character stays in the middle of the screen.
I really nee to speak to antarc however, because I get an error I cant explain:
package src;
import javax.swing.*; import java.awt.*;
public class GameCanvas extends JPanel{ public Graphics image; public GameCanvas(){ //this.setBackground(Color.black); this.image = this.getGraphics(); Toolkit toolkit = Toolkit.getDefaultToolkit(); Image background = toolkit.getImage( "data/images/background.png" ); this.image.drawImage(background, 0, 0, this); //this is the line with the error this.setVisible(true); } public static void main(String[] args) { new GameCanvas(); }
}
For seom reason, I get this error:
Exception in thread "main" java.lang.NullPointerException at src.GameCanvas.<init>(GameCanvas.java:17) at src.GameCanvas.main(GameCanvas.java:22)
Has anyone got an idea why?
|
|
|
Post by BonzaiRob on Jan 7, 2007 18:49:53 GMT
I've emailed Antar, hopefully he'll know. If not, I'm sure he knows someone who does
|
|
|
Post by FMY on Jan 7, 2007 21:56:27 GMT
It doesn't really matter anymore anyways. I didn't solve the problem, but I can't reproduce it either. Also, found this Java Game engine: goldenstudios.or.id/products/GTGE/index.php, which suits our needs much more than Swing alone does. I'll be using it.
|
|
|
Post by BonzaiRob on Jan 8, 2007 15:02:53 GMT
I'm looking forward to seeing what we can do with this engine The time-based animation is interesting, makes things easier though. Just a thought, do we have a TTF of the FRLG font? I know PF only has the RSE one.
|
|
|
Post by FMY on Jan 8, 2007 17:16:12 GMT
Oh, is it different in FR/LG? I don't think I've ever seen the new font in that case.
|
|
|
Post by BonzaiRob on Jan 8, 2007 20:43:10 GMT
Yeah, it's slightly more squat, and overall it looks slightly smaller. But, good news, it doesn't really matter, because GTGE supports bitmap fonts - fonts made of bitmaps
|
|
|
Post by FMY on Jan 8, 2007 22:11:47 GMT
Allright, I haven't checked that yet, but I guess you're right. There won't be any problem in that case.
|
|
|
Post by BonzaiRob on Jan 15, 2007 22:32:32 GMT
Got the FRLG font working, took a while to work out but I've got it now. Oh yeah, got PT working in Eclipse too. I'll carry on working on little things like this.
|
|
|
Post by FMY on Jan 15, 2007 23:12:09 GMT
Awesome. I'm still busy with the mapparser, but that doesn't mean I'm not makig progress. The most important part of it is done.
|
|
|
Post by BonzaiRob on Jan 16, 2007 19:51:22 GMT
I've got some bad news: the FRLG font isn't fixed-width, which means we can't use it.. I'll try making a fixed-width version, but it'll look strange...
EDIT: Ok, it doesn't look as bad as I thought. False alarm.
|
|
|
Post by BonzaiRob on Jan 18, 2007 20:20:41 GMT
|
|
|
Post by FMY on Jan 19, 2007 15:57:03 GMT
Nice work again, it works perfectly!
After having seen it however, the font seems (to me) a little too small for a computerscreen. Do you think we could make a bigger version?
|
|