Jump to content
IGNORED

Trying to build a project, need help


Recommended Posts

I've sent ggn the code to reset the module.

 

And of course that didn't work :P.

 

After a lot of fiddling I did came up with a way to reset the module. I pushed an update to the repositories, so you have to get the updated rbasic.h from that for this method to work. What it boils down to is something like this:

 

        MODPLAY(0)
        SNDKILL(0)
        SNDKILL(1)
        SNDKILL(2)
        SNDKILL(3)
        VSYNC
        U235SE_modregdump[0]=0
        U235SE_modregdump[2]=0
        U235SE_modregdump[3]=0
        U235SE_modregdump[4]=0
        U235SE_modregdump[5]=0
        'Play module 2
        MODPLAY((int)strptr(Module2))
  • The first command will stop the module playing.
  • The next four will attempt to silence any samples played (some times this doesn't work, I couldn't figure out why).
  • The vsync was empirically added because I saw that this helped the code to be stable.
  • Then the U235SE's internal parameters are reset.
  • Finally the new module will start playing.

Not tested on real hardware - had to rely on VJ here. So who knows what happens!

Edited by ggn
  • Like 3
Link to comment
Share on other sites

Ok, so let's see now. I noticed that you include the code with the binary archives so I thought I'd take a peek if you don't mind.

 


	if Headturnanimframe=180 then

        MODPLAY(0)
        SNDKILL(0)
        SNDKILL(1)
        SNDKILL(2)
        SNDKILL(3)
        VSYNC
        U235SE_modregdump[0]=0
        U235SE_modregdump[2]=0
        U235SE_modregdump[3]=0
        U235SE_modregdump[4]=0
        U235SE_modregdump[5]=0	
		endif
	
	if Headturnanimframe>180 then 
		Fframe=3
	
		
	
	MODPLAY((int)strptr(MOD_ALTTSMUSIC)) 
		RSETOBJ(titlescreen,R_sprite_active,R_is_active)
		RSETOBJ(walrus,R_sprite_active,R_is_inactive)
		RSETOBJ(ingamebg,R_sprite_active,R_is_inactive)	

	endif
	if Headturnanimframe>220 then Fframe=2

Sorry, what? You're stopping the module at frame 180 and then starting it up again for 40 frames till the counter hits 220?

 

Also

 


sub move_eraser1



			MODPLAY((int)strptr(MOD_INGAMESONG)) 	
			MODVOL(15)


	RLOCATE 116,17
	PRINT "score=";score
Again: wat? You're starting up the main tune every frame ingame? How is that even supposed to work?

 

I'm not sure what happens inside the U235SE (that's for linkovitch to answer) but this is completely NOT what the guideline I posted above. I didn't say "oh please start up the mod every frame, that'll teach it a lesson, the old fool!", just "use this snippet to stop the module and then start it OCNE".

 

If I'm being a bit harsh, well, I'm getting a bit tired of "rb+ is broken" / "it's the others' fault, not mine" blame shifts. Please, do continue posting progress reports and questions, but leave the conclusions to the reader. Also, I didn't test it on a real machine but this might fix things up a bit.

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

I had changed the code since then, It reads now:

...
    if Headturnanimframe=180 then
        MODPLAY(0)
        SNDKILL(0)
        SNDKILL(1)
        SNDKILL(2)
        SNDKILL(3)
        VSYNC
        U235SE_modregdump[0]=0
        U235SE_modregdump[2]=0
        U235SE_modregdump[3]=0
        U235SE_modregdump[4]=0
        U235SE_modregdump[5]=0    
        MODPLAY((int)strptr(MOD_ALTTSMUSIC))             
        endif

    if Headturnanimframe>180 then
        Fframe=3
        RSETOBJ(titlescreen,R_sprite_active,R_is_active)
        RSETOBJ(walrus,R_sprite_active,R_is_inactive)
        RSETOBJ(ingamebg,R_sprite_active,R_is_inactive)    
    endif

and

sub move_eraser1

            MODVOL(15)

    RLOCATE 116,17
    PRINT "score=";score
    scoretimer++
    if (scoretimer=59) then
    score++
    scoretimer=0

    endif
    RSETOBJ(eraser1,R_sprite_active,R_is_active)
...

I'm sorry, I should have posted the new code after realizing that that didn't work. I'm also sorry that I don't know very much about jaguar coding.

 

walrus.bas

Link to comment
Share on other sites

I moved the instances of the mod clearing code into one gosub then I called it every time I needed it. I don't know what to do here, and I'm sorry if I sound angry but I would really like the music to work good, even though it's only my first Jaguar game. Here is the most recent ROM and the most recent BAS. I cleaned up the code a little.

stickman13b.zip

Link to comment
Share on other sites


I'm sorry, I should have posted the new code after realizing that that didn't work. I'm also sorry that I don't know very much about jaguar coding.

 

 

Nobody is accusing you of that. Nobody is perfect, and everyone started at zero knowledge. From personal experience, programming needs stubbornness and practice. I'm stubborn enough and don't want to admit defeat easily so I just keep bashing the problems till they work. When that happens then I sit down and try to find out why this works and the other thing didn't. And like I said above, it's not a crime to ask questions or report bugs. It just saves (at least me) a substantial amount of time looking for non-bugs, looking at other people's code.

 

What I'm simply asking is for people to put on some effort like I did when I was jamming everything together making rb+.

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

  • 1 month later...

Good work, and nice font. Which one of the 3 .bmp files did you change, and how were you able to change the red to green? I assume you had to delete everything in the build folder?

Depends on the font size you want to print - 8x8, 8x16 or 16x16. You don't need to delete anything from the build folder as the current versions of the font files are being used with each build.

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