New Port of PopCap Framework to Kanji

Discussion in 'Announcements' started by jpoag, May 29, 2010.

  1. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0
    Greetings!

    The generous programmers at PopCap released their internal engine in 2005 as open source to the community. Well, it's 2010 and it's no longer practical for PopCap to continue the support of the community that grew up around it's framework. Also, after five years, the technology that Sexy was built on is starting to show it's age.

    So, a group of the guys at the unofficial PopCap forums decided to join together and upgrade the framework, bringing it up to DX9 on Windows and adding Mac, iPhone and iPad support. Around the same time Emmanuel Marty of Azada frame dropped the Kanji framework on our laps as a prerelease.

    Four months later, SexyKanji 2.0 Beta is ready to be released into the wild.

    What is SexyKanji?
    SexyKanji is a port of the PopCap Application Framework (codenamed: Sexy) over the Kanji game engine. The framework is designed to facilitate rapid development of high-quality games by allowing game programmers to concentrate their efforts on expressing game concepts while minimizing the work required to create a rich visual and audio presentation. The predecessors of this framework (1.33 and below) have been used for most of PopCap’s Deluxe games, which account for over 100 million framework-derived game units downloaded.

    It is a C++ toolkit for creating games on the Windows, Mac OS X, iPhone and iPad platforms.

    What is Kanji?
    Kanji is a 2D (with 3d capabilities) multiplatform game engine API. It was written using the Phelios game library as a base but expanded to include newer technologies. Kanji is the result of years of bug fixes and feature extensions written by Emmanuel Marty. To purchase a license for Kanji, please visit KanjiEngine.com or contact Emmanuel directly.

    Kanji is the engine that Azada3 uses and has roots in Azada2, Azada, Mystic Inn, Atlantis Sky Patrol (PC, Mac and iPhone), etc..

    Why SexyKanji?

    Kanji is a spectacular C++, multiplatform engine. Sexy provides tools and constructs that facilitate faster game development. Sexy provides complementary services to Kanji:

    • A Widget hierarchy, for displaying buttons, edit boxes, list boxes, check boxes, etc...
    • A solid main application game loop with Update services running at 100hz (guaranteed) and a variable Update loop running at the monitor refresh rate.
    • Resource Management.
    • Easy Multithreaded asset loading.
    • XML Reading/Writing.
    • Unicode character support.
    • and much, much more!
    SexyKanji is based on the framework that runs most all of PopCap's deluxe games that has millions and millions of satisfied customers! If you know how to program with Sexy, then you know how to program with SexyKanji!

    Best of all, it's a free add-on to Kanji!

    Update: Sexy Kanji Revision 364 now includes the Kanji Win32 Demo libs and headers so you can test drive SexyKanji before buying Kanji!

    > Mac and PC Demos, Screen shots, Wiki and Forums<
     
    #1 jpoag, May 29, 2010
    Last edited: Jul 9, 2010
  2. tolik

    Original Member

    Joined:
    Sep 20, 2004
    Messages:
    1,407
    Likes Received:
    0
    I've got some PopCap Framework games abandoned and unreleased from the past life. Can I easily get them out on iPad, how fast would the porting to Kanji work?
     
  3. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    Nice, now you only need to add python support and I could even use it :D
     
  4. Dominique Biesmans

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    101
    Likes Received:
    0
    You mean, something like PyCap?
     
  5. barrygamer

    Original Member

    Joined:
    Apr 10, 2006
    Messages:
    490
    Likes Received:
    0
    Ooh, interesting!

    I hadnt been following what happened to the popcap framework, except I heard they were not officially supporting it now (but I see its on sourceforge).

    By phelios do you mean PTK? Anyway, from what I can see this resembles very closely the popcap framework I used before, which was a very nice bit of code. Good to see Hungarr back too.

    What state is the iphone part in?
    What do you mean by it being an 'add-on' to Kanji?

    I use cocos2d, which is well proven on iphone, but god I hate obj-c...

    Sky Patrol was indeed super-slick on iphone.
     
  6. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    Yep I know about that one... you mean that works seamlessly with the new sexykanji? very interesting :)
     
  7. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0
    I have an article to write on porting Sexy Apps to SexyKanji. Most of what is involved is changing the names of some of the types... For instance, 'Rect' has a hard time compiling on the Mac without being fully namespace-qualified (Sexy::Rect).

    To avoid these compilation problems (Point, Rect, etc.. etc...) We've changed the names to 'SexyPoint', 'SexyRect', 'SexyImage', etc.. This is a super easy task if you use Whole Tomato Visual Assist X and a special file I have to 'rename' the types.

    The second obstacle is the Strings situation. By default, we're using Unicode strings. More than likely, you'll find that your program needs a lot if (_S()) and (StringToSexyStringFast()) Macros. You can turn off Unicode support, but why?

    There are other considerations, like we've removed all the image loading and manipulation routines out of SexyAppBase and pushed them into their own class, most modifications can be solved using Visual Assist X (which has a 30 day trial).
     
  8. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0
    Yes!

    PTK is the original framework. Emmanuel was kind enough to send me a modified version of PTK a long time ago (after I bought a PTK license) that was used in Azada2. I used this version to port Sexy 1.33 applications (I think only 3 applications have been ported this route).

    I sat down to start writing Sexy from scratch and Emmanuel surprised me with Kanji. I was instantly sold on the product.

    Let me say this: Kanji is worth it's weight in gold all by itself. I was surprised at how cheaply it was being licensed.

    iPhone
    As for the iPhone, I haven't created the projects or worked on any iPhone code. When I worked on the Mac portion of the code, there was very little effort needed to get Kanji Windows code running on XCode/Mac. I'm assuming that the iPhone code will be even easier.

    Kanji runs on all platforms and I use as much Kanji as possible.

    Obj-C/ Cacao
    Kanji is c/c++. It handles the very little obj-c you need to get the app running. You code in c++, not obj-c. Kanji even allows you to use iPhone systems, like the iPod.

    Interestly, before Kanji, I wanted to use cocos2d to write the iPhone portion.
     
  9. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0

    Not yet. There's no reason why Pycap shouldn't work with SexyKanji, but I'm not the Guy that made PyCap (was it farbs?).

    I've always wanted to learn Python, and I might be learning it soon anyways for another project.

    Not sure what the legal implications are for running Python on the iPhone/iPad 4.0 OS. I would think that it would be ok (as embedded in a game).
     
    #9 jpoag, May 30, 2010
    Last edited: May 30, 2010
  10. Bmc

    Bmc New Member

    Joined:
    Dec 12, 2004
    Messages:
    1,088
    Likes Received:
    2
    For iPhone there are some issues with SexyVideo class, as well as K_WNDHANDLE not being defined in the iPhone version of Kanji. Also a few issues where sprintf is used instead of K_sprintf haven't come across any other problems yet though. For the most part if a function isn't possible on the iPhone (like setFixedAspectRatio) it's just a no-op.
     
  11. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0
    Hey, thanks for testing it out!

    When I first started, I hadn't realized that Kanji had all the K_sprintf/ K_MAX/ etc.. macros.

    I'm expecting some KVideo upgrades to come down the line. I still haven't figured out the sound support yet.

    This is great feedback. Thanks again.
     
    #11 jpoag, May 30, 2010
    Last edited: May 30, 2010
  12. wazoo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    519
    Likes Received:
    0
    Major awesome...I'll test it out for sure.

    lol @ "There is no Readme_third."
     
  13. Farbs

    Farbs New Member

    Joined:
    Nov 15, 2006
    Messages:
    36
    Likes Received:
    0
    Hihi.

    From how I read it there'd be a little work in porting PyCap to SexyKanji, but not much. PyCap is really just a tiny PopCap framework game that calls through to python instead of executing any game code itself.

    I believe some people have run python on iPhone already, but I'm pretty sure the legal wording Apple use to stop people making marketplace style apps (and to kick Adobe in the face) also precludes you from using any game code written in python. I'm pretty sure this isn't the intention of the clause, and I hear rumours of interpreted games slipping through review unnoticed or ignored, but I'm not willing to run that particular gauntlet myself.
     
  14. Bmc

    Bmc New Member

    Joined:
    Dec 12, 2004
    Messages:
    1,088
    Likes Received:
    2
    Just as an update to this thread I was able to get Demo1 working on the iPhone

    I had to remove anything referencing the Movie classes, anything involving the current clipboard code and of course add iphone event handling to the WidgetManager

    I am getting many warnings though similar to the following.

    ld: warning: typeinfo for KTextFacehas different visibility (default) in /Users/bcondran/Documents/Kanji/kanji_iphone/lib/libkanji_iphone.a(KText.o) and (hidden) in /Users/bcondran/Documents/Kanji/kanji_iphone/example_iphone copy/build/example_iphone.build/Debug-iphoneos/example_iphone.build/Objects-normal/armv6/SexyFont.o
     
  15. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0
    Hey, this is great work!

    I need to figure out why SexyVideo isn't working on iPhone. The only demo that uses movies is Demo 2, but the resource manager now loads movies (and music).

    What kind of errors are you getting?
     
  16. Bmc

    Bmc New Member

    Joined:
    Dec 12, 2004
    Messages:
    1,088
    Likes Received:
    2
    The original error is that KVideo.h is not found. So KVideo is never defined.

    I'm looking at the version I have (2010/04/07), I don't believe there is a version of KVideo for Kanji iPhone. I'll dump it in (from Mac version) just to see what happens.

    The other errors were all basically related to anything that uses K_WNDHANDLE (I Think just the Clipboard methods) as well as the forceWindowed method of KWindow.
     
  17. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0
    Well, KVideo is basically a wrapper for Ogg Theora Videos (no other formats are supported yet).

    Ogg Theora isn't the fastest codec to decode, and the iphone/iPad has a hardware decoder for h.264. I wouldn't be surprised if KVideo wasn't supported.

    However, I think at one time the kanji packages were incomplete (missing headers). Emmanuel uses scripts to build the distribution packages. (lol, then again, so do I).

    In any event, I think some preprocessor directives would probably fix these issues (by dropping Ogg Video Support).

    I really appreciate the help.
     
  18. jpoag

    jpoag New Member

    Joined:
    Mar 15, 2008
    Messages:
    806
    Likes Received:
    0
    Updates!

    Kanjiengine.com has gone live. Now you can test drive Kanji with the Win32 demo or purchase a Commercial or Non-Commercial license!

    Revision 364 of Sexy Kanji now includes the Win32 Kanji demo libs and headers. Now you can test drive Sexy Kanji and build demo apps right out of the box!
     
  19. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    I want python support or I'm not buying ;)
     
  20. Musenik

    Original Member

    Joined:
    Dec 5, 2004
    Messages:
    796
    Likes Received:
    0
    "It's not dead. It's just pining for the fields"

    I'm pining for them fields, myself.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer