Jump to content
IGNORED

XB Racing


1980gamer

Recommended Posts

Progress... I am now able to have a drone follow a rectangular track nicely without hardwiring the track shape into the behavior logic, but it is proving much more difficult to have it autonomously navigate a more complicated track, and it all boils down to timing. I am still fiddling with different parameters such as optimal speed and search ahead distance, but I'm not quite there yet. I'll work on it some more tomorrow evening. I have not yet tackled avoidance behavior of other cars.

Link to comment
Share on other sites

One issue I noted while testing the drone code last night was that there seems to be some variability in the speed of the sprites from one run to another under Classic 99, and this is made much worse with Overdrive on. This is problematic when object detection needs to be very accurate in tight corners. For example, in one run, the drone will detect the start of a sharp turn and make the appropriate adjustment, and in another run be completely oblivious to the corner and keep on going despite having made no parameter changes at all... I'm going to shift the drone work to real iron tonight and see if I get similar results. By the way, I am not doing any compilation since this is just a proof of concept.

1980gamer, did you notice anything like that during your coding of the game?

Link to comment
Share on other sites

Hi Vorticon,

I did not notice any real speed changes. Well, emulation will sometimes "stop" for a moment. But I assumed all processing stopped equally?

 

I will try to pay closer attention going forward.

 

I also played sprint on MAME today. I think I like the square dot's that make up the courses.

I might try to mimic a few of the courses from 1977?

 

Plus, that would give me back some graphics to use for other stuff.

 

1980gamer.

Link to comment
Share on other sites

One issue I noted while testing the drone code last night was that there seems to be some variability in the speed of the sprites from one run to another under Classic 99, and this is made much worse with Overdrive on.

Maybe it's the garbage collection kickin' in.

 

http://atariage.com/forums/topic/205035-introduction-and-a-new-game/?view=findpost&p=2634748

 

Also see Intern by Heiner Martin.

Link to comment
Share on other sites

Maybe it's the garbage collection kickin' in.

 

http://atariage.com/forums/topic/205035-introduction-and-a-new-game/?view=findpost&p=2634748

 

Also see Intern by Heiner Martin.

I did not experience the same issues on real hardware, so I suspect it's related to the emulation.

 

In any case, I have been trying to get the drone demo to work for the past week and unfortunately I have not been successful. The primordial issue here is related to difficulty in getting accurate collision detection with the background for the sprites because the resolution limit is 8x8 pixel blocks. This works fine with character based motion, but sprites are an entirely different animal given that they are constantly in motion and their position changes continuously. It is possible to obtain much finer collision detection with assembly in bitmap mode, but with XB I have found it impossible to come up with a set of parameters that covers all situations. At one sprite position, the track edge may be 2 8x8 characters away, but if the sprite moves by as little as one pixel at times, then the track edge becomes 1 or 3 characters away...

For example, I started with a simple oval track, and was able to get the drone to follow the track perfectly just by detecting the edges and determining the direction of each turn. This worked in clockwise motion, but when I ran the drone counter-clockwise, it crashed miserably and required a completely different set of parameters to make it follow the track even when sprite speed was kept constant. Then of course with a complex track layout and a combination of sharp and shallow turns there will be a need for yet other parameter sets. And this is all empirical as I was not able to come up with a unified formula to calculate the necessary parameters automatically. I intensely dislike empiricism :grin:

 

As things stand, I'm afraid I am stuck. Perhaps someone smarter than me here can take this up and see what they can come up with...

Edited by Vorticon
Link to comment
Share on other sites

  • 2 weeks later...

Hello all,

I just returned from a vacation in central and south america.

 

No computer for 9 days... Just an NDS on the plane rides.

 

I was hoping to come home to drone cars etc. But I guess it is not as easy as we may have anticipated!

 

I guess I didn't really miss much as far as the super bowl goes. Though I did fly over the stadium about 5 minutes before kickoff.

 

I will see if I can add an okay drone car. I am pretty refreshed, but I have a major upgrade going on at work over the next 2 weeks.

  • Like 1
Link to comment
Share on other sites

Hey Vorticon, Not entirely sure how you're trying to do the drone code, but why bother detecting the background for drones? An idea - for each track you could try using a data string of x/y co-ordinates to plot the cars course from one way-point to another with say 2 or 3 co-ords for turning a corner, if more cars were added then simply offset the string values to set different car positions on the screen, crashed cars that run off course would simply make there way to the next way-point or you could re-place them at the last way-point.

Edited by OX.
Link to comment
Share on other sites

Hey Vorticon, Not entirely sure how you're trying to do the drone code, but why bother detecting the background for drones? An idea - for each track you could try using a data string of x/y co-ordinates to plot the cars course from one way-point to another with say 2 or 3 co-ords for turning a corner, if more cars were added then simply offset the string values to set different car positions on the screen, crashed cars that run off course would simply make there way to the next way-point or you could re-place them at the last way-point.

 

Yes of course, but that would be slot cars and 1980gamer can easily implement that :) The challenge was to come up with wholly independent drones capable of dealing with any track independently. As I had stated, had I had good collision resolution or if I was using characters instead of sprites, this would have been pretty doable and a lot more fun to watch. That said, it may still be feasible if I embed invisible characters to indicate an upcoming turn, although this remains to be tested. If have some time this weekend I may dabble some more with it. I was really trying to avoid guiding the cars in any way, and I think this is the purist in me :)

If anyone else here is willing to take a stab at this problem (pure drones without guiding using sprites in XB), I would love to see what you can come up with. Perhaps there is a novel approach I have not thought of...

Link to comment
Share on other sites

Well not really slot cars, apart from the starting positions my theory being the cars could follow a "racing line", the AI needed would be for the drone cars to jostle for position and how they reacted for breaking, overtaking and corners. Crashed cars could simply re-join the nearest path to the racing line and to make it interesting the drones could be given slightly different speed and traction attributes.

 

Wish I was a TI99 coder (or had the time) as this really is my kinda game, anyway good luck in finishing it I'm sure it'll come good with the talent on here.

Link to comment
Share on other sites

I have been out straight at work... Until the 17th or so..

 

But I may take a crack at this again this weekend, if I am not to tired. I think this is the first time I have logged on to AA since the night I got back from vacation!

 

I am also a winter olympics fan, so that may take a bit of my time this weekend too.

 

We will come up with some solution, hopefully it will work well and be fun!

 

Gene

Link to comment
Share on other sites

  • 2 weeks later...

hi, I'm new with ti99/a, how to try this game in classic 99 ?

 

Hi there and welcome!

Copy the Drone-C file into the DSK1 directory of Classic 99. This is the default directory for Classic 99. Start up the emulator and select the Extended Basic cartridge. When you are at the READY prompt, type RUN "DSK1.DRONE-C" and hit ENTER. That should do it.

Link to comment
Share on other sites

Hi OX,

I do not have a joystick to test with... So I am guessing my code is working.

 

The fire button should start the car moving, however, if you hold the button, it is also the breaks and the car will not move.

Also, if I have not talked about it, pressing the joystick... forward or back, I don't remember? will enable turbo boost for a little while.

It has a finite life and also makes it hard to handle the car ( for me at least ).

 

I know I have a bunch to revisit on the game, but I am looking over my pacman rip-off at the moment, to try to get a little more speed out of it.

But I will get back to this game soon.

Gene

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...