-
Posts
190 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Gallery
Events
Store
Community Map
Everything posted by saboteur
-
No - still not right
-
So If i understand GGN's code correctly then the maps data is the start position of each graphic in the tiles bitmap. And then he's grabing each byte from that start position and pokeing it onto the blank screen placeholder ? And i would gues you could do build a collison map at the same time which would be used for checking current player position against ? My head hurts
-
DOH!
-
GGN - that's just showing off and I honestly can't get my head around it yet, but will download the project and have a butchers hook. I went off on another tack last night and thought about doing as everyone said and using a background image and then having items that require interaction being an separate image. I fell flat on my face at the first hurdle however. I lashed up an image in paint that is 320*240 @ 4bpp but I clearly am still not understanding the rapinit.s format becasue the image does not fit/fill the display. ; Backdrop Object dc.l 1 ; (REPEAT COUNTER) ; Create this many objects of this type (or 1 for a single object) dc.l is_active ; sprite_active ; sprite active flag dc.w 0,0 ; sprite_x ; 16.16 x value to position at dc.w 0,0 ; sprite_y ; 16.16 y value to position at dc.w 0,0 ; sprite_xadd ; 16.16 x addition for sprite movement dc.w 0,0 ; sprite_yadd ; 16.16 y addition for sprite movement dc.l 320 ; sprite_width ; width of sprite (in pixels) dc.l 240 ; sprite_height ; height of sprite (in pixels) dc.l is_normal ; sprite_flip ; flag for mirroring data left<>right dc.l 0 ; sprite_coffx ; x offset from center for collision box center dc.l 0 ; sprite_coffy ; y offset from center for collision box center dc.l 320/2 ; sprite_hbox ; width of collision box dc.l 240/2 ; sprite_vbox ; height of collision box dc.l BMP_BACKDROP ; sprite_gfxbase ; start of bitmap data dc.l 4 ; (BIT DEPTH) ; bitmap depth (1/2/4/8/16/24) dc.l is_RGB ; (CRY/RGB) ; bitmap GFX type dc.l is_trans ; (TRANSPARENCY) ; bitmap TRANS flag dc.l 320*240*2 ; sprite_framesz ; size per frame in bytes of sprite data dc.l 320*2 ; sprite_bytewid ; width in bytes of one line of sprite data dc.l 0 ; sprite_animspd ; frame delay between animation changes dc.l 0 ; sprite_maxframe ; number of frames in animation chain dc.l ani_rept ; sprite_animloop ; repeat or play once dc.l edge_wrap ; sprite_wrap ; wrap on screen exit, or remove dc.l spr_inf ; sprite_timer ; frames sprite is active for (or spr_inf) dc.l spr_linear ; sprite_track ; use 16.16 xadd/yadd or point to 16.16 x/y table dc.l 0 ; sprite_tracktop ; pointer to loop point in track table (if used) dc.l spr_unscale ; sprite_scaled ; flag for scaleable object dc.l %00100000 ; sprite_scale_x ; x scale factor (if scaled) dc.l %00100000 ; sprite_scale_y ; y scale factor (if scaled) dc.l -1 ; sprite_was_hit ; initially flagged as not hit dc.l no_CLUT ; sprite_CLUT ; no_CLUT (8/16/24 bit) or CLUT (1/2/4 bit) dc.l cant_hit ; sprite_colchk ; if sprite can collide with another dc.l cd_keep ; sprite_remhit ; flag to remove (or keep) on collision dc.l single ; sprite_bboxlink ; single for normal bounding box, else pointer to table dc.l 1 ; sprite_hitpoint ; Hitpoints before death dc.l 0 ; sprite_damage ; Hitpoints deducted from target dc.l 320/2 ; sprite_gwidth ; GFX width (of data) Any idea why that is incorrect ?
-
That is actualy were I think i'm headed, we'll see though. I'm just happy to get something on the screen reacting to commands at the moment Again - thanks for all the help, it's appreciated.
-
Thanks CJ - that is way slower than when i run it on this here laptop though ? Am I doing something wrong ? or is it the number of frames setting on the capture software. Yeah I agree about overload but I want to make a completable level this way then I can at least point to it and say that's done now let's make it better
-
Now with added audio POWA - see what i did there http://allwheeler.com/images/manic_abs/manic_1.abs
-
ABS file http://allwheeler.com/images/manic_1.abs
-
Thanks for the offer CJ, what do you need ? just .abs and assets or the whole project folder. WARNING : if the it's the whole project then no p*ss taking over the rats nest of code i've created so far Although there's not much to see as i've not got the jumping working yet
-
Great minds Sporadic, just implemented that in the main loop seems to do the trick at the moment. Any recomendation on capturing a video of where i'm at - I tried using VLC but got very mixed results. I want to implement jumping tonight and then i can post an .abs
-
Ran into an issue last night regarding player movement and animation. The player can move left and right no problem but I utilise a 16*16 bmp with 8 frames ( 4 for left and for 4 right ) and using a global frame counter I can cycle through the frames as required.... but it's way to fast. Anyway to slow this down ? SUB Player_Update_Position LOCAL LVAR_x%, LVAR_pad% LVAR_x=rgetobj(ID_player,R_sprite_x) ' get player's current X position LVAR_pad=getpad(1) ' get PAD1 status (from U235) rlocate 100,80 print "PLAYER DIRECTION ", player_direction, rlocate 100,100 print "FRAME ", GVAR_player_frame IF LVAR_pad=PAD_LEFT THEN ' was LEFT pressed? IF player_direction = 1 THEN IF GVAR_player_frame < 7 THEN GVAR_player_frame = GVAR_player_frame + 1 ELSEIF GVAR_player_frame = 7 THEN GVAR_player_frame = 4 ENDIF ELSEIF player_direction = 2 THEN GVAR_player_frame = 0 ENDIF player_direction = 1 IF LVAR_x<>(37<<16) THEN ' already at far-left position? LVAR_x=LVAR_x-(1<<16) ' subtract 1 from X-position endif ELSEIF LVAR_pad=PAD_RIGHT THEN ' was RIGHT pressed? IF player_direction = 2 THEN IF GVAR_player_frame < 3 THEN GVAR_player_frame = GVAR_player_frame + 1 ELSEIF GVAR_player_frame = 3 THEN GVAR_player_frame = 0 ENDIF ELSEIF player_direction = 1 THEN GVAR_player_frame = 4 ENDIF player_direction = 2 IF LVAR_x<>(300<<16) THEN ' already at far-right position? LVAR_x=LVAR_x+(1<<16) ' add 1 to X-position ENDIF ELSEIF LVAR_pad=PAD_A THEN ' was JUMP pressed? rlocate 100,120 print "JUMP PRESSED" GVAR_player_is_jump = 1 GVAR_player_x = rgetobj(ID_player, R_sprite_x) GVAR_player_y = rgetobj(ID_player, R_sprite_y) ENDIF 'rsetobj(ID_player,R_sprite_x,LVAR_x) ' store the new x-position RSETOBJ(ID_player, R_sprite_x, LVAR_x) RSETOBJ(ID_player, R_sprite_gfxbase, GVAR_player_gfx_loc + (GVAR_player_gfx_size*GVAR_player_frame)) END SUB ' exit
-
a bit further... Conveyor and crumbly platform graphics to do - then game logic... starting with jumping
-
Got to redefine some of the graphics as they a bit large but it's coming along.
-
Again, thanks for the info.
-
Yay - now where getting somewhere
-
I'll give that a bash in a bit. I've also tried using an array and that failed to return anything either, so i must be doing it wrong.
-
After some jiggery pokery i've concluded that DATA[x] doesn't read anything at all which is a bit of a head scratcher. Gonna have to try something else then
-
OK - so if i understand correctly, draw the whole cavern as an image and then calculate where the player sprite is against the x and y's of the platform on the image ?? I can see that working but how would I handle interactive platforms - E.G the ones where they crumble away ? would these be laid over the top ? As an aside to this though this is what I came up with earlier but doesn't do as expected - just dumps all the blocks in the bottom left hand corner of the screen sub display_cavern local LVAR_brick_id%, LVAR_platform_id%, LVAR_y%, LVAR_x% dim x as short LVAR_brick_id = ID_bricks LVAR_platform_id = ID_platform LVAR_x = 20 LVAR_y = 20 for x = 0 to 199 if DATA$[x] = "1" THEN rsetobj(LVAR_brick_id, R_sprite_x, (LVAR_x<<16)) ' set x-position' rsetobj(LVAR_brick_id, R_sprite_y, (LVAR_y<<16)) ' set y-position' LVAR_x = LVAR_x + 16 LVAR_brick_id = LVAR_brick_id + 1 elseif DATA[x] = "2" THEN rsetobj(LVAR_platform_id, R_sprite_x, (LVAR_x<<16)) ' set x-position' rsetobj(LVAR_platform_id, R_sprite_y, (LVAR_y<<16)) ' set y-position' LVAR_x = LVAR_x + 16 LVAR_platform_id = LVAR_platform_id + 1 elseif DATA[x] = "x" THEN ' its the end of the line so advance y and reset x' LVAR_y = LVAR_y + 16 LVAR_x = 20 elseif DATA[x] = "0" THEN ' its a blank block so advance the x position' LVAR_x = LVAR_x + 16 endif loop '1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0' data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '1' data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '2' data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '3' data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '4' data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '5' data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '6' data 1,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,2,1,x '7' data 1,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,1,x '8' data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,x '9' data 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,x '0' end sub Cheers for all the help and advice.
-
Sorry for the late reply. Thanks for that - kinda makes sense So I changed my 8*8 image to 16*16 and altered the bounding box to 8*8 and all is fine. Did some more pratting around last night - got hung up on a few things so didn't acheive as much as I wanted but i'm getting there. Hope to post a vid a little later. One thing that's been running around my head is how to store room info, I thought about storing everything in data statements ( e.g x, y, block type ) and iterating through - does this make sense ?? Another thing is all of MM's platforms are made up of multiple character blocks, but in RB+ do I have to over allocate each individual block in the rapinit.s, say 100, even though I may not use them on all levels ? Anyhoo, keep on keeping on.
-
Right i'm clearly not understanding rapinit.s properly. below are two definitions, one of a 16*16 bmp, the other of an 8*8 bmp. The 16*16 all works fine but the 8*8 is all f****d up so i'm clearly getting it wrong somewhere. Any pointers ?? cheers ; Player Lives Object dc.l 3 ; (REPEAT COUNTER) ; Create this many objects of this type (or 1 for a single object) dc.l is_active ; sprite_active ; sprite active flag dc.w 20,0 ; sprite_x ; 16.16 x value to position at dc.w 220,0 ; sprite_y ; 16.16 y value to position at dc.w 0,0 ; sprite_xadd ; 16.16 x addition for sprite movement dc.w 0,0 ; sprite_yadd ; 16.16 y addition for sprite movement dc.l 16 ; sprite_width ; width of sprite (in pixels) dc.l 16 ; sprite_height ; height of sprite (in pixels) dc.l is_normal ; sprite_flip ; flag for mirroring data left<>right dc.l 0 ; sprite_coffx ; x offset from center for collision box center dc.l 0 ; sprite_coffy ; y offset from center for collision box center dc.l 16/2 ; sprite_hbox ; width of collision box dc.l 16/2 ; sprite_vbox ; height of collision box dc.l BMP_LIVES ; sprite_gfxbase ; start of bitmap data dc.l 4 ; (BIT DEPTH) ; bitmap depth (1/2/4/8/16/24) dc.l is_RGB ; (CRY/RGB) ; bitmap GFX type dc.l is_trans ; (TRANSPARENCY) ; bitmap TRANS flag dc.l 16*16/2 ; sprite_framesz ; size per frame in bytes of sprite data dc.l 16/2 ; sprite_bytewid ; width in bytes of one line of sprite data dc.l 0 ; sprite_animspd ; frame delay between animation changes dc.l 0 ; sprite_maxframe ; number of frames in animation chain dc.l ani_rept ; sprite_animloop ; repeat or play once dc.l edge_ignore ; sprite_wrap ; wrap on screen exit, or remove dc.l spr_inf ; sprite_timer ; frames sprite is active for (or spr_inf) dc.l spr_linear ; sprite_track ; use 16.16 xadd/yadd or point to 16.16 x/y table dc.l 0 ; sprite_tracktop ; pointer to loop point in track table (if used) dc.l spr_unscale ; sprite_scaled ; flag for scaleable object dc.l %00100000 ; sprite_scale_x ; x scale factor (if scaled) dc.l %00100000 ; sprite_scale_y ; y scale factor (if scaled) dc.l -1 ; sprite_was_hit ; initially flagged as not hit dc.l 0 ; sprite_CLUT ; no_CLUT (8/16/24 bit) or CLUT (1/2/4 bit) dc.l can_hit ; sprite_colchk ; if sprite can collide with another dc.l cd_keep ; sprite_remhit ; flag to remove (or keep) on collision dc.l single ; sprite_bboxlink ; single for normal bounding box, else pointer to table dc.l 1 ; sprite_hitpoint ; Hitpoints before death dc.l 2 ; sprite_damage ; Hitpoints deducted from target dc.l 16/2 ; sprite_gwidth ; GFX width (of data) ; Objects Object dc.l 1 ; (REPEAT COUNTER) ; Create this many objects of this type (or 1 for a single object) dc.l is_active ; sprite_active ; sprite active flag dc.w 100,0 ; sprite_x ; 16.16 x value to position at dc.w 100,0 ; sprite_y ; 16.16 y value to position at dc.w 0,0 ; sprite_xadd ; 16.16 x addition for sprite movement dc.w 0,0 ; sprite_yadd ; 16.16 y addition for sprite movement dc.l 8 ; sprite_width ; width of sprite (in pixels) dc.l 8 ; sprite_height ; height of sprite (in pixels) dc.l is_normal ; sprite_flip ; flag for mirroring data left<>right dc.l 0 ; sprite_coffx ; x offset from center for collision box center dc.l 0 ; sprite_coffy ; y offset from center for collision box center dc.l 8/2 ; sprite_hbox ; width of collision box dc.l 8/2 ; sprite_vbox ; height of collision box dc.l BMP_OBJECT ; sprite_gfxbase ; start of bitmap data dc.l 4 ; (BIT DEPTH) ; bitmap depth (1/2/4/8/16/24) dc.l is_RGB ; (CRY/RGB) ; bitmap GFX type dc.l is_trans ; (TRANSPARENCY) ; bitmap TRANS flag dc.l 8*8/2 ; sprite_framesz ; size per frame in bytes of sprite data dc.l 8/2 ; sprite_bytewid ; width in bytes of one line of sprite data dc.l 0 ; sprite_animspd ; frame delay between animation changes dc.l 0 ; sprite_maxframe ; number of frames in animation chain dc.l ani_rept ; sprite_animloop ; repeat or play once dc.l edge_ignore ; sprite_wrap ; wrap on screen exit, or remove dc.l spr_inf ; sprite_timer ; frames sprite is active for (or spr_inf) dc.l spr_linear ; sprite_track ; use 16.16 xadd/yadd or point to 16.16 x/y table dc.l 0 ; sprite_tracktop ; pointer to loop point in track table (if used) dc.l spr_unscale ; sprite_scaled ; flag for scaleable object dc.l %00100000 ; sprite_scale_x ; x scale factor (if scaled) dc.l %00100000 ; sprite_scale_y ; y scale factor (if scaled) dc.l -1 ; sprite_was_hit ; initially flagged as not hit dc.l 0 ; sprite_CLUT ; no_CLUT (8/16/24 bit) or CLUT (1/2/4 bit) dc.l can_hit ; sprite_colchk ; if sprite can collide with another dc.l cd_keep ; sprite_remhit ; flag to remove (or keep) on collision dc.l single ; sprite_bboxlink ; single for normal bounding box, else pointer to table dc.l 1 ; sprite_hitpoint ; Hitpoints before death dc.l 2 ; sprite_damage ; Hitpoints deducted from target dc.l 8/2 ; sprite_gwidth ; GFX width (of data)
-
Never mind - I just animated the keys by having 8 frames but changing the coliur each time
-
Nice one Sporadic. Hope to have the first cavern layout done tonight - need to do a bit of thinking about storing layouts - but by doing 1 cavern I should come up with a plan. Also ss it possible to change the colour of a sprite - I noticed a blitter example but not sure if that will be relevant or overkill ( all of the keys on each level colour cycle ) cheers
-
Right, i've started having a bash at RB+ and decided to prat about getting a lash of Mathew Smith's classic Manic Miner. I've managed to rip the original graphics from the ZX Spectrum version and have started to throw together a few experiments and will post my progress and questions in this thread. So my first question(s) : I have my Miner Willy and a guardian moving around and animated but how do I flip them when they change direction/ reach an edge of a patrol route? Do I have to have sperate left and right images or is there a flip command ? Is there a list of RB+ commands ?? Any help appreciated.
-
OK i'm starting to plan a few things out but before I get too far into a dead end - what is the jags screen resolution ? I don't want to create graphics or placeholders X by Y and then find they are too large or small. Cheers
- 18 replies
-
- assets.txt
- rb+
-
(and 2 more)
Tagged with:
-
Ahh. never even thought of using GIMP as a pixel editor always used it for photo editing - good to know. Found a tutorial for this which may be usefull to others https://www.youtube.com/watch?v=oAaoh49yf5A Thanks for the good info ggn.
- 18 replies
-
- 3
-
-
- assets.txt
- rb+
-
(and 2 more)
Tagged with:
