Jump to content

Photo

Help me start from scratch...


141 replies to this topic

#1 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • 4,293 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Tue Jan 17, 2017 11:57 AM

Ok, so I've downloaded the RB+ package and installed the Raptor stuff... I've read through the tutorials to see how easy it is to edit the assets file for graphic and sound locations and the basic text file. I've 'built' nyandodge and it launches fine in VJ, perfect. Now I wanted to start editing to toy around with what I can do but run into issues which seem to need more defined calls elsewhere. I feel I learn best by jumping in instead of trying to grasp every element only to forget later, probably why I would make a terrible coder.

 

Anyways, things I want to do:

 

1st thing I want to do is replace the nyancat with a 100x200 image. - I thought I could just change a few sprite size variables in the .bas file but the 1,16 for player doesn't change  at all so what does the 16 do? It seems too low of a number for x,y screen placement but I'm probably wrong. Also, I want the image to not be 256 colors only or whatever the nyancat is displayed in.

 

2nd thing I want to do... maybe completely from the ground up - just display a 16bit title screen graphic image in the most colors possible for the Jaguar and that's it. Is it only .BMP compatible? Ideally I should be able to also punch in a MOD with the command while it's being displayed and should be super straight forward and simple. Though after seeing a .RAW file for the sound fx, I can't help but wonder where that comes from and I've used tons of programs for tons of different things.

 

I see the text thing and can edit that. The one and only thing I managed to manipulate in quick haste was the LOLOL to my alias MindThreat.

 

Talk about feeling like an absolute amateur.

 

 



#2 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • Topic Starter
  • 4,293 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Tue Jan 17, 2017 1:21 PM

After playing with the star field project... say I want to print text in the center of it, like in nyandodge - I assume the correct function call is jprint but how or where do I implement it?

 

I tried after the loop and it looks like one vline is visible with pulsating colors where the starfield would be but everything else is blank so it's doing something but definitely wrong lol which leads me to believe that the jprint function is resolution dependent perhaps and isn't set the same as the star field demo is using?

 

I also assume that I could fade-in said jprint text with a decay function for a demoscene-like credits intro? (even if the star field is already using a decay?)

 

I've done basic basic a very long time ago so feel like I'm in the right direction but just need a little basic guidance because I suck haha...



#3 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Tue Jan 17, 2017 9:09 PM

I am interested in seeing how this plays out. I am also a noob when it comes to Jaguar programing and RB+ and am in need of guidance. I have not worked with basic before. I have done scripting and I understand pretty much all of the commands RB+ uses but I too am having trouble manipulating stuff. Sporadic has done some pretty bad ass stuff and Im pretty sure hes using Raptor too. It would be nice if we could all help each other out for the betterment of jag-kind. :)

#4 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Wed Jan 18, 2017 2:07 AM

Hi, and sorry for the late response.

 

For anyone really wanting to start using rb+, I would first advise people to have a read at the "website" folder inside the rb+ package (start at index.html). Then skim through the raptor manual. A very vital part of rb+ is the file rapinit.s which contains the definitions for backgrounds, sprites, and whatever else (all called "objects").

 

If you want to change the nyancat sprite file, it's that file you need to modify. Plus, the nyancat sprite is an animated object so if you want to change it you either have to supply a new bitmap with as many frames or change the number of animation frames.

 

As for your 2nd question:

  • Yes unfortunately only bmp files are supported in rb+. And you'll need to make sure it's the same number of colours (bitplanes) as you want it to be, for example a 16 col sprite must be written as a 4-bit bmp image. Especially for 16bit images, just write them as 24-bit as the bmp spec is a bit iffy - rb+ will convert it to 16bits on its own. 

  • Swapping .mod files is no problem, they should work out of the box.

  • As for sfx, rb+ can import almost any type of audio file and convert it to raw format automatically - have a look in assets.txt.

Printing text in the starfield example might be a bit strange, as the text is being printed in the same object that the starfield is drawn, so you will probably see it disappear after a while.

 

Keep the questions coming, if possible with code and I'll process them as we go.

 

Hope this helps a bit! Don't stop tinkering and breaking stuff, it's the only way you'll learn :)


Edited by ggn, Wed Jan 18, 2017 2:10 AM.


#5 omf OFFLINE  

omf

    Dragonstomper

  • 749 posts

Posted Wed Jan 18, 2017 3:09 AM

have a look at my list editor that is posted on these threads, it will help you in creating a valid object list taking the effort away

 

 

 

1st thing I want to do is replace the nyancat with a 100x200 image

 

this is a rather grey area, the width of the object (100) is not devisable by 16 so to work properly you will need to either reduce or increase your image to be devisable by 16

 

there is also a lot of help in the object list editor and a tips section that i have been adding to that contains information that i have personally experienced and their cause and fix.

 

 

but the 1,16 for player doesn't change

im not sure where this is without looking but you may be talking about the x or y location in the rapinit.s, in which case the 16 would not do very much s these are sub pixels in which case they would need to be moved along 16 places.  i will look later and give more information



#6 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Wed Jan 18, 2017 9:23 AM

I tried to change the dog to a frog and the background to the one I have included. All of my images are the same exact size as the original images and I get these messages

Attached File  screenshot of raptor.PNG   77.97KB   4 downloads

Can I use this to edit the rapapp.s? or do I need to use notepad ++?

Attached File  obj list editor.PNG   96.66KB   3 downloads

 

Also if I CAN use the list editor to fix this, how do I load the project into it? It is not in the normal Doger directory, I have created a separate folder called frogger and have changed the .bas file name to frogger.bas


Edited by Jeffrey_Bones, Wed Jan 18, 2017 9:29 AM.


#7 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Wed Jan 18, 2017 10:59 AM

Now I have replaced the graphics but they are garbled.

As I said all of my files are the same exact size. I saved my .bmp in Photoshop as 8 bit images and I changed the setting in the list editor for each modified object to be 8 bit. I am going to try and save new images as 24 bit and see if RB+ automatically converts them to 16 bit and maybe they work that way



#8 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Wed Jan 18, 2017 11:47 AM

nyancat.bmp and _ufo.bmp are not 8bit images - they are 4bit. If your paint program cannot work with less than 8bit images then try getting hold of one. (Hint: xnview can convert images to 16,4,2,1 colours without problems).

Also: you probably mean rapinit.s? You can edit this using any text editor (well, don't use MS word or something - a plain text editor please!) or OMF's raptor list designer. If you check out the file, you'll see there that it expects images of 4 bits per pixel (BIT DEPTH field).

Edited by ggn, Wed Jan 18, 2017 11:50 AM.


#9 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Wed Jan 18, 2017 12:35 PM

nyancat.bmp and _ufo.bmp are not 8bit images - they are 4bit. If your paint program cannot work with less than 8bit images then try getting hold of one. (Hint: xnview can convert images to 16,4,2,1 colours without problems).

Also: you probably mean rapinit.s? You can edit this using any text editor (well, don't use MS word or something - a plain text editor please!) or OMF's raptor list designer. If you check out the file, you'll see there that it expects images of 4 bits per pixel (BIT DEPTH field).

right but  changed that to 8 bits. OK so I changed it back to 4 bits now and am trying to convert the image to 4 bit using xnview. when I go to export there is only an option for RLE compression and that says 4.8 bits

 

I have never used xnview before


Edited by Jeffrey_Bones, Wed Jan 18, 2017 12:36 PM.


#10 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Wed Jan 18, 2017 12:38 PM

OH SNAP I GOT IT!!!!!!!!!!!!!!!!!!!!



#11 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • Topic Starter
  • 4,293 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Wed Jan 18, 2017 1:03 PM

I haven't had much of a chance to really mess around with this yet but figured I would kind of do a jprint or jprint "HELLO WORLD" but all I get is garbled screen. WTF is the Hello World tut? ;-)

 

Seriously though, how do I print Hello World or what do I need to modify in which project folder to do such from a simple .bas text file that just says jprint "HELLO" ?

 

Are there not baseline or barebones associated .s files that just get you setup and running to possibly do something like this?

 

I've got the function list loaded up on the screen and can't help but feel a RTITLE function is in order (something that allows to display a 320x240 image for the title screen) and somehow I can envision a decay from transparency into full graphic mode into the title screen - the modern day equivalent of Hello World.

 

@JeffBones - change the graphics and values in the rapinit.s for 16bit? (or 8bit) so the image looks better?



#12 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Wed Jan 18, 2017 1:59 PM

OK so you stated that Raptor automatically converts .wav to .raw. How?



#13 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Wed Jan 18, 2017 2:17 PM

I haven't had much of a chance to really mess around with this yet but figured I would kind of do a jprint or jprint "HELLO WORLD" but all I get is garbled screen. WTF is the Hello World tut? ;-)
 
Seriously though, how do I print Hello World or what do I need to modify in which project folder to do such from a simple .bas text file that just says jprint "HELLO" ?
 
Are there not baseline or barebones associated .s files that just get you setup and running to possibly do something like this?
 
I've got the function list loaded up on the screen and can't help but feel a RTITLE function is in order (something that allows to display a 320x240 image for the title screen) and somehow I can envision a decay from transparency into full graphic mode into the title screen - the modern day equivalent of Hello World.
 
@JeffBones - change the graphics and values in the rapinit.s for 16bit? (or 8bit) so the image looks better?


Forgive me for answering with a question but: wth is a jprint? :)

Anyway, just try building/taking a look at project "print", it's got a lot of stuff happening in there. To give a few hints:

a) You need to set up basic_r_indx and basic_r_size. This sets the font and size respectively.
b) next you need to RLOCATE so you place the cursor on screen. Parameters are in pixels, not characters.
c) There are a few variants of print in rb+, each with its own merits: RPRINT will simply print a string and only that, RPRINTINT will print an integer using a really fast algorithm, and finally plain PRINT is the more flexible one that can print pretty much anything from strings to floats to concatenated stuff etc.
 

OK so you stated that Raptor automatically converts .wav to .raw. How?


Take a look at parameter "C" on a sample assets.txt file. Amongst other info you get:
 

For audio files you can use "sfx_rawXXXXX" to convert any audio file (for example .wav, .mp3, .ogg, etc) into raw format.
You can optionally set XXXXX to be the desired sample rate, otherwise 8000Hz is used by default.


[EDIT] rb_quickref.txt in the docs folder contains most of the rb+ specialised commands and information about them (mostly). If something is missing or unclear - ask away!

Edited by ggn, Wed Jan 18, 2017 2:20 PM.


#14 omf OFFLINE  

omf

    Dragonstomper

  • 749 posts

Posted Wed Jan 18, 2017 2:23 PM

I tried to change the dog to a frog and the background to the one I have included. All of my images are the same exact size as the original images and I get these messages

attachicon.gifscreenshot of raptor.PNG

Can I use this to edit the rapapp.s? or do I need to use notepad ++?

attachicon.gifobj list editor.PNG

 

Also if I CAN use the list editor to fix this, how do I load the project into it? It is not in the normal Doger directory, I have created a separate folder called frogger and have changed the .bas file name to frogger.bas

 

you realise that dodger is already imported, just select it from the project list



#15 omf OFFLINE  

omf

    Dragonstomper

  • 749 posts

Posted Wed Jan 18, 2017 2:23 PM

what frog image are you wanting to use?



#16 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Wed Jan 18, 2017 2:50 PM

what frog image are you wanting to use?

Attached File  doge.bmp   630bytes   9 downloads

 

This is where I am now. I converted the squish sound to 8000 hz in .raw format but it sounds garbled.


Edited by Jeffrey_Bones, Wed Jan 18, 2017 2:52 PM.


#17 omf OFFLINE  

omf

    Dragonstomper

  • 749 posts

Posted Wed Jan 18, 2017 5:17 PM

 

Also if I CAN use the list editor to fix this, how do I load the project into it? It is not in the normal Doger directory, I have created a separate folder called frogger and have changed the .bas file name to frogger.bas

import an existing rapinit.s file or start from scratch and make your own list



#18 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • Topic Starter
  • 4,293 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Thu Jan 19, 2017 12:19 AM

Something is very wrong outside of project folders. Even after I restore a previously working or buildable project folder, it still attempts to build old garbage data, how do I clean the slate outside of removing literally everything and reinstalling again?!

#19 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Thu Jan 19, 2017 12:24 AM

Something is very wrong outside of project folders. Even after I restore a previously working or buildable project folder, it still attempts to build old garbage data, how do I clean the slate outside of removing literally everything and reinstalling again?!

 

Delete the "build" folder inside the project folder (for example projects\print\build.



#20 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Thu Jan 19, 2017 12:30 AM

attachicon.gifdoge.bmp

 

This is where I am now. I converted the squish sound to 8000 hz in .raw format but it sounds garbled.

 

Doger uses the U-235 sound engine, so you'll have to convert the sample to raw manually. All audio programs I've tried support exporting to raw one way or the other. Before exporting make sure you convert your sample to 8 bits, signed, 8000hz (or whatever frequency you desire). Sometimes the programs support conversion during export - I'd recommend you do it yourself so you'll be sure it's done properly.



#21 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • Topic Starter
  • 4,293 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Thu Jan 19, 2017 5:54 AM

 

Delete the "build" folder inside the project folder (for example projects\print\build.

 

I'm sure I've done this and the backups I copied before even touching shouldn't have a build folder at all, and then even so, wiping the build folder still comes up with a ton of broken issues... but everything about this is possessed and I'm an idiot so I believe it's without a doubt my fault and will try again... *begins laughing hysterically* ... "He's gone mad... straight Doger! The damn thing won't load!"



#22 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Thu Jan 19, 2017 6:24 AM

Well, can you paste here what the issues are? Usually build.log in the build folder can shed a light. Also, anything bad printed on console?



#23 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • Topic Starter
  • 4,293 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Thu Jan 19, 2017 6:55 AM

After failing miserably the first 4 dozen times at really making Rb+ + VJ do anything but crash, I've nearly just tossed it in the air. Then talked to JJ about it and we were kind of going at it at the same time. He had success, I did not so much, partially I guess because I don't really use VJ as much as I do PT. (more on that in a second) Plus, even though XnView has been said to successfully convert graphics to something usable, I've still had no luck. (until later when I managed to alter something on the Chessboard in GIMP and it kept the coloring profiles and just overwrite the original graphic file, which leads me to my next issue...)

 

"If F was my middle name, it would be the chorus of the day!"

 

Building and bypassing data... I learned very quickly that just because you 'build' something with a graphic that has been replaced with the same name, it doesn't always COMPLETELY rebuild the game or project. I'm not sure why that's the case (is it supposed to make it faster?) it just seems silly that each and every single time you build that it's not going to pull all the data/assets 100%. The graphic images may have the same name but guaranteed are newer/different. Never the less... if you change the asset name and graphic file to something generic, it'll usually go through.... if it's meant to be.

 

The "HEY IDIOT!" Checklist.

 

If you want your projects to run correctly, make sure you build the same thing 3 times in a row. After the first 3 crashes, something magically happens in a different time dimension and the 4th time is a charm. I don't understand the inconsistencies with why VJ will not load the build the first 3 times in a row with zero changed between each (I just decided and also quickly learned it's not me but it's the emulator) and then magically work the 4th. What a bitch. Other people may not be nearly as persistent as me and thinking that by hitting the smash build button 12 times, something will eventually work but I'm that idiot - looks like this is the one time I was on to something.

 

The "YOU'RE STILL AN IDIOT!" Checklist.

 

If something doesn't work right after the 5th time, try disabling the Jaguar's BIOS. Not sure why it would matter but it makes a world of difference - in multiple areas. 1 it'll work and 2, in some projects, the screens will look different. I'm new to this and I don't know why this happens just know that this is added to the checklist of things I should check should it not work the first 5 times. Maybe it's always supposed to be disabled, who knows. I've read the tutorials but maybe I missed that bit of info and like many other things, don't stick unless I'm using it like with anything in life.

 

"I told you I wasn't a programmer!"

 

I'm not and while this is a step in the right direction, I can't help but feel a huge disconnect in really trying to get something up and going for the absolute beginner "Hey guys, that's me! Yo, over here!" Why when I print text on the StarField it's mirrored? I have no idea, it's probably not something I should be doing anyways but it's something I should be able to do. Unless I write it from scratch completely myself (which isn't going to happen, I can barely get text to print on the screen without hopping through other code in hopes that something will take, I can only assume it's how the screen is setup to create the starfield like that of the left or right side of the screen but without caring to know or understand why my text is fine on the right side and the rest is reversed on the left side, I'm moving on because my patience has worn thin...

 

Attached File  stars.png   76.94KB   3 downloads

 

Then I ran across this gem.... what I wanted without all the extras so I just disabled most of the extras. I would love to add a nice bassy tune but haven't gotten that far yet at this point but that's possibly the plan, if I can get it to actually work. Also as far as I can tell, the colour plus whatever number does shit, at least for text. How do I change that again? It's always yellow, or if I enable Jaguar BIOS, white. Leaves my head scratched saying WTF more times than I normally say, which is a lot...

 

Attached File  washere.png   85.32KB   3 downloads

 

I moved onto the pack project and thought there was hope in placing a graphic in place of the image.bmp like I did with the chessboard background, but no luck with that because it crashes, probably because of some graphic profile or setting in .s file because it's a different image even though I used the same one as a template. Picky AF!

 

So back to Chessboard and spidermen and seeing there's straight up an MP3 in the directory. "Maybe it's true! Maybe it really will convert oodles shit of audio to whatever the Jaguar can understand to playback my garbage audio files... " so then I do it. It works. I don't feel accomplished though, just pissed I've spent 2 days trying to overcome ignorance and my lack of understanding why everything seems broken. In all fairness a lot of it is because I'm doing idiotic things but I can't be the only one. Anyways, SpiderMan dancing to DubStep. That's something bizarre and I got it working.

 

Attached File  spid3.jpg   92.13KB   3 downloads

 

I've got questions though... believe me.

 

 

 


Edited by Clint Thompson, Thu Jan 19, 2017 7:22 AM.


#24 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • Topic Starter
  • 4,293 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Thu Jan 19, 2017 8:02 AM

Questions:

 

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?

 

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)

 

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.

 

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.

 

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



#25 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Dragonstomper

  • 938 posts
  • Location:Charlotte, NC

Posted Thu Jan 19, 2017 8:42 AM

So this is what I ended up with. I changed the nyancats to cars the pulpitos to logs and the music to the t2k track. I have no idea why the frog is only displayed at half size. I tried changeing the sprite size in the list editor but when i did that the frog was garbled. Also I have no idea what I did to the background. The original background.bmp is still showing but that file is nowhere in the assets anymore. My background shows but its in the wrong place and it looks strange

Also I noticed when the player is riding on the pulpitos he slowly slides off. Im guessing this is something in the pulpito's object set. What does the variable look like that needs to be turned off? What I mean is this is some kind of movement or collision how do I negate it in the list editor so there is no sliding and the player just rides the log?

Edited by Jeffrey_Bones, Thu Jan 19, 2017 8:50 AM.




Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users