Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Golf Trainer 500View game page

Train your skills in this state-of-the-art golf simulator. A tiny TweetTweetJam-9 entry in 497 characters of code.
Submitted by SkyBerron (@SkyBerron) — 1 day, 22 hours before the deadline
Add to collection

Play game

Golf Trainer 500's itch.io page

How many characters of code did you use?
497

Include your code here, if you'd like to show it off!
_set_fps(60)s=0o=0j=128f=rnd
g=cos
h=sin::_::cls(3)if(o<1)x=f(j)y=f(j)u=f(j)v=f(j)a=0z=30o=1w=f()r=2+f(4)
d=r*g(w)e=r*h(w)for i=0,63do
m=i%8*16n=i\8*16line(m-d-e,n-e+d,m,n,13)line(m-d+e,n-e-d)end
circ(u,v,2,15)?s
if o<2do
b=btn()a-=.005*((b&2)/2-(b&1))z=mid(z-(b&8)/8+(b&4)/4,80)m=z*g(a)n=z*h(a)circ(x,y,2,6)line(x,y,x+m,y+n,11)if(btnp(4))o=2b=m*.1c=n*.1
else
x+=b
y+=c
a=(b*b+c*c)^.5b+=d*a/500c+=e*a/500b*=.96c*=.96circfill(x,y,2,7)if((x-u)^2+(y-v)^2<5and a<1)s+=1o=0
if(a<.1)o=0
end
flip()goto _

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted

This is great. It feels like a complete game that clearly achieves what it set out to do. I guess it'd be good to have a number of holes (18) and a final score, but that ain't going to happen with three characters spare! Well done!

DeveloperSubmitted

Thank you! I will think about your suggestion and go for a "full" golf game. Maybe it could happen as an entry for the upcoming Pico-1k jam.

Submitted

Ooh, another Pico jam? ! I'm in! Actually, what might be achievable in 500 chars is a 'run' counter that resets when you miss a putt. Would be fun trying to get the best consecutive run of putts. 

DeveloperSubmitted

Last year, PICO-1K Jam 2023 took place in September. I don't know if it will repeat dates this year. It's a bit different approach as 1024 compressed bytes is huge compared to just 500 chars.

And yes, resetting score when missing a putt is achievable in 500 chars. I can't remember why I didn't implement it. Maybe because I found it was too difficult to chain successes with no difficulty ramp in place or because I had plans to include sfx.

Submitted

Woah, this is addictive! 😅⛳
Got to 10 then thought I'd better stop or I'll get nothing else done!
Great entry 👍

DeveloperSubmitted

I know there are other golf game entries in tweettweet jams from previous years. But I don't remember if they had the terrain slope feature or not. So now there is one. Such a simple game, but it absorbs a lot of time. Thanks! 😄

Submitted

This is a great game but I'm so bad at it. It took me 20 shots to realise there was a tilt to the ground, and even with that knowledge I only got 2 in for my next 30 goes.

DeveloperSubmitted

Thanks! Sorry, it's my fault for not explaining how the tilt indication works. Arrows indicate direction of inclination. The larger the arrows, the greater the slope. It's a bit frustrating when the distance to hole is very long, but I didn't have enough chars to include increasing distance and a difficulty ramp. Anyway, I think an average player could make a hole about a quarter of the time.