Jump to content



1

Displaying and moving simple sprites on the Jag


5 replies to this topic

#1 JagChris OFFLINE  

JagChris

    Stargunner

  • 1,594 posts
  • Location:Oregon

Posted Fri Jun 25, 2010 2:10 PM

Anyone want to tackle a little lesson on this?

#2 Gorf OFFLINE  

Gorf

    River Patroller

  • 4,633 posts

Posted Wed Jun 30, 2010 9:51 PM

View PostJagChris, on Fri Jun 25, 2010 2:10 PM, said:

Anyone want to tackle a little lesson on this?

By sprites you can mean one of three things. OPL objects as sprites, Blitted Sprites or
straight up software sprites. I recommend using the OPL. However this is not a 'little'
lesson as you do need to understand how the OPL and it's list(s) operate.

I think you should start out with a software based sprite, then use the blitter to replace the
software draw, then use the OPL. Regardless, you will still need to know what to do with the OPL
before you can use any of these methods on the Jaguar as it is the OPL that allows you to put
anything on the screen to begin with. The OPL is indeed the backbone of the Jaguar's video system
and you can't display anything without it...unless you want to write with really tight timing and
precision directly to the line buffers...but you still need to set up the OPL minutely even for this.

You have the 6 lessons I posted. Take a look at those as you will see how the OPL is dealing with
the screen. If you want help. Let me know. I will show you how to add more objects to the list.

I am working on a skeletal source for using the OPL as a sprite engine. It's got a ways to go but
it uses the GPU to deal with the list where the lessons use the 68k and that setup is intended mainly
for a 3D buffer and not exactly ideal for a 2D sprite based engine, although it will work for that if
you want it to.

Edited by Gorf, Wed Jun 30, 2010 9:59 PM.


#3 JagChris OFFLINE  

JagChris

    Stargunner

  • 1,594 posts
  • Location:Oregon

Posted Thu Jul 1, 2010 11:10 AM

Alright I'll look through the includes and see what understanding I can glean from there.

#4 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Thu Jul 1, 2010 12:08 PM

Hello JagChris!

View PostJagChris, on Fri Jun 25, 2010 2:10 PM, said:

Displaying and moving simple sprites on the Jag

Anyone want to tackle a little lesson on this?

As Gorf already said, it depends on your development environment or coding approach.

Of course you just need to set the usual "sprite"-attibutes (where is the pixel-data? position (x|y) and so on), this requires just some few lines of code.
But because the Jaguar doesn't have a operating system with built in support for Input/Ouput, you'll need some few hundreds of code to get a working Jaguar-program-framework set up
(doing stuff like initializing the Jaguar, setting up the videodisplay, reading the Joypad(s), perhaps doing sound-output and so on).


Kind regards
Matthias

#5 rush6432 OFFLINE  

rush6432

    Chopper Commander

  • 227 posts
  • Location:Austin,TX

Posted Sun May 29, 2011 5:40 PM

Bumping this thread from the dead

If you want to display simple sprites around on the screen look for starcats older examples he released. they are in 68k asm and contain VERY basic setup of video and the object list which manages sprites and allows you to manipulate their x, y position, and many other things. In my opinion this can give you a very basic understanding of how it all works and you can branch from there and try new methods to update the object list and build it (ie gpu) there are a few diffrent ways to do the object list as well. the one that starcat shows in his examples is very similar if not the exact same as the Native demo setup.

#6 JagChris OFFLINE  

JagChris

    Stargunner

  • 1,594 posts
  • Location:Oregon

Posted Sun May 29, 2011 6:05 PM

Was just discussing basic graphics on the Jag with Tursi. I want to start with C if anything. Its what most people will know. Perhaps Sebs libraries for a start, or none at all. As simple as it can be, whatever that is on the Jaguar and not relative to anything else.

As for Gorfs first post in this thread as to what what

Quote

By sprites you can mean one of three things. OPL objects as sprites, Blitted Sprites or
straight up software sprites. I recommend using the OPL. However this is not a 'little'
lesson as you do need to understand how the OPL and it's list(s) operate.

hell pick one and go from there. Waste time dancing around like that.

Perhaps building on Bozs Jag256 program or somesuch. something Basic to get the ball rolling.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users