Jump to content

Photo

Help me start from scratch...


141 replies to this topic

#76 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,698 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Sun Jan 22, 2017 3:47 AM

I'm plugging stuff in randomly

 

Probably best if you understood that better :)

 

Your image is 4bpp (16 colours) - so pick a CLUT between 0 and 14 (The text/particle layer uses 15)



#77 ggn OFFLINE  

ggn

    Stargunner

  • 1,453 posts
  • Location:Athens, Greece

Posted Sun Jan 22, 2017 5:29 AM

You might find this hard to believe but this is pissing me off again...



SUB waitforplayertostart                                            ' The is the subroutine where we wait for the player to push the button.
    DO
	
	    pad1=GETPAD(1)                                        ' Read the jagpad state.
    
        IF pad1=zero_left_pad BAND Input_Pad_A THEN                                          ' If B was pressed, we can move the titles off screen and begin the game.
            RSETOBJ(title,R_sprite_y,-255<<16)
            gamestart=1                                             ' gamestart is set to 1, so the IF.. statement in the main game loop will not be true
        ENDIF                                                       '   and this sub will not be called again.
        
    LOOP UNTIL gamestart=1
END SUB
What am I doing wrong. I've changed pad1= and replaced getpad(1) with ZEROPAD(), which doesn't work, also to pad1=read_pad, which doesn't work and I've probably monkied around a few other ways. If I remove the pad1= from the IF statement and just leave that in there (which I figured wouldn't work since it's not pulling the data from an input variable like the pad1 does) it does load up, flashes the title screen and goes straight to the gameplay.


I think you mixed the input methods a bit! Try this:
 

do
    ZEROPAD()
    pad1=zero_left_pad
    if pad1 band Input_Pad_A then
      ...
Ie you call ZEROPAD, then it fills some variables like zero_left_pad which you read and test the set bits etc etc.

Edited by ggn, Sun Jan 22, 2017 5:30 AM.


#78 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Sun Jan 22, 2017 3:38 PM

I think you mixed the input methods a bit! Try this:
 


do
    ZEROPAD()
    pad1=zero_left_pad
    if pad1 band Input_Pad_A then
      ...
Ie you call ZEROPAD, then it fills some variables like zero_left_pad which you read and test the set bits etc etc.

 

 

Oh, thank God! or GGN lol....

 

seriously, thanks!



#79 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Sun Jan 22, 2017 5:30 PM

 

Probably best if you understood that better :)

 

Your image is 4bpp (16 colours) - so pick a CLUT between 0 and 14 (The text/particle layer uses 15)

ok so my magic clut number appears to be 2. It is displaying in correct colors however the image is split into 4 screens. kind of like multiplayer split screen n64. ALSO the frames are out of order. Any ideas?

 

 

EDIT-----> OK so I figured out the frames are out of order because it is reading the strip from bottom to top and not the other way around. I made a new strip and this issue is fixed but I still have multiple windows displaying the animation.

Any help here?


Edited by Jeffrey_Bones, Sun Jan 22, 2017 6:18 PM.


#80 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Sun Jan 22, 2017 6:33 PM

never mind. I added the option to scale it up and changed the scale number to 64

works perfectly now. Although I imagine its still rendering a second animation off screen in la la land towards the bottom



#81 Sporadic OFFLINE  

Sporadic

    Dragonstomper

  • 537 posts
  • Probably RB+ing
  • Location:UK

Posted Sun Jan 22, 2017 6:35 PM

ok so my magic clut number appears to be 2. It is displaying in correct colors however the image is split into 4 screens. kind of like multiplayer split screen n64. ALSO the frames are out of order. Any ideas?

 

 

EDIT-----> OK so I figured out the frames are out of order because it is reading the strip from bottom to top and not the other way around. I made a new strip and this issue is fixed but I still have multiple windows displaying the animation.

Any help here?

It sounds like you must have one/some of the object settings wrong for that one in the rapinit.s

 

And yes, anim is bottom to top


Edited by Sporadic, Sun Jan 22, 2017 6:36 PM.


#82 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Sun Jan 22, 2017 6:48 PM



#83 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Sun Jan 22, 2017 8:08 PM

Good day!

 

So, thankfully I've figured out how to make the changes (a lot easier than I had anticipated actually) for the rest of the controls and they're working - thanks again GGN!

 

If I punch in 'build doger ROM' - where does the ROM actually store at locally, because I'm not seeing it in the project or build directory.

 

With that said, I'm wondering if I'm not experiencing slowness as a result of using the Zerosquare player? and while I knew the collision wasn't exactly always right with Doger, somehow have a different version I found the root of my C drive (must have been from a few years ago) that's slightly different (no animated water) but much faster as a result and the collision actually works.

 

Here's the one I've been working with and appears to be fast then experience slowdown for a second then fast again, when moving the frog side to side:

 

Attached File  build1.png   104.9KB   2 downloads

 

Now this apparently older version is much faster and has no animated water but actually detects when you land on the squid log:

 

Attached File  build2.png   87.78KB   2 downloads

 

Is there somewhere we can get the older version or why the broken animated version is included with Raptor instead of the older one and/or what the main differences are?

 

I think I've completed most of the goals I sat out for the weekend and then some:

 

+Changed Title Screen and working successfully

+Changed Intro Music from MP3 using Zerosquare's player successfully

+Changed Controls to Zerosquare's and is working

 

Other items completed

 

+Game Over Screen (graphic) and end game music loop complete

+Music for 2 levels

+6 different versions of Frog characters

 

I didn't quite have time to insert my new frogs yet (although I have swapped out the old dog with the one that JJ has been using, thanks for that Jeff!) that is next....

 

Will be making a new goal list for the upcoming week/weekend and looking forward to TXG to join on the madness in creating his own version, as he's stated interest in doing so as well =D

 

Thanks again for all the help!


Edited by Clint Thompson, Sun Jan 22, 2017 8:09 PM.


#84 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Mon Jan 23, 2017 12:04 AM

I tried sleeping and then woke, so since I'm wide awake, decided to go through a few more things which always results in more questions - apologies!

1. rapapp.s has vidRGB set to 16 and if I change it to 24, even though my graphic properties and object definitions are changed accordingly, the screen always comes up squished to the left and really messed up looking. How do you fix this?

2. varMOD - I looked at the quick reference tutorial and didn't see it but what exactly does this do? Variable video mode that allows for possible different screen resolutions?

3. What exactly is the particle list controlling?

4. What's the difference of dc.l and dc.w or what exactly do they do specifically definition wise?

#85 ggn OFFLINE  

ggn

    Stargunner

  • 1,453 posts
  • Location:Athens, Greece

Posted Mon Jan 23, 2017 12:36 AM

If I punch in 'build doger ROM' - where does the ROM actually store at locally, because I'm not seeing it in the project or build directory.

 

 

It should appear in the project folder as "doger.rom".

 

 

With that said, I'm wondering if I'm not experiencing slowness as a result of using the Zerosquare player? and while I knew the collision wasn't exactly always right with Doger, somehow have a different version I found the root of my C drive (must have been from a few years ago) that's slightly different (no animated water) but much faster as a result and the collision actually works.

 

 

If you're talking about vj+zerosquare player slowdowns then it's a known issue with vj. Doesn't happen in the real hardware. Emulation will only get you so far I'm afraid :).

 

 

1. rapapp.s has vidRGB set to 16 and if I change it to 24, even though my graphic properties and object definitions are changed accordingly, the screen always comes up squished to the left and really messed up looking. How do you fix this?

Memory is hazy but I think that 24bit support was dropped during asset import. So you're probably seeing a 16bit image rendered as 24-bit, so it'll look squashed and weird coloured in many different ways :)

 

 

2. varMOD - I looked at the quick reference tutorial and didn't see it but what exactly does this do? Variable video mode that allows for possible different screen resolutions?
 

 

Yikes, isn't that the thing that enables CRY/RGB24 modes? Have a look at Atari's reference manual, but I'd suggest you don't play with it unless you're sure what you're doing!

 

 

3. What exactly is the particle list controlling?
 

 

If you mean RAPTOR_particle_table it's just a buffer that keeps the state of all particles as they are modified (positions, trajectories, decay etc).

 

 

4. What's the difference of dc.l and dc.w or what exactly do they do specifically definition wise?

 

DC.X (Define Constant) in general is a so called assembler directive. It simply tells the assembler to dump a value at that specific point in the binary. The most common occurrences are byte (dc.b), word (dc.w), longword (dc.l). (where byte=1 byte, word=2 bytes, longword=4 bytes). For more info check out the rmac manual (although that's probably too much for now).



#86 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Mon Jan 23, 2017 1:04 AM

what about the older build of doger? is there a link to the example file?



#87 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Mon Jan 23, 2017 1:08 AM

Is there somewhere we can get the older version or why the broken animated version is included with Raptor instead of the older one and/or what the main differences are?

 



#88 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Mon Jan 23, 2017 2:21 AM

Transferring code in RB+ :

I'm curious, so I managed to get my intro screen to work by editing the psemu example. Now I want that to be in the doger example. What I did was copy the assets over into the doger directory then added them to assets.txt. then I created a new object in rapapint for doger which was a carbon copy of the psemu code for object anim1. Although I did get a big black stall at the start of the rom it did not work? Am I doing this right or is there another way?

I made the new object number 23 which I placed above the title screen object

only the new asset has ROM at the beginning in assets.txt. I left all the other ones say ABS

It is definitely building a rom NOT an ABS

 

really think I am not doing it right

 

On a separate note, I did edit the existing title screen object and basically turn it into anim1 from psemu. It worked in that you can see the intro and its animated but the color was all wrong and it was displayed halfway off screen. I tried changing the pixels off screen that the object is drawn but this did not work, plus I never got the color right. I feel like I was on the right track when I did it this way, however I don't want to sacrifice the title screen object. I still want a title screen.

 

Anyway even if I do figure out a way, I would like to know the proper method of transferring code.  I'm learning fast but it's still a struggle.



#89 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Mon Jan 23, 2017 4:36 AM

Thanks again for all the answers GGN! Very helpful.

 

I don't care what you say, 24bit looks way better in 16bit....  ;-) (surely if it was there before, it can't be so difficult to add back in? may I make a request? =) )

 

Attached File  24bit.png   623.02KB   2 downloads



#90 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,698 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Mon Jan 23, 2017 5:16 AM

 (surely if it was there before, it can't be so difficult to add back in? may I make a request? =) )

 

the RAPTOR API does not support 24 bit.



#91 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Mon Jan 23, 2017 5:52 AM

 

the RAPTOR API does not support 24 bit.

 

Noooooo..... *echos* - can it be made to support 24-bit? I'll buy the group a pizza, if so! ;-) ...I don't mean to sound greedy but I guess I question why not really, other than bus constraints.

 

Moving on - Goals for the end of this weekend are:

 

-Implement 16bit frogs (try both 16x16 and 32x32)

        ---(it's possible I may learn more about tile mapping and increase the sprite size to allow for more playable area later)

        ---(it's also possible that that could be a pipe dream)
-Implement Game Over Screen/Music
-Implement Life Counter (3) for End Game
-End intro music for title / begin music for level 1 screen
-End in-game music / begin music for Game Over screen
-Loop back to Title Screen once Game Over screen/music ends (10 seconds)

 

I'm still soaking in all this new information and really learning just how versatile the Jaguar is. I guess I never really thought about just how special being able to set different bits to graphic images in the same resolution is. Maybe that's possible on other systems and this is nothing new at all but I just remember that not exactly being the case in the past with systems. You have 1 resolution and that's it, unless you split the screen up entirely like on the Atari 800 (text on the bottom area and a certain graphics mode on top) - forgive me if I sound ridiculous, I'm still an amateur to this.

 

With that said, here's a progress ROM with all the stuff I've added so far - even has one of the newly rendered 16-bit frogs in there (although I guess you can't really tell since it's so damn small at 16x16, which is why I'm considering changing things after looking at the Hasbro PC Frogger release and how it plays. I'm just glad it worked. =D

 

What's the fun of progress without some progress builds? Get your Frog mitts on this: Attached File  fstep12217.zip   334.34KB   4 downloads



#92 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,698 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Mon Jan 23, 2017 6:56 AM

Yes, it can be made to support 24 bit. However, it probably won't be.

 

When in 24 bit mode you can't go slapping other bit depths on top at will, everything has to be 24bit. It puts far too much constraint on the system, and it burns thru RAM at a crazy rate. And for all practical purposes, you can't tell a 24 bit image from a 16 bit image unless you are doing a gradient, which would never happen in a sprite.



#93 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Mon Jan 23, 2017 7:38 AM

Yes, it can be made to support 24 bit. However, it probably won't be.

 

When in 24 bit mode you can't go slapping other bit depths on top at will, everything has to be 24bit. It puts far too much constraint on the system, and it burns thru RAM at a crazy rate. And for all practical purposes, you can't tell a 24 bit image from a 16 bit image unless you are doing a gradient, which would never happen in a sprite.

 

Yeah, I wouldn't expect to use 24bit game play sprites, I'm referencing specifically the title/end/kill game screens. In VJ it looks like the colors fade very noticeably on my picture but it's possible it could just be the emulator at fault and not the actual image conversion and such, in which case my apologies for asking. I'll order you a pizza anyways... ;-)



#94 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Mon Jan 23, 2017 8:50 AM

Looks like I met somewhere in the middle with 28x28 frogs since 16 is too small and 32 is too big, which seem to be a little too big still so maybe 26 will be the sweet spot. Sometimes you (or in this case, me) forget they don't have to be divided or multiplied exactly down the middle, which is the beauty of it eh?

 

Different variants in place (the green one is actually 32x32 to show how huge it is) and the red one is shown as jumping , with the exception of being scaled while jumping which needs to be tacked on. Not sure why there's a black outline to the frogs since it's originally a transparent background but not sure it really matters or is that noticeable and I'm scaled up on VJ so that may make matters worse looking. Also seems to be a mirror image glitch when going left but I'm guessing there's a setting I've got to fiddle with somewhere in there to fix that.

 

Attached File  fatfrog.png   174.76KB   2 downloadsAttached File  jumpfrog.png   165.11KB   2 downloads

Attached File  bluefrog.png   164.16KB   2 downloadsAttached File  yelfrog.png   157.83KB   2 downloads


Edited by Clint Thompson, Mon Jan 23, 2017 8:57 AM.


#95 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Mon Jan 23, 2017 9:58 AM

28X28 looks really nice on the frog. Also, so you managed to get the jumping scale up to work? Im interested.....

#96 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Mon Jan 23, 2017 10:15 PM

Psychedelic Frogz man! Woa..... trippy

(WARNING! DO NOT LICK THIS FROG!)


Edited by Jeffrey_Bones, Mon Jan 23, 2017 10:16 PM.


#97 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

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

Posted Wed Jan 25, 2017 12:21 PM

Haven't had a lot of time to really tinker with much but am now questioning the SNDZEROPLAYER functions.

 

How can I stop the player from playing after the title screen and then going into a different sound once it gets to main gameplay? I tried placing the SNDZEROPLAY in the main game loop hoping that once it got to that point, after joypad button depressed on title screen, that it would just overrule the current sound being played but now instead it just plays that tune as title as well and then skips once it gets to game play.

 

I've done searching and the only thing I come up with is this, though I assume you'll run into issues once the game ends and starts over completely with counting and the order which the sounds work. Is this the only alternative way?

 

"if you dim sound_shannel as integer or UBYTE you can do something like this:"

 

 

sub play_explosion_sfx()
sound_channel ++
if sound_channel > 4 then sound_channel = 1

'play explosion
'SNDZEROPLAY chan, start_address  , len                                                   , frequency , params
SNDZEROPLAY(sound_channel, strptr(SFX_EXPLOSION), (strptr(SFX_EXPLOSION_end)-strptr(SFX_EXPLOSION)+3) and 0xfffffffc, 46168/9233, Zero_Audio_8bit_muLaw)
'|Zero_Audio_Looping
end sub

 

"then you can just do call play_explosion_sfx()  and it will play your sound from the next sound channel"

 

I did manage to replace one of the Nyancats with a car and the black border still exists even on this graphic, despite it being slightly less than the black border on the frog, it's still there. Then again, I still haven't managed to export a brand new clean image without using XnView to open the pre-existing image and pasting over it and then saving it from XnView and there's no way for me to just erase the image in XnView it seems and I don't have Paint Shop Pro 7. Why I can't do this in GIMP is frustrating.

 

Attached File  carbackwards.png   176.45KB   2 downloads



#98 ggn OFFLINE  

ggn

    Stargunner

  • 1,453 posts
  • Location:Athens, Greece

Posted Wed Jan 25, 2017 1:27 PM

When using zerosquare's player I can't remember of a way to silence a channel using a command... but you could play a small blank sample without looping. So you could (for example) do something like
 

dim silence%
silence%=0
SNDZEROPLAY(sound_channel, strptr(silence%), (strptr(silence)+4), 0, Zero_Audio_8bit_Signed)

(warning: not actually tested so it might a) not compile at all, b) not work. But hopefully you get the gist!)

As for your graphics problems: XnView is in fact not a graphics program, it's essentially a viewer that enables you to convert between formats and bit depths etc. You just open an image, then select menu "image->convert to colours", then enter how many colours you want it converted to (for example 16, 4, 2, 1 etc). Then you can use "save as" and change the format to BMP, and it that's it - your graphic will be converted to the format you need.

Paint shop pro 7 is in fact a commercial program and quite old, you probably can pick up a copy on ebay for peanuts. Gimp actually does offer paletted mode (it's called indexed mode in colours I think? can't remember. I haven't installed gimp in a long time so my memory is fuzzy). Other programs that definitely offer paletted (bitplanes) modes are Pro motion free edition and grafx 2 Maybe you could give them a shot and see if they work better for your you.


Edited by ggn, Thu Jan 26, 2017 12:34 AM.


#99 WAVE 1 GAMES OFFLINE  

WAVE 1 GAMES

    Stargunner

  • 1,093 posts
  • Location:Charlotte, NC

Posted Wed Jan 25, 2017 1:46 PM

When using zerosquare's player I can't remember of a way to silence a channel using a command... but you could play a small blank sample without looping. So you could (for example) do something like

What about a sound delay function? For example I want a jaguar sound effect playing during my intro screen, which lasts about 60 vsync refreshes before going into the title screen. Upon seeing the title screen is when I want the music to kick in, not beforehand. The reason I ask is you can do an animation delay, why not a sound one? or how?

 

Also I have my intro screen halfway working. I can get the intro screen to show then it jumps to the title screen but it only stays for like a couple of seconds then restarts. This has something to do with the loop function in the waitforplayertostart subroutine I'm sure but I don't know what.

 

Any ideas how to start the intro screen and then make it go away forever? It's in the right place and displaying correctly but no matter what I try it just wont go away. It either stays and thats all you see or it stays then goes away then comes right back

 

 

EDIT----> Also I like the example of a scroller with custom fonts for each letter character. That is very useful (and I will use that too) But I really want to scroll in a custom sprite that comes with its own effects. I guess just like a game object but its going to be text. If I use this method my text can't be animated


Edited by Jeffrey_Bones, Wed Jan 25, 2017 1:55 PM.


#100 ggn OFFLINE  

ggn

    Stargunner

  • 1,453 posts
  • Location:Athens, Greece

Posted Wed Jan 25, 2017 2:56 PM

Ok, so before continuing let's take a few moments to take off our innovation caps, put the keyboard down while I explain a few things about rb+.

rb+ brings together a lot of independent modules: the raptor library itself, the u235 sound engine, zerosquare sound engine, bcx (which translates basic code to C), gcc, rmac and rln, and perhaps more that I can't think of right now. Most of these modules are agnostic of each other: raptor has no clue what the main 68k program does, it just parses some lists and produces the gfx. Same for u235, zerosquare etc. What rb+ does is exposes functionality from all those modules into basic so they can be controlled without the user caring that much.

Now, each module was written with different specs in mind, and delivers different functionality. That's why (for example) you see so much different commands to control u235 and zerosquare's modules. Which brings us to the case of adding functionality: For rb+ itself it's impossible as it has little to no control of what the modules do (and a few of those are not open sourced). So in general to add functions not supported by the modules one would have to:

a) Get in touch with the module author (not that trivial in some cases!)
b) Ask him to add the extra feature, making a good case for it and being polite etc. At this point the request might even prove to be impossible.
c) The person would then have to implement the feature and send back a new version of the module
d) The new module would have to be swapped in, checked to see if it works as it should and tested against regressions
e) New version of rb+ committed

As you see, that's quite a tall order for even the smallest of features. So before I even embark on such a journey I have to be convinced that a request will make sense and be a good addition.



Coming back to your sound question.... why not just keep a counter of the vbls that pass and then trigger the sample yourself then?

As for the rest, sounds like stuff raptor can handle, i.e. making objects visible/invincible. Take another look at the raptor object fields and I'm sure you'll find the solution.



Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users