Jump to content
IGNORED

Help me start from scratch...


Recommended Posts

For the love of all that is holy, I can't begin to express my anger in learning I somehow obtained an older version of XnView - Idiot checklist 101: make sure you have the latest latest latest version!

 

Unreal...

 

So now I got the title screen working but the 16 color thing is unacceptable - so assuming that it has to be chnaged in the rapinit.s file from 4 to (8? 16? 24?) although I'm guessing I can 'test' it now and mess around since it's actually working with the base 16, but for reference would like to know EXACTLY what needs to be done so I'm not kicking this box out the window come the weekend.

 

*EDIT: also... is there a way *shaking, trembling even* to do a fade-in for the title screen using the decay function or am I completely unable to do such a thing?

 

Thanks!

 

post-985-0-83772100-1484853655_thumb.png

Edited by Clint Thompson
Link to comment
Share on other sites

OK I am totally confused. Where exactly is raptor (Or build.bat to be exact) pulling the assets from? I JUST DID THIS YESTERDAY!!!!! Is it pulling it from the installed directory x86 or from the projects folder in my documents? I don't get it. I should have taken better notes yesterday, but I am certain it was pulling the assets from my documents

Link to comment
Share on other sites

ok so I have another issue I can't seem to figure out. We are back at square one. I need to use at LEAST an 8 bit image for the tittle screen to Neon Centipedez. It has to be at least 8 bit due to the psychedelic effect I want it to have. any less color detail and it won't work. I am able to get this image to load in the doger example, however I have to convert it to a 4 bit image. This looks awful for this particular image. Notice in the included screenshot from notepad ++ I am attempting to correct this by changing the highlighted variable to 8 instead of 4. (rapinit.s) I have tried this setting and provided the 8 bit image and the image is distorted. What am I doing wrong? I have also included the image I want to appear on the title screen for Neon Centipedez (the 8 bit image in question)

post-45896-0-76947500-1484883836_thumb.png

pedez BG.bmp

 

 

Link to comment
Share on other sites

What image are you trying to display? Please post the source picture.

 

It is 352,250,8 - XnView appears to jump massively from 256 colors to 16m with no in-between, which is strange as hell to me but it is Bitmap I guess. There's no way to get better than this? but I also have one that is 24bit (I think I came to this one under GIMP, though I don't remember) - can I not use that as well?

 

f16.bmp

 

IDIOT CHECKLIST 101 - do yourself a favor and use Notepad++ .... it makes more than just a difference in ease of life. Disregard the fact that Notepad is even an option, it's laughable and you're doing yourself a disservice by being lazy and not installing Notepad++ ---- take it from someone learning the hard way...

Edited by Clint Thompson
Link to comment
Share on other sites

the CLUT is the Colour Look Up Table pointer

 

The Jaguar has a few ways to display graphics, 1,2,4,8,16 bit

 

For 1,2,4 bit images, they can be assigned to any one of the 16 sub-CLUTs (each of 16 colours) of the basic 256 colour palette (16*16=256 colours)

8 bit images are 256 colours, so use the entire CLUT (hence, no_clut)

16 bit images do not use a CLUT.

 

I would strongly suggest reading the RAPTOR API manual as well as any rB+ documentation.

Link to comment
Share on other sites

the CLUT is the Colour Look Up Table pointer

 

The Jaguar has a few ways to display graphics, 1,2,4,8,16 bit

 

For 1,2,4 bit images, they can be assigned to any one of the 16 sub-CLUTs (each of 16 colours) f the basic 256 colour palette (16*16=256 colours)

8 bit images are 256 colours, so use the entire CLUT (hence, no_clut)

16 bit images do not use a CLUT.

 

I would strongly suggest reading the RAPTOR API manual as well as any rB+ documentation.

Thanks for clearing that up and teaching us the CLUT acronym. 16bit sounds like where it's at. Memory aside, I can't see why you wouldn't want to be at 16bit - 65k colors - high color. Any projects that use strictly 16bit? Will try and hit the API manual this weekend. I really would love to be able to set everything up 100% so I know exactly what I'm doing and how.

Link to comment
Share on other sites

Memory aside, I can't see why you wouldn't want to be at 16bit - 65k colors - high color. Any projects that use strictly 16bit?

 

Bus bandwidth. For smaller projects, absolutely no need to go below 16 bit - "Expressway" being an example of "I can't be bothered to deal with CLUTs" :D

  • Like 1
Link to comment
Share on other sites

Here's a quick 16-bit title screen example.

 

Notice there is ZERO .bas coding in the 16bit.bas file (apart from the print commands). This is because the object is defined and displayed via the rapinit.s object list file.

The assets.txt defines where the image is and what to convert it to.

 

To create the attached image i opened it in Paint Shop Pro 7 converted to 16 mill colours 24 bit and saved as a BMP. rB+ then converts that to 16bit during the build.

 

Hopefully this will help as a starting project. Make sure you read the rapinit.s and ALL the params for an object.

 

What you should do next is create a variable in the .bas that points to SPR_TITLE and then you can use that variable with rlist[varname].rapinitprophere to manipulate it. Such as rlist[varname].active = R_is_inactive to hide the itle screen.

 

Remember you can have a mixture of colour depths on the screen, so small sprites could be 4 bit to save processing power (for example). But then you have to use CLUTS etc.

16bit rB+ Demo.zip

Edited by Sporadic
  • Like 2
Link to comment
Share on other sites

Belated reply, but hey I'm trying to catch up with the thread!

1. Now that I have found where and how I can print text onscreen, how do I modify the color of it and is it strictly limited to only 15 degrees of change? (as seen in the colour 0-15 variable) I didn't see anything referencing what 0 color is and what 15 color is or what's in between. So basically 16colors. How can I change that to 256 colors or dare I go even higher than that, or is it possible?


Big subject, requires a big reply, will get back to this later.

2. Is or was it not possible to include or create a function for title screens in the .bas file so I can just say, hey! I want to insert this graphic image at this resolution and done such as:

title mystupidgraphic.bmp (320,240,24) (x, y, bit)


Could you elaborate a bit on this? I didn't get it...

3. I've created the spiderman dancing to dubstep and was going to use another sound file but it pushed the entire image over to about 2.2mb and then it says "YOU CAN'T DO THAT IDIOT! NOT IN ABS!" but I punched in:

build chessboard rom

Should that not then create a rom and load it in VJ that way instead of ABS? What am I doing wrong.


build.bat is unfortunately case sensitive. Try "build chessboard ROM".

But even that will give you an error too. See, in the project's "assets.txt" the music file is being imported in ram, not rom. When rb+ is building a rom, it's simply taking whatever should be in ram and places it in rom. Then when the machine boots, it simply copies the binary to ram. So even if it fits in rom, it still won't fit in ram! So you'll have to change assets.txt so the file will be imported to rom.

4. What program do I use to export an image to replace the image.bmp used in the pack project so that it'll just work?

I love that I can toss in any MP3 and it'll just work but graphics are such a PITA.


Any program that can save an unpacked BMP as 24bit image should do the trick.

Gfx import is supposed to be a PITA unfortunately because there's so many modes the Object Processor is supporting, you'll have to decide beforehand which one are you going to use (there's 1,2,4,8 bit paletted, 16bit, 24bit and CRY). Just take some time to read about it and it'll become clearer!

5. Maybe an extended question on the sound thing but what are the limitations? Are the size limits based on the Jaguar RAM or if I wanted to include a full-on 2MB MP3, it'll pull it from the ROM if I make a cart or that's the idea anyway. Also, it'll do 44khz just fine without an issue yeah? I noticed it was set to something absurdly low at 8000 but I guess that's expected on SFX? Either way... I want to bypass the mod garbage and loop short but high quality MP3s for title screen music and probably even in-game music.

I still can't fathom that jumping in through 12 different projects and trying to piece together a project based on those examples in countless trials and errors is the best route for someone new or beginning like myself because it's really angering, part of the reason I started this thread and in all seriousness, I'm the best target for someone new to the game because outside of creating a bomber for the TRS80 and some goofy randomized line drawings while listening to cassettes on the Atari 800 in basic, Eliza aside, I've got very little programming experience but know enough to wreck everything and cause complete failure... even if it's not my fault lol

 

 

The limitations are simple: You get 2mb of RAM, and either 1, 2, 4 or 6 mb of ROM.

 

You can't play an mp3 directly, it's auto converted while being imported. So a 2mb MP3, depending on your replay speed and quality will have different size when it gets to the Jaguar. And to add to the confusion, there are also some packed formats supported which can achieve some compression. You'll have to study a bit more I'm afraid and do some tests. The build folder will always contain the converted files so you can check for actual sizes. So anyway like I said above, it's a much saner idea to place your streamed music in rom and have it played from there.

  • Like 3
Link to comment
Share on other sites

OK I am totally confused. Where exactly is raptor (Or build.bat to be exact) pulling the assets from? I JUST DID THIS YESTERDAY!!!!! Is it pulling it from the installed directory x86 or from the projects folder in my documents? I don't get it. I should have taken better notes yesterday, but I am certain it was pulling the assets from my documents

 

rb+ is pulling project assets from assets.txt inside the project folder, there and nowhere else. Now, if the paths+filenames you put in assets.txt reside in your documents folder is another matter.

Link to comment
Share on other sites

Gfx import is supposed to be a PITA unfortunately because there's so many modes the Object Processor is supporting, you'll have to decide beforehand which one are you going to use (there's 1,2,4,8 bit paletted, 16bit, 24bit and CRY). Just take some time to read about it and it'll become clearer!

 

And CRY has 15 bit and 16 bit modes! Yes, this - this will require reading and absorbing :)

  • Like 1
Link to comment
Share on other sites

what is no_clut? how do I activate this? it says no_clut for 8 bit images.....

 

As written in most assets.txt files:

 

' - For graphics conversion you can use "gfx_clut" or "gfx_noclut" to convert a .BMP file into jaguar raw format and optionally export the paletter or not (clut=yes, noclut=no).

 

Generally, you need to export a clut with your graphics, so use "gfx_clut". In some extreme cases you might not want to, thus "gfx_noclut".

 

(as written above, in layman's terms clut is the image's palette).

  • Like 1
Link to comment
Share on other sites

Here's a quick 16-bit title screen example.

 

Notice there is ZERO .bas coding in the 16bit.bas file (apart from the print commands). This is because the object is defined and displayed via the rapinit.s object list file.

The assets.txt defines where the image is and what to convert it to.

 

To create the attached image i opened it in Paint Shop Pro 7 converted to 16 mill colours 24 bit and saved as a BMP. rB+ then converts that to 16bit during the build.

 

Hopefully this will help as a starting project. Make sure you read the rapinit.s and ALL the params for an object.

 

What you should do next is create a variable in the .bas that points to SPR_TITLE and then you can use that variable with rlist[varname].rapinitprophere to manipulate it. Such as rlist[varname].active = R_is_inactive to hide the itle screen.

 

Remember you can have a mixture of colour depths on the screen, so small sprites could be 4 bit to save processing power (for example). But then you have to use CLUTS etc.

 

to save editing rapinit.s ma.ually try the list editor, it automates 99% of this.

it even creates a variable list.

 

i guess i could make a short demo of how to set this up for use to automate the process if this would be helpful

Link to comment
Share on other sites

Holy crap this was helpful! I was able to get a 24 bit title screen! It's working fine. What I did was change the color mode to 24 but on all of the following screen width settings I put a *2 beside them instead of *4. It says *2 is for 16 bit and *4 is for 24 bit images but it works the way I did it. which would indicate that my image is actually 16 bit and not 24 bit but that is not true. I remember ggn saying it would automatically convert it to 16 bit. Is this what has happened here?

post-45896-0-92288100-1484915899_thumb.jpeg

Edited by Jeffrey_Bones
  • Like 1
Link to comment
Share on other sites

Thanks for all the helpful replies/responses - everyone. I'll have some toying/testing to do this weekend once I get some free time but am looking forward to it. Glad to see JJ got the 24-bit screen working, so hopefully that's my next step.

 

I never really considered smaller 16-bit images causing issues in regards to the bus saturation and overall processing *Have a Blast!* but wouldn't think that a Frogger clone would have much issue with it in said quality state. Everything I want to do, I'm hoping to do in 16-bit in regards to this Frogger clone. If I'm going to bother rendering fresh new images for animation and everything else, I would expect the quality output to match what the system is certainly capable of. My capabilities on the other hand, are questionable...

 

I don't want to bite off more than I can chew so goals for the weekend:

 

-Implement custom working 16-bit title screen

-Implement custom working SFX music loop for title screen

-Remove the hidden Nyancat under title screen (yes, I noticed it was there when I managed to squish the screen size in half)

 

(realistically all of this should take no more than probably 30-minutes now that I kind of know where to look and what I'm looking at and my environment is mostly setup working)

 

Possible extended weekend goals:

 

-fade-in and possible fade-out of title screen (unless this isn't possible, someone please warn me in advance if I'm wasting my time)

-randomized "shaking" of said title screen (though I'm unsure of how possible this is with warned stated issues of bus/processing speed with using full-screen 16-bit images)

-render new frog images for in-game character.... for when the time comes

-prepare in-game level music

 

Hopefully I'm not being too ambitious here...

Edited by Clint Thompson
Link to comment
Share on other sites

-fade-in and possible fade-out of title screen (unless this isn't possible, someone please warn me in advance if I'm wasting my time)

-randomized "shaking" of said title screen (though I'm unsure of how possible this is with warned stated issues of bus/processing speed with using full-screen 16-bit images)

-render new frog images for in-game character.... for when the time comes

-prepare in-game level music

 

Hopefully I'm not being too ambitious here...

 

fades: Not realistic with fullscreen 16 bit images

shaking: trivial - change the background's x/y position

Link to comment
Share on other sites

 

fades: Not realistic with fullscreen 16 bit images

shaking: trivial - change the background's x/y position

 

Well that's a bummer.

 

If it's unable to fade-in then I'm not sure how it would shift the entire screen around randomly fast enough with like a -5/+5 random on the x,y to make it appear to shake?

Link to comment
Share on other sites

 

Well that's a bummer.

 

If it's unable to fade-in then I'm not sure how it would shift the entire screen around randomly fast enough with like a -5/+5 random on the x,y to make it appear to shake?

 

Using RND at runtime will cause slowdown. I advise creating an array and filling that with random values before the game starts. Then while the game is running, just incrementally loop through that array to get the next 'random' value. When you reach the end of the array, go back to the beginning. Perhaps start with just 10 values, you can always increase the array size later. Also, don't use FLOATS as they are slow. Store the RND values as RND * 100 (for example). This will give you a value between 0 and 100 depending on what RND returns. Rather than between 0 and 1.

 

Then, say you have a variable declaration in your code for the title screen such as ;

DIM sprTitle AS INTEGER : sprTitle = 0

 

While looping you can do something like;

randomvalue = rndarray[counter]

if randomvalue < 50 then

rlist[sprTitle].x = rlist[sprTitle].x - (5<<16)

else

rlist[sprTitle].x = rlist[sprTitle].x + (5<<16)

endif

 

If you don't know what the (5<<16) is, RTFM or RTFwebsite. Basically it's scaling the number 5 up to 16.16 fixed point. Just change the 5 if you want to move it a different amount (for now).

 

You can expand on the above code to change the y coords too. Also, that doesn't check any x or y movement limits so in theory if you had a lot of consecutive values less than 50 then the title image would move off the screen to the left.

 

Finally, a free gotcha, don't try and disable/hide/R_is_inactive the 1st or last objects in the object list. So you might have to create a small off screen dummy object as the 1st object when you come to hiding the screen.

 

I hope that gives some clues, I kinda just brain dumped....

 

EDIT: Of course, for starters you might want to just do rlist[sprTitle].x = rlist[sprTitle].x - ((RND*5)<<16) in a loop to see stuff happen. Then worry about optimisations.

 

EDIT 2: Don't forget to include a VSYNC inside your loop. You'll see this in most of the examples.

Edited by Sporadic
  • Like 2
Link to comment
Share on other sites

Finally, a free gotcha, don't try and disable/hide/R_is_inactive the 1st or last objects in the object list. So you might have to create a small off screen dummy object as the 1st object when you come to hiding the screen.

 

So that probably explains the goofy Nyancat hidden behind the title screen. I'm guessing bad things happen if you deactivate the first or last image.... or just nothing at all and a black hole for display. Thanks for the braindump! =D

Edited by Clint Thompson
  • Like 1
Link to comment
Share on other sites

Actually rlist[sprTitle].x - ((RND*5)<<16) might not compile. It might think (RND*5) is a float, which you can't then use <<16 on.

 

So you might need INT(RND*5)<<16 or cast it ((INTEGER)RND*5)<<16

 

Have a play - that's the best way to learn. Or most fun at least.

  • 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...