JGE++ 1.0: Hardware accelerated 2D game SDK for PSP

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dr_watson
Posts: 42
Joined: Mon Nov 28, 2005 11:30 am

JGE++ 1.0: Hardware accelerated 2D game SDK for PSP

Post by dr_watson »

Introduction

JGE++ (Jas Game Engine++) is a hardware accelerated 2D game SDK for PSP. It supports cross-platform development under MS Windows. The entire game development process, including coding, debugging and testing, can be done in Windows. (However, it's still recommended to test your game on PSP from time to time to make sure everything is fine.)

You can use JGE++ to make Windows games but the primary platform is PSP.


Features
  • 1.xx and 3.xx firmware support on PSP.
  • Hardware accelerated 2D rendering including scaling, rotations and colour blending.
  • Animated sprites.
  • Geometry shapes rendering, including rectangle, circle, polygons and thick lines.
  • Loading PNG, JPEG and GIF.
  • Spline.
  • Advanced multiple emitter and key frame based particle system.
  • Bitmap fonts.
  • Chinese GBK fonts.
  • True Type fonts.
  • Stereo WAV playback.
  • Hardware MP3 decoding on PSP.
  • Resource manager.
  • Zipped resource support.
  • Frame based animation system using XML scripts.
  • Basic 3D functions, including support of rendering textured triangles, Quake 2 (MD2) model and OBJ model.
  • Port of HGE helper classes: hgeParticleSystem, hgeDistortionMesh and hgeFont.
  • Input system for English and Chinese.


Tutorials
  • 01.HelloWorld
  • 02.RenderingImages
  • 03.ResourceManager
  • 04.Splines
  • 05.Shapes
  • 06.TrueTypeFont
  • 07.DisplayingChinese
  • 08.Animator
  • 09.3DPrimer
  • 10.HGEDistortionMesh
  • 11.HGEParticles
  • 12.InputSystem


Project page

http://jge.googlecode.com/


Official forums

http://jge.khors.com/


License

JGE++ is Licensed under the BSD license, see LICENSE in root folder for details.



The JGE++ Team
  • James Hui (a.k.a. Dr.Watson)
  • Duan Sijiu (a.k.a. Chi80)


Special thanks to:
  • Cheese (WAV playback code)
  • Cooleyes (MP3 hardware decoder)
  • Fan990099
  • Firenonsuch
  • Newcreat
  • Raphael (VRAM manager)
  • Subelf
  • Youmentang
  • Jasmine (James' lovely wife)

Image

Download]

JGE++ 1.0

(You can also download it from the project's home page on googlecode.)
willow :--)
Posts: 107
Joined: Sat Jan 13, 2007 11:50 am

Post by willow :--) »

I don't know how many applications still use JGE++ out there, but here are a few links to some bug fixes/discussions on the JGE forum.
This is a nice lib, it needs more love !

small bug in JGui.h
JGfx.cpp DrawRoundRect fix
IsPlaying() function is bugged?
Possible Bug (Memory leak ?) in JPEG Tex Loading functions
willow :--)
Posts: 107
Joined: Sat Jan 13, 2007 11:50 am

Post by willow :--) »

With (lots of) help from a friend, I've been working on this lib and updated it.

The modified version can be found on Wagic's svn, info at :
http://code.google.com/p/wagic/

I still recommend that you Download Dr.Watson's version first, if only for the tutorials that ship with it.

The current SVN version has the following changes, compared to Dr Watson's latest version:
- (Linux) The Game can now be compiled for Linux (That's right, JGE is probably the only lib in the world that allows you to create a game for Linux, Windows and the PSP from the same source code)
- (PSP) Fixed a memory leak with jpg loading
- (PSP) Updated mp3 playback with the new method from Raphael (http://forums.ps2dev.org/viewtopic.php?t=10798). This fixes some random crashes when mp3 are being played.
- (PSP) Small fixes in graphical display
- (Windows) can now change the screen size (simple scaling stuff, but still nice, allows for some windowed full screen)

Chinese input is probably completely broken though, sorry for that :/

This is merely a tool for me, so please don't expect the kind of support you would have got from Dr.Watson, but feel free to use it.
This is still work in progress, DrWatson's version is way easier to use and compile, so if you don't have any issues with DrWatson's release, don't bother using this one !
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

Many thanks.
Btw I read from the svn:
- Fixed MP3 play bug on the psp. MP3 files need to have NO Id3v2 tag, or they won't play. Also, volume control is broken
To fix the id3v2 tag problem you can just seek past the tag (I don't use the new mp3 playback code but maybe you just have to set the mp3Init.mp3StreamStart).
This function works fine to calculate the tag dimension:

Code: Select all

int GetID3TagSize(char *fname)
{
    SceUID fd;
    char header[10];
    int size = 0;
    fd = sceIoOpen(fname, PSP_O_RDONLY, 0777);
    if &#40;fd < 0&#41;
        return 0;

    sceIoRead&#40;fd, header, sizeof&#40;header&#41;&#41;;
    sceIoClose&#40;fd&#41;;

    if &#40;!strncmp&#40;&#40;char*&#41;header, "ea3", 3&#41; || !strncmp&#40;&#40;char*&#41;header, "EA3", 3&#41;
      ||!strncmp&#40;&#40;char*&#41;header, "ID3", 3&#41;&#41;
    &#123;
        //get the real size from the syncsafe int
        size = header&#91;6&#93;;
        size = &#40;size<<7&#41; | header&#91;7&#93;;
        size = &#40;size<<7&#41; | header&#91;8&#93;;
        size = &#40;size<<7&#41; | header&#91;9&#93;;

        size += 10;

        if &#40;header&#91;5&#93; & 0x10&#41; //has footer
            size += 10;
         return size;
    &#125;
    return 0;
&#125;
Ciaooo
Sakya
willow :--)
Posts: 107
Joined: Sat Jan 13, 2007 11:50 am

Post by willow :--) »

Ah, thanks, I'll definitely use that !
willow :--)
Posts: 107
Joined: Sat Jan 13, 2007 11:50 am

Post by willow :--) »

I saw that the JGE++ forums are closed. I don't know how many applications out there use it, but I now highly recommend to use the version from Wagic's svn, as it is maintained (which is not the case of the original one).

We've fixed lots of bugs from the original code.

However I'm still having a bad issue right now: The screen randomly displays crap:
To me it seems that the screen expects a 5551 framebuffer but actually gets a 8888 one. Am I right? If not, what would explain such a behavior?
Image
Most of the time the display works correctly, but from time to time an update to the code will show that kind of screen. So I'm thinking of an uninitialized variable, but knowing what can cause this behavior would help me to track the bug down (the bug never reproduced with PSPLink, that would be too easy...)
yeshua
Posts: 20
Joined: Mon Nov 30, 2009 10:54 am

Post by yeshua »

Anyone have any idea how to fix the above problem this? Any info at all would be greatly appreciated.
Post Reply