본문 바로가기
Game Development Tool 게임 제작툴

[Java 기반][Java 1.3 Version 자바 1.3버전][Blu-ray Disc Java (BD-J)] "PlayStation 및 Xbox 게임 콘솔을 위한 소규모 홈브류 2D 게임 개발" BD-J (Blu-ray Disc Java) 블루레이 디스크 자바

by byungwoo733 2024. 1. 2.
728x90
반응형
SMALL

몇 년전부터  BD-J (Blu-ray Disc Java)에 대해서 계속 알아보고 정리하고 있습니다.

BD-J (Blu-ray Disc Java)를 먼저 설명하자면 한국어 자료가 없다보니 번역기에 힘을 빌려서 하도록 하겠습니다.

[위키백과] 블루레이 디스크 내용 중에 "BD-J (Blu-ray Disc Java) "

JavaOne 2005에서 썬 마이크로시스템즈의 자바 환경이 블루레이 디스크 플레이어 표준의 필수 요소 중에 하나가 될 것이라고 발표했다. 자바는 블루레이 디스크의 대화식 메뉴 구현에 사용되고 있으며, MPEG를 미리 랜더링하거나 선택 가능한 하위 메뉴 등에서 사용된다. 그리고 자바의 창시자인 제임스 고슬링은 JVM(Java Virtual Machine) 탑재, 네트워크 연결 등을 제안했다.

블루레이 디스크에서 사용되는 자바는 BD-J (Blu-ray Disc Java)라고 이름을 붙였고, BD-J (Blu-ray Disc Java)는 GEM(Globally Executable MHP)의 내부 항목이다. BD-J는 블루레이 협회에서 개발했다. 하지만 BD-J (Blu-ray Disc Java) 가 개발되기 전에 나온 플레이어는 BD-J (Blu-ray Disc Java) 를 지원하지 않는다.(단, 플레이스테이션3는 펌웨어를 업그레이드하여 블루레이 디스크 프로파일 1.1을 추가했고 CES 2008에서 BD-Live를 시연했다.) 내장 메모리로 저장, PIP(Picture in Picture), 인터넷 접속 같은 고급 기능을 지원한다. 이런 기능들을 "Bonus View"라고 부르고, 인터넷 접속은 "BD Live"라고 한다. 2007년 10월 31일부터 새로 나오는 모든 블루레이 디스크 플레이어들은 모두 "Bonus View"를 지원하는 하드웨어를 장착해야한다. 하지만 추가적인 펌웨어 업그레이드를 하여 기능이 동작하도록 할 수도 있다. "BD-Live"는 선택 사항이다.

BD-J (Blu-ray Disc Java) 에서는 Xlet과 JMF를 사용할 수 있다.

BD-J (Blu-ray Disc Java)

(번역기를 빌려)

간단히 말해서, Blu-Play는 게임 개발자의 홈브류 커뮤니티에서 "PlayStation 및 Xbox 게임 콘솔을 위한 소규모 홈브류 게임"을 분류하기 위해 사용하는 용어로, 동일한 게임을 동일한 장치에서 실행할 수 있도록 하는 기술을 사용합니다. 해킹이나 모딩을 전혀 하지 않고 이러한 콘솔의 모든 변형에 디스크를 사용할 수 있습니다. 대형 게임 회사에서 출시한 거대하고 값비싼 주류 본격적인 3D 게임과 달리 Blu-Play 게임은 항상 개인이나 열정적인 애호가 그룹이 개발한 훨씬 작고 아늑한 2D 게임입니다. Blu-Play 게임은 대부분 완전 무료로 다운로드하고 플레이할 수 있지만 게임에 대해 공정한 가격을 요구하는 개발자도 있을 수 있습니다. Blu-Play 게임을 만드는 데 사용되는 기술은 2003년부터 있었습니다. Blu-ray Disc Java라고 하며 종종 JavaME BD-J라고도 합니다. 모든 Blu-ray 플레이어는 Blu-ray 사양의 일부로 BD-J (Blu-ray Disc Java) 를 실행합니다. 이는 PS3, PS4, PS5, XB1 및 XBSX가 모두 Blu-ray 플레이어를 갖추고 있기 때문에 모두 Java 게임을 실행한다는 것을 의미합니다. BD-J (Blu-ray Disc Java)의 전체적인 아이디어는 무엇보다도 Blu-ray 플레이어에서 게임을 제공하는 것이었습니다.

====================================

지원 운영체제: 프로젝트 초기에는 Windows, GNU 리눅스 곧 지원 (최근 오픈소스로 깃허브 올리고 있는 것 확인)

개발 환경 IDE: Eclipse 이클립스 / Netbeans 넷빈즈 (제 기준 8.2버전)

Netbeans 넷빈즈 (8.2버전)

------------------------------------------------------------------

Java TV 에뮬레이터 툴: XleTView

XleTView(Sourceforge) 다운로드 페이지

XleTView 실행창

관련된 HD-Cookbook 책 (구매처: 해외 아마존)

---------------------------------------------------

[BD-J (Blu-ray Disc Java) 프로그래밍 개발 자료 웹사이트]

[Blu-play] Getting Started

http://www.blu-play.com/developer/getting-started

 

Blu-Play - Small-scale homebrew games for your PS3 / PS4 / XB1

Develop small-scale homebrew games for PlayStation 3, PlayStation 4 and Xbox One So you're curious to explore Blu-Play games? Great! These pages will help you get started. Needless to say, the Blu-Play platform is like no other. You develop your game with

www.blu-play.com

---------------------------------------------------

 

Happy BD-J Programming

http://bd-j.urojima.com/

 

Happy BD-J Programming!

Use "select language" menu on upper right if you are not familiar with Japanese.

bd-j.urojima.com

일본어로만 되어있지만 번역기로 한국어 선택하면 볼 만하다.

 

한국어 번역 변환

 

한국어 번역 변환

==============================

Getting started

So you're curious to explore Blu-Play games? Great! These pages will help you get started.

  1. Introduction
  2. Hello world

Introduction

Needless to say, the Blu-Play platform is like no other. You develop your game with Blu-ray Disc Java, which comes with a lot of restrictions and limitations, but which also have its own advantages over other platforms. Coding a Blu-Play game is about knowing these limitations, and taking advantage of the options you have.

Coding Blu-ray Disc Java

The coding part is relatively easy. If you ever coded Applets back in the day, then you're all set. Because this is essentially Java 1.3 and AWT you're going to work with. There are no other graphics APIs available, such as SDL or OpenGL. And you don't have any 3D APIs available either.

If you have any experience coding MIDlets, then you're also kinda set. MIDP doesn't use AWT, but the graphics methods are all the same with a few minor rewrites.

And if you don't have much experience with Java, you're in luck too! Because this is Java from when it was still a rather simple language. Shouldn't be hard to get started with.

Using graphics files

Blu-ray Disc Java lets you use standard graphics fileformats: JPEG and PNG.

Handling audio

To include music in your game, you will typically turn it into a video file with a black background - or an actually graphical background to be displayed in your game.

Sound effects should be PCM files. These can be loaded a couple of ways.

Controls / Gamepads

You can use the console gamepad for your Blu-Play game, but not all buttons can be used - and only one gamepad is supported. That means 2-player games are sadly out of the question. (Unless you use a Blu-Pad for the 2nd player, or make it a networked 2-player game).

You can also connect a USB keyboard to your console - but these only lets you press one button at a time, so it's not useful for all types of games.

Limitations

When creating a BD-J game, you're obviously going to have limitations compared to creating native games. That goes without saying. Apart from not having modern graphics APIs available, your game also won't run as fast as a native game. And to top it off, the max filesize for your JAR file is only 4 mb. Luckily you can store your assets outside the JAR though.

Build tools

It is actually rather simple to compile a Blu-ray Disc Java Xlet. All you need is the BDJ.jar file to compile against, and then tell javac to compile with source 1.3 and target 1.3

To follow proper protocol though, you are supposed to find quite a few stub files from different vendors. Then assemble them in order to generate the BDJ.jar file.

But since some of the stub files are no where to be found today, we can't follow proper protocol. (All online guides you can find are outdated). Luckily you can find the BDJ.jar file elsewhere nowadays, such as in the minimal SDK, and also in certain software media players such as PowerDVD.

And then it's just a question of adding this BDJ.jar to your classpath before compiling. Example:

javac -source 1.3 -target 1.3 -cp path/to/bdj.jar path/to/sourcefiles/*.java

You will then need to create a jar file with the compiled class files. This jar file also have to contain a socalled permission request file. Check the minimal SDK for more info.

Obtaining the bdj.jar file this way though, means that you won't have a BD-J javadoc available. But you can use the standard Java 1.3 javadoc for the most part. The few BD-J specific calls you need to make in your game, can be looked up in source codes of other BD-J projects.

Test tools

For testing you can use software media players like PowerDVD or VLC. Simply open the Blu-ray folder or ISO file.

You can add the following command to your IDE to call one of these after compiling:

# For Windows:
"C:\path\to\PowerDVD.exe" AUTOPLAY BD path\to\disc\folder\
"C:\path\to\vlc.exe" bluray:///path\to\disc\folder\ --bluray-menu --fullscreen

# For Linux:
vlc "bluray:///path/to/disc/folder" --bluray-menu --fullscreen

Signing

It is not necessary to sign your Xlet for a simple game. In fact, signing is only necessary when/if you want to

  • Access files on the disc (outside the JAR)
  • Use network (e.g. for online highscores, or for the Blu-Pad WiFi)

In short, this means you don't have to worry about signing at all at first. It is something you can look into later - if needed. Your game will run fine without signing it.

Hello World

Here's a short simple "Hello World" example.

package com.bluplay.helloworld;

public class HelloWorld extends java.awt.Container implements javax.tv.xlet.Xlet {

  private org.havi.ui.HScene scene;
  private java.awt.Font font;

  public void initXlet(javax.tv.xlet.XletContext context) {
    setSize(1280, 720);
    scene = org.havi.ui.HSceneFactory.getInstance().getDefaultHScene();
    scene.add(this);
    scene.validate();
  }

  public void startXlet() {
    setVisible(true);
    scene.setVisible(true);
    repaint();
  }

  public void pauseXlet() {
    setVisible(false);
  }

  public void destroyXlet(boolean unconditional) {
    scene.remove(this);
    scene = null;
  }

  public void paint(java.awt.Graphics g) {
    g.setColor(new java.awt.Color(0x000000));
    g.fillRect(0, 0, getWidth(), getHeight());
    g.setColor(new java.awt.Color(0xffffff));
    if (font == null) {
      font = new java.awt.Font(null, java.awt.Font.PLAIN, 30);
      g.setFont(font);
    }
    g.drawString("Hello World!", 50, 50);
  }
}

=======================================

중요한 것은 BD-J (Blu-ray Disc Java) 어디에 판매할 것인가인데 워낙 제한되고 소규모 가성비로 2D게임개발 독립성이 있다보니 판매도  BD-J (Blu-ray Disc Java)를 지원하는 플레이스테이션 3 / 4 / (현재) 5,  엑스박스 1 및 (현재) 엑스박스 시리즈 X (닌텐도 스위치는 아직 확인 못해 봤음) 네트워크 마켓 또는 블루레이 플레이어 앱으로 올리거나 자체적으로 다양한 전자결제 판매방식(개인 웹사이트에 PayPal 등)으로 판매하는 것으로 확인됩니다.

=======================

728x90
LIST

댓글