Jump to content

Captain Spazer

Members
  • Content Count

    169
  • Joined

  • Last visited

Community Reputation

86 Excellent

1 Follower

About Captain Spazer

  • Rank
    Chopper Commander

Profile Information

  • Gender
    Male
  • Interests
    Retro videogames ofcourse!
  • Currently Playing
    Mike Tyson's Punch Out & Pitfall 2

Recent Profile Visitors

3,147 profile views
  1. More improved engine: Hold the fire button when jumping and then release to shoot the ball, if it hits its mark, the background color changes indicating the ball hit the x, y position to score. Bball 0.3.binBball 0.3.bas
  2. Fixed the issue by slowing down the player. Dribbling works flawlessly now, and by pushing the joystick you can now jump with the ball to line up a shot. Source:Bball 0.2.bas Bin: Bball 0.2.bin Feel free too use the source in order to help you make your own game of basketball.
  3. Experimenting with a basketball engine, I got dribbling half-working, as long as you move left or right it works, but when you move up or down the ball won't move up and down anymore, any ideas? set kernel_option no_blank_lines player0y = 50: player0x = 50 a = 10 ballx = 80 : bally= 50 dim p1_own_ball = c dim p1_shoot_ball = d dim ball_bounce = e p1_own_ball = 0 main ballheight = 4 CTRLPF = $21 COLUBK=$86 COLUPF=$26 COLUP0=$0E if a = 10 then player0: %00000000 %00000000 %00110000 %00100000 %01010000 %01111100 %00001110 %00011100 %00011000 %00011000 %10011011 %10011100 %01011000 %00000000 %00011000 %00011000 end if a = 20 then player0: %00000000 %00000000 %00110110 %00100100 %00010010 %00010100 %00001100 %00011000 %00011000 %00011000 %10011011 %10011100 %01011000 %00000000 %00011000 %00011000 end playfield: ................................ ................................ ..X..........................X.. ..XX........................XX.. ..X..........................X.. ..X..........................X.. ..X..........................X.. ................................ ................................ ................................ ................................ end if a = 30 then a = 0 drawscreen rem PLAYER0 ANIMATION FRAME COUNTER a = a + 1 rem flip player0 sprite if b = 0 then REFP0 = 0 if b = 1 then REFP0 = 8 rem PLAYER0 CONTROLS if joy0right then player0x = player0x + 1 : b = 0 if joy0left then player0x = player0x - 1 : b = 1 if joy0up then player0y = player0y - 1 if joy0down then player0y = player0y + 1 if collision(player0,ball) && p1_own_ball = 0 then p1_own_ball = 1 : ball_bounce = 2 if p1_own_ball = 1 && b = 0 then ballx = player0x + 9 if p1_own_ball = 1 && b = 1 then ballx = player0x - 2 rem ball bounces up if p1_own_ball = 1 && bally > player0y-1 then ball_bounce = 1 rem ball bounces down if p1_own_ball = 1 && bally < player0y - 5 then ball_bounce = 2 if p1_own_ball = 1 && ball_bounce = 1 then bally = bally - 1 if p1_own_ball = 1 && ball_bounce = 2 then bally = bally + 1 goto main Source: Bball.bas Bin: Bball.bin
  4. Here is a functional tech demo code, when moving to the right, the game chooses between 4 different rooms, and the rooms remain static throughout the whole game. And it has a pretty good collision detection too. There are 3 rooms total you can move in by going to the right, head back to a previous room by going left. I am sure it can be optimized to save memory, as it's currently setup, it will require a lot of memory for a sizable map. Is there a way to have the screens share the playfield data so the game can pick from a pool of rooms without duplicating the playfields for each screen? rem Generated 06/06/2021 18:41:05 by Visual bB Version 1.0.0.554 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** set kernel_option no_blank_lines dim rand16 = z dim current_room_number = c dim p0_x = d dim p0_y = e dim room11_generator = f dim room12_generator = g dim room13_generator = h game_setup ballx = 80 : bally = 50 current_room_number = 10 room11_generator = (rand&3) + 1 room12_generator = (rand&3) + 1 room13_generator = (rand&3) + 1 setup_map main if current_room_number = 10 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX X............................... X............................... X............................... X............................... X............................... X............................... X............................... X............................... X............................... XXXXXXXXXXXXX......XXXXXXXXXXXXX end rem ROOM11 OPTIONS if current_room_number = 11 && room11_generator = 1 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ ................................ ........XXX...........XXX....... .........X.............X........ .........X.............X........ ........XXX...........XXX....... ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 11 && room11_generator = 2 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 11 && room11_generator = 3 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ .........XX..........XX......... .......XXXXXX......XXXXXX....... ......XXXXXXXX....XXXXXXXX...... .......XXXXXX......XXXXXX....... .........XX..........XX......... ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 11 && room11_generator = 4 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ....XXXXXXXXX................... ....XXXXXXXXX................... ....XXXXXXXXX................... ...................XXXXXXXXX.... ...................XXXXXXXXX.... ...................XXXXXXXXX.... ....XXXXXXXXX................... ....XXXXXXXXX................... ....XXXXXXXXX................... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end rem ROOM12 OPTIONS if current_room_number = 12 && room12_generator = 1 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ ................................ ........XXX...........XXX....... .........X.............X........ .........X.............X........ ........XXX...........XXX....... ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 12 && room12_generator = 2 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 12 && room12_generator = 3 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ .........XX..........XX......... .......XXXXXX......XXXXXX....... ......XXXXXXXX....XXXXXXXX...... .......XXXXXX......XXXXXX....... .........XX..........XX......... ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 12 && room12_generator = 4 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ....XXXXXXXXX................... ....XXXXXXXXX................... ....XXXXXXXXX................... ...................XXXXXXXXX.... ...................XXXXXXXXX.... ...................XXXXXXXXX.... ....XXXXXXXXX................... ....XXXXXXXXX................... ....XXXXXXXXX................... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end rem ROOM13 OPTIONS if current_room_number = 13 && room13_generator = 1 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ ................................ ........XXX...........XXX....... .........X.............X........ .........X.............X........ ........XXX...........XXX....... ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 13 && room13_generator = 2 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 13 && room13_generator = 3 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ................................ ................................ .........XX..........XX......... .......XXXXXX......XXXXXX....... ......XXXXXXXX....XXXXXXXX...... .......XXXXXX......XXXXXX....... .........XX..........XX......... ................................ ................................ XXXXXXXXXXXXX......XXXXXXXXXXXXX end if current_room_number = 13 && room13_generator = 4 then playfield: XXXXXXXXXXXXX......XXXXXXXXXXXXX ....XXXXXXXXX................... ....XXXXXXXXX................... ....XXXXXXXXX................... ...................XXXXXXXXX.... ...................XXXXXXXXX.... ...................XXXXXXXXX.... ....XXXXXXXXX................... ....XXXXXXXXX................... ....XXXXXXXXX................... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end CTRLPF = $31 ballheight = 8 COLUPF=$0E COLUBK=$00 scorecolor = $0E rem PLAYER CONTROLS p0_x = 0 if joy0left then p0_x = 255 if joy0right then p0_x = 1 ballx = ballx + p0_x p0_y = 0 if joy0up then p0_y = 255 if joy0down then p0_y = 1 bally = bally + p0_y if ballx > 130 then ballx = 10 : current_room_number = current_room_number + 1 : score = score + 1 if ballx < 10 then ballx = 130 : current_room_number = current_room_number - 1 : score = score - 1 if bally > 80 then bally = 10 : current_room_number = current_room_number + 10 if bally < 10 then bally = 80 : current_room_number = current_room_number - 10 drawscreen if collision(ball,playfield) then gosub knock_player_back goto main knock_player_back ballx = ballx - p0_x bally = bally - p0_y return goto main
  5. I'm having a hard time thinking this setup out. My idea is this: There is a world where each screen is a place on a grid, and there is a variable that randomly picks a playfield for each of those screens in order to build the world. At the moment, the best I can think up in terms of a setup is having a variable for each possible room on the grid, and a variable that picks out a playfield for that room, so when the player goes to that room on that grid the roompicker variable picks a playfield, then I would need another variable I am guessing that keeps track of whether the room has been visited before so the screen remains what was picked the first time the player enters the room, but it is very variable heavy, and I have yet to figure out how the game will remember if the rooms have been visited or not. dim has_room_been_visited.s dim roompicker.c dim grid_room1.d dim grid_room2.e dim grid_room3.f dim grid_room4.g dim grid_room5.h dim grid_room6.i dim grid_room7.j dim grid_room8.k dim grid_room9.l dim grid_room10.m dim grid_room11.n dim grid_room12.o dim grid_room13.p dim grid_room14.q dim grid_room15.r I have another idea too that is a little less heavy on variables: Each time the player leaves the current room, the roompicker picks a playfield, and adds 1 to the add_new_room variable and subtracts 1 to the rooms_left_to_place variable. When the rooms_left_to_place variable reaches 0, no new rooms are placed. Still, need a way to remember if room has been visited or not so it remains static and does not randomize again. dim roompicker.a dim add_new_room.b dim rooms_left_to_place.c Any thoughts, insights or ideas?
  6. Oh boy is it hard to design fatalities, so far I only have 1, when you jump kick the opponent you kick his head off and blood squirts out of the neck a few times then he collapses. I need 3 more.
  7. Thank you, very kind of you to take your time helping out!
  8. Simple and elegant! Thank you. Yes, I think you understood it correctly 😃
  9. How does this look? Experimenting with a more classical 2600 look, but trying to put in some personality and improve the walkcycle, based on the walkcycle of International Karate for the C64
  10. Hm, true. I am experimenting and I find that mono colored sprites flicker a lot.
  11. I'm having a bit of trouble with DPC+, I am making 2 big sprites for player 1 and 2 composed of 2 sprites each. Sprites 0-1 for player1 and sprites 2-3 for player 2. When I move player2's joystick sprites 2-3 are not in unison, destroying the illusion of 1 sprite by leaving a gap. What can I do? DPC_Big_Sprites.bas
×
×
  • Create New...