xboxscene.org forums

Author Topic: Most Simple .xbe File?  (Read 124 times)

ak47

  • Archived User
  • Newbie
  • *
  • Posts: 9
Most Simple .xbe File?
« on: August 05, 2002, 11:04:00 AM »

BenJeremy posted a great getting started doc, thanks its enough! ;-)
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Most Simple .xbe File?
« Reply #1 on: August 05, 2002, 11:07:00 AM »

Well, for starters, check out my little "Getting Started Tutorial" in Word .DOC format to make sure your environment and projects are set up correctly.

As for "Hello World" - well, I've successfully run several of the sample, and I'm working on some classes to aid in writing various types of applications.

The basic problem is that (ironically) there's no "console" to simply print a line to. DirectX video modes must be set up and you must use (I think) stencil buffers to draw tesxt on to the screen.

Two cool samples, by the way, are in the Input directory. The GAMEPAD and RUMBLE examples are nice looking (text-wise) and can also be used as a diagnostic for your gamepads.

I'm building a class from a slightly modified CXboxApplication class to handle "game states" - essentially differently rendered modes of the application - similar to CView type classes in MFC, with management functions tying them together. I'll probably add in some simple text display routines, if I don't find anything already in the XDK (though I think the Debugkeyboard example might have some code for a text-mode console)


P.S.: I was typing this when you replied to your own thread. Glad to be of help.
Logged

N00bvin

  • Archived User
  • Sr. Member
  • *
  • Posts: 446
Most Simple .xbe File?
« Reply #2 on: August 06, 2002, 02:12:00 AM »

Thanks for the great guide, but I'm still having error trying to compile... I'm following all your steps...

I've reinstalled everything as well, but still no luck.

Could you do a STEP by STEP for us problem children?
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Most Simple .xbe File?
« Reply #3 on: August 06, 2002, 05:13:00 AM »

QUOTE (N00bvin @ Aug 6 2002, 04:12 AM)
Thanks for the great guide, but I'm still having error trying to compile... I'm following all your steps...

I've reinstalled everything as well, but still no luck.

Could you do a STEP by STEP for us problem children?

                   Hmmmm... I tried to make it "step by step" but perhaps the problem is WHERE you installed the files?

I just read somewhere that you should use the default locations for installing the XDK (i.e. C:\Program Files\MS Xbox SDK\). I guess much of the sample code is hard-coded to use that directory structure.

Are you trying to install it to a different drive?
Logged

Mr. Sharky

  • Archived User
  • Newbie
  • *
  • Posts: 5
Most Simple .xbe File?
« Reply #4 on: August 11, 2002, 11:49:00 AM »

Can anyone recommend any good books to get into XDK programing,.. I'm guessing there aren't any XDK books,.. but would it be easy to apply what could be learned in a directx book over to the xbox?
Logged

PRH

  • Archived User
  • Newbie
  • *
  • Posts: 45
Most Simple .xbe File?
« Reply #5 on: August 11, 2002, 12:14:00 PM »

ummmm learn C++
good link: http://www.cpp-home.com/print_t.pl?16
it goes from very very basic to some pretty serious shiat

altho you should understand the basics of programming
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Most Simple .xbe File?
« Reply #6 on: August 11, 2002, 01:07:00 PM »

Well, a couple more tips....


1. In the post-build steps, include this after the xbepatch line:

      erase "$(TargetDir)\$(TargetName).bak"

Why? Because xbepatch doesn't like the BAK file existing the next time you compile, and will somehow give you an old copy of your application. Took me a while to figure this one out!! I think it expects to rename the XBE, but doesn't notice that it couldn't, and then copies over a patched version of the bak file (which is still the OLD one)

2. Rename xbecopy.exe in the XDK's xbox\bin directory to something like "xbecopy.old" and replace it with a "do nothing" file. When you are prompted for a remote filename, enter anything (I usually just use "xx") and forget about the Xbox Image tab setting.

The reason for this is that it never saves the checkbox setting to turn off the remote copy.

3. When using the batch build, the xbecopy step is not run.

4. Keep an FTP program handy.... I keep LeapFTP set up to bring up my XDK samples directories and the E:\APPS directory on my Xbox. After compiling, I just do a connect and copy, then run "Raw Command" of "execute myapp.xbe" - be sure to copy over the media directory as well.

I hope this helps.




NOW: Can somebody help me get a bitmap displayed on the screen? I thought this was going to be easy, but all I've got is a black square!! I set up the vertices, as per the example in "Gamepad" with the analog gauge. The black square changes size and position as I set, but the texture is not rendered to the vertices.

M$ has not seen fit as to put a simple "display bitmap" routine in their samples!!
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Most Simple .xbe File?
« Reply #7 on: August 11, 2002, 08:20:00 PM »

Aw well... the mysteries of putting bitmaps on the screens as texture placed on vertices. What joy.

At any rate, I finally found a combination that worked, and even got it working with an alpha color key.

Also, those using LeapFTP might find it easier to develop by adding a command, "execute myapp.xbe" and assigning it a hot key (mine is shift-ctrl-9), then, after uploading it, you merely have to highlight the file in the remote file list and do your hotkey to launch the app.

Logged

FuFu

  • Archived User
  • Newbie
  • *
  • Posts: 4
Most Simple .xbe File?
« Reply #8 on: August 12, 2002, 10:12:00 PM »

1 more thing.

Since i tried changing the settings how u just said i get a bunch of libaries unapproved.


any clue why this is?

thanks!
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Most Simple .xbe File?
« Reply #9 on: August 12, 2002, 11:34:00 PM »

The samples must be run from the DSP files already built for them.

Open up a project, instead of a workspace to find them.

As for the libraries, it's normal.
Logged

FuFu

  • Archived User
  • Newbie
  • *
  • Posts: 4
Most Simple .xbe File?
« Reply #10 on: August 13, 2002, 06:21:00 PM »

is there anyway i can contact you via AIM or e-mail?

Question now:  I try to open the .dsp but then  i get a message saying its going to open the workspace and gives me no choice.

thanks,
FuFu
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Most Simple .xbe File?
« Reply #11 on: August 13, 2002, 11:02:00 PM »

QUOTE (FuFu @ Aug 13 2002, 08:21 PM)
is there anyway i can contact you via AIM or e-mail?

Question now:  I try to open the .dsp but then  i get a message saying its going to open the workspace and gives me no choice.

thanks,
FuFu

                   I'm headed off to vacation tomorrow... sorry.

...and it WILL create a workspace from your DSP, that's normal. After that you can add other Projects (DSP files) to your created workspace.

Logged