Jump to content
IGNORED

Golf (Channel F)


atari2600land

Recommended Posts

  • 3 weeks later...

On the serious side... 

Perhaps you could take suggestions where we could use the already used obstacles and set these up in clever ways - for nine more holes. 
Select with buttons 1/2 how many holes you want to play? Maybe add a second player (blue) if you have a register to store the second player's score in, there's room to draw it on the right side. 
 

You could add a "click"-sound to when you hit the ball. 
You could add a compensation factor that makes the movement in X look the same as in Y. As the pixels are rectangular standing on the short end the ball moves visually further in Y than in X. 
Red on green isn't a personal favorite of mine, maybe some more blue or lt grey details in the course? Blue hole?

Allow smaller rectangles on water?

There's no difficulty if you want to hit at max power, push the button and then just wait until it reaches max, you can even go make a cup of coffee before selecting direction. Maybe it should go bezerk and hit max in a random selection or something - or mark it as a missed hit. 

 

 

I like the end screen as much as the start screen, end screen needs a melody as well, IMHO. 

Best score so far on v41: 47 - just three diagonal (those are hard to hit) shots on the last hole. 


 

  • Like 2
Link to comment
Share on other sites

Faster power meter is nice, adds some difficulty. It should do something bad/odd/strange if it reaches max and no direction has been chosen instead of letting the player press at any time after the max has appeared. 

Love the game, wish I had thought of it.   ;-)

Link to comment
Share on other sites

7 hours ago, atari2600land said:

My first attempt at an ending song. Let me know what you think. At the title screen, if you press fire in this version, it will go straight to the ending screen with a score of 00.

golf43.bin 8 kB · 0 downloads

My uneducated ear says its good. I did wonder when it first goes high then drops low whether it sounded a bit off tune, but when I let it repeat a few times I don't think it grated on me at all.

 

For 9 more holes, sand dunes in grey which halves the output of the power meter? I assume the power meter would still go to full (maybe half speed?) but go half the distance when released if you start on the sand dune to represent having to chip it out of sand.

 

(you can tell I have no clue how golf works)

Link to comment
Share on other sites

15 hours ago, e5frog said:

Perhaps you could take suggestions where we could use the already used obstacles and set these up in clever ways - for nine more holes. 

 

Allow smaller rectangles on water?

Previously I commented on Atari2600land's blog:

 

///

Which screen resolution does the Channel F have really? I've seen references to 128x64 out of about 102x58 pixels are visible, though at least my ancient version of MESS seems to generate a display that is 102x64 pixels. Would all of your game display correctly on the real system or would part of the stroke controller fall outside the visible area?

 

I assume the actual golf course is 72x52 pixels of which the water trap is 8 pixels wide and in sections of 16 pixels tall or taller? The trees also look to be 8x16 pixels. You wrote that your engine is capable of one water trap (stream/lake) and one tree, or two water traps, or two trees. I suppose with those conditions one can draw an ASCII map of each hole and easier plot where things can go.

///

 

I don't know if you or someone else can help him improve the engine to allow more or smaller obstacles. Sand traps as suggested by Mikebloke above were so far not implemented, partly because the colours weren't enough though I would imagine a dithered pattern could be used if one really desired.

 

If the above assumptions on playable area and size of obstacles are confirmed, it would be easier for others to help design interesting holes, primarily to extend the first 9.

 

I also suggested a separate putting screen like many other golf games have, but Atari2600land rightfully determined he doesn't want to have it in his game, which I fully respect.

 

Link to comment
Share on other sites

I can try to make the water smaller. I think the largest it can be is 8 pixels wide and 15 pixels high. I can also make it be a different color, like perhaps red, for a sandtrap. I don't think gray is an option since I don't know how to make it gray and the ball is white so I don't want people having trouble trying to see a white object on a light gray background.

Link to comment
Share on other sites

Sand pits in background color sounds like a good idea, also the half length hits. 
Maybe ball could be flashed slowly to blue (or change color) if it has landed in sand. 

Carlsson: 
The VRAM is 128x64 but two columns are used for palette setting, so max in theory would be 126x64 - it's however not shown on screen. Not sure what the maximum size is but MESS decided to go for 102x58, hiding a couple of rows on top and left. On a real screen it can vary probably as much as 108x60 and less than the 102x58 - atari2600land knows about the limitations and now keeps to the middle of the screen not to risk anyone not seeing stuff at the edges (chicken). ;-) 

Golf course could be bigger (wider), don't know if there are technical details with the current setup that prevents a larger playfield. They could stretch over more than one screen I guess... 
 

  • Like 1
Link to comment
Share on other sites

3 hours ago, atari2600land said:

I added sandtraps in the engine. In this version, you'll start on hole 10 (but it says hole #2) with a sandtrap to test with.

 

golf44.bin 8 kB · 0 downloads

I think this can work, the slowed down power meter is good, I'm still thinking if it goes half the distance when you hit the ball while in a sandtrap that would give you the feel of it being in a bunker but it'll be interesting to hear what other people think.

Link to comment
Share on other sites

I think you should try and make it gray, are you (still) using a finished routine to draw or your own?

In the blit routine
http://channelf.se/veswiki/index.php?title=Snippet:Blit
You set two colors, you should be able to use background and green... if you want to - if the ball is hidden in the sand pit is perhaps not a problem as the player marks the spot very well. 
Also found a bug, redraws in red there outside the sand bit. 

I believe these are the color definitions: 
red     =   $40
blue    =   $80
green   =   $00
bkg     =   $C0
clear    =    $FF


Not that anything is slow, but if you'd like to save a little processing time, use - instead of "li red ": 
lis 4 

sl 4

Same in all situations where you have $x0, and $0x is always loaded with lis and not li. 
You'll use the same amount of bytes of machine code but half a cycle less (2 instead of 2.5). It's worth the effort for often repeated code, like graphics. 

For li $FF the quicker method is
clr
com

 

The quickest method is of course to load from a register. 
lr A, "r1"  is just a single cycle - but you have to get the data from somewhere in the first place - and that's only for registers already set in ISAR or directly addressable. 

Remember that the values are latched in ports, if you loaded colors and coordinates you often don't need to load them again in a routine. 



Love the game, it will be a joy to play when it's done. 

Image1.png

Link to comment
Share on other sites

Not much feedback here on the sand pit - which was a great idea. 

I noticed I get a penalty shot when hitting into the sand pit, I assume you're aware of that (that it shouldn't).
How come the power meter moves a lot slower when in the sand? It could stop half way or result in half as long shots perhaps. 

Also noticed that the blue putter meter continues past the end of the normal power meter, about five columns...  that's new since r42.

 

The above image is not a bug, it's the red player standing in the red sand pit. 

Link to comment
Share on other sites

The red sand trap reminded me about minature golf. I'm not trying to derail this game, but I realized a miniature golf game could have all sorts of objects in various colours (up to the limit of how many individual pixels you are able to plot!) for added variation. Perhaps better to finish this golf game first and if interest exists, sketch on the possibilities for a minature golf follow-up...

Link to comment
Share on other sites

The biggest problem with many objects is detecting collision, you have to check each direction around a point or something similar. 

The out of bounds two stroke penalty isn't implemented, so wacking the ball at full speed to have it end up nicely at the edge is currently a possibility.

New score:  45 on r42  yaaay!


I have no idea about the limitations but it would be fun to stretch it out by going in a labyrinth way and combine the available elements. Some kind of challenge with optional routes... 
Added these for inspiration. 

g_nine.png.fa3ddb3d4318c7438af540cd2ff75b32.png


Just thinking about how it would be possible to add any amount and shapes of objects... 
Not sure how you handle collisions currently (I was amused by your choice of address tags though) but it would be possible to set up a lookup table for each screen.
It would be unnecessary but you could store a byte for each of the 63x43 pixels the ball can reach (2709 bytes) - you'd calculate the coordinate for where the ball is going to land and then check the table for what's there. If using half the size you'd be able to store 16 different types of indicators. So for just 24KB - you can configure any sized object - with quick lookup. 

It may not be fun to write the tables, manually though ;-)
The code for my graphics conversion could be customized to output wanted data, you'd feed it.

I was supposed to do something similar for my karate game... perhaps it deserves a revisit after some Multi-Cart building and more KHoL tampering.

Just a thought, no need to redo anything. 


BTW It could be possible to just move the hole and player start position to make new courses. 
Also... with 18 holes I think a three digit counter is needed. 
 

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

1 hour ago, atari2600land said:

How do I make gray sprites? Or by Gray do you mean white?

Background is light gray, so that's what can be used (real white can only be combined with black on a row). 

Example code: 

    ; load the colors
    li    red
    lr    2, A
    li    clear
    lr    1, A

    ; draw the sprite
    pi    blit    

You just load register 2 with "bkg" instead. 

 

    ; load the colors
    li    bkg
    lr    2, A
    li    clear
    lr    1, A

    ; draw the sprite
    pi    blit    

The object will now appear in background color (light gray) instead of red. 

Try changing the player to lt gray:

    ; draw the sprite
    pi    drawGuy
    
    ; load the colors
    li    bkg
    lr    2, A
    li    clear
    lr    1, A


;-)
 

Link to comment
Share on other sites

Love the bunker (sand trap/sand pit) restriction - perfect! Love to get this instant feedback!

 

You could add a little more color drawing several objects in different colors or use the multiblit routine, maybe a flag with the hole to make it look less miniature golf. 
For example:
0041.png.46fc3a5ea9704b7186d12db0cbece75a.png0042.png.05ab01b0be9160c6d909dab8394ffd47.png


 

I noticed the vertical setting on port 5 (upper two bits) causes a pop sound when at the top of the screen as well as when you hit it into the upper wall so to speak (it should also add two hits to the score card). It's possible to mask the upper two bits in the drawing routine to prevent this if it's not wanted.
The sound was quite fitting and nice to get that when you hit the ball. Would love it to do that every time the ball is hit. It might be enough to manipulate one or both of those bits and perhaps not necessary to use the playSong routine. 

Also noticed that when putting the hole isn't redrawn after the player is no longer visible. 


I'm off to bed, I'll keep practicing my golfing tomorrow.  :D

 

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