xboxscene.org forums

Pages: [1] 2

Author Topic: Open Transport Tycoon Port  (Read 498 times)

HCl

  • Archived User
  • Newbie
  • *
  • Posts: 34
Open Transport Tycoon Port
« on: October 13, 2004, 01:25:00 PM »

a while ago i did a port of open transport tycoon to the xbox, just
as a little pet/test project of mine.. wondering whether there's anyone who's
interested in it.

This post has been edited by HCl on Oct 13 2004, 08:25 PM
Logged

chilin_dude

  • Archived User
  • Hero Member
  • *
  • Posts: 3068
Open Transport Tycoon Port
« Reply #1 on: October 13, 2004, 01:49:00 PM »

Hell yes! There was a request in xports thread for it by a few people, so I'm sure that its wanted... And if you've already ported it and it only needs a bit of tweeking then go for it... I can't wait for it  :beer:
Logged

HCl

  • Archived User
  • Newbie
  • *
  • Posts: 34
Open Transport Tycoon Port
« Reply #2 on: October 14, 2004, 06:30:00 PM »

looked at it a bit...
fixed some issues...

networking/online play works now,
so does music/keyboard
(keyboard not working was yet another bug in libSDlx, fixed)

that was pretty much all on my todo list... so i guess i'll release it in a while..
Logged

Boff

  • Archived User
  • Newbie
  • *
  • Posts: 24
Open Transport Tycoon Port
« Reply #3 on: October 15, 2004, 02:38:00 AM »

just wondering, is the keyboard essential for play with your port, or can everything be controlled via the xbox pad?
Logged

HCl

  • Archived User
  • Newbie
  • *
  • Posts: 34
Open Transport Tycoon Port
« Reply #4 on: October 16, 2004, 08:09:00 AM »

don't need keyboard unless you want to change your name, which isn't exactly
needed to play the game...

as for controller/mouse,

i added controller support, but it breaks mouse support, so at the moment its
either one (this is also the last thing that needs fixing before i can really release
anything non-beta) (though i might simply release two .xbe versions, one for mouse and one for controller, if its hard to find/fix the bug)
Logged

chilin_dude

  • Archived User
  • Hero Member
  • *
  • Posts: 3068
Open Transport Tycoon Port
« Reply #5 on: October 16, 2004, 08:16:00 AM »

This sounds ace!!! Cant wait for it... Glad that you don't have to use Kb or mouse!
Logged

snes

  • Archived User
  • Newbie
  • *
  • Posts: 16
Open Transport Tycoon Port
« Reply #6 on: October 16, 2004, 09:20:00 AM »

Cool I'm really looking forward to it.Please release it as soon as possible
thx
Logged

XBOX War3z

  • Archived User
  • Hero Member
  • *
  • Posts: 587
Open Transport Tycoon Port
« Reply #7 on: October 16, 2004, 05:10:00 PM »

yea release it any moment you can :)
Logged

Boff

  • Archived User
  • Newbie
  • *
  • Posts: 24
Open Transport Tycoon Port
« Reply #8 on: October 18, 2004, 05:18:00 AM »

I too cant wait for this release  :D  Used to spend hours playing it on the PC
Logged

zero5

  • Archived User
  • Jr. Member
  • *
  • Posts: 56
Open Transport Tycoon Port
« Reply #9 on: October 18, 2004, 06:13:00 AM »

top stuff   ;)
Logged

Wolfblade12

  • Archived User
  • Newbie
  • *
  • Posts: 38
Open Transport Tycoon Port
« Reply #10 on: October 19, 2004, 03:07:00 AM »

i would love it!
Logged

HCl

  • Archived User
  • Newbie
  • *
  • Posts: 34
Open Transport Tycoon Port
« Reply #11 on: October 21, 2004, 03:24:00 AM »

Released on xbins :)

Oh, here's the controller code i was talking about in the nfo:
CODE

  int i;
  xleft=yleft=xright=yright=0;
  for(i=0;i    xleft=SDL_JoystickGetAxis(joy, 0);
    yleft=SDL_JoystickGetAxis(joy, 1);
    xright=SDL_JoystickGetAxis(joy, 2);
    yright=SDL_JoystickGetAxis(joy, 3);
    if(xright>100||xright<-100||yright>100||yright<-100||xleft>100||xleft<-100||yleft>100||yleft<-100)
      break;
  }

  if((xleft>100||xleft<-100||yleft>100||yleft<-100)&&++jscount>=3) {
    int dx=0,dy=0;
    jscount=0;
    if(xleft>22000||xleft<-22000||yleft>22000||yleft<-22000) {
      xleft=xleft > 22000 ? 22000 : xleft < -22000 ? -22000 : xleft;
      yleft=yleft > 22000 ? 22000 : yleft < -22000 ? -22000 : yleft;
    }
    if(xleft>20000||xleft<-20000||yleft>20000||yleft<-20000) {
      dx=xleft/1500;
      dy=yleft/1500;
    }
    else if(xleft>15000||xleft<-15000||yleft>15000||yleft<-15000) {
      dx=xleft/3000;
      dy=yleft/3000;
    }
    else {
       if(xleft>10000)
         dx=2;
       else if (xleft<-10000)
         dx=-2;
       if(yleft>10000)
         dy=2;
       else if(yleft<-10000)
         dy=-2;
       if(dy!=0||dx!=0)
         jscount=-3;
    }
    ev.motion.type=SDL_MOUSEMOTION;
    ev.motion.x=_cursor.pos.x+dx;
    ev.motion.y=_cursor.pos.y+dy;
    if((_cursor.pos.x+dx)<2)
      ev.motion.x=1;
    if(ev.motion.x>_screen.width-2)
      ev.motion.x=_screen.width-1;
    if((_cursor.pos.y+dy)<2)
      ev.motion.y=1;
    if(ev.motion.y>_screen.height-2)
      ev.motion.y=_screen.height-1;
    ev.motion.state=0;
    ev.motion.which=5;
    ev.motion.xrel=dx;
    ev.motion.yrel=dy;
  }


If anyone feels like / is willing to write a better joystick-> mouse function, please,
be my guest... joystick axes range from -32000 to +32000, but on the xbox with my s controllers i noticed they mostly go from around 10000 to around 24000 (-24000 to -10000 for opposite direction) (they go up to +32k and -32k if you pull them all left, all right, or all down/all up, but if you move them to the bottom left or bottom right, they only get to -24000, 24000 and 24000,24000 (handling controller movement without mimicking a mousemovement is also possible, but requires different changes (for if you want to use absolute movement, for example))

This post has been edited by HCl on Oct 21 2004, 10:28 AM
Logged

Wolfblade12

  • Archived User
  • Newbie
  • *
  • Posts: 38
Open Transport Tycoon Port
« Reply #12 on: October 21, 2004, 03:34:00 AM »

and again it doesnt work with me :(
it just goes to evox :blink:
Logged

XBOX War3z

  • Archived User
  • Hero Member
  • *
  • Posts: 587
Open Transport Tycoon Port
« Reply #13 on: October 21, 2004, 04:51:00 AM »

works here
nice work :)
Logged

DeathsHead

  • Archived User
  • Newbie
  • *
  • Posts: 3
Open Transport Tycoon Port
« Reply #14 on: October 21, 2004, 06:16:00 AM »

Thats very nice, only problems I had were on my crappy tv I couldnt see the menu or the status bar.  Also the controls were very sensitive.

Would it be possible to add a sensitivity slider to reduce it?

Also, rather than worrying about scaling, is it possible to adjust the offset of the menu at the top and the status at the bottom?  That may be a simpler way to fix it.
Logged
Pages: [1] 2