Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Galactic Golf - A gravity based golf game with no media

Author
Message
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 16th Apr 2004 15:45 Edited at: 16th Apr 2004 15:51
I made the gravity engine a while back and decided to make a game out of it.
Aim - to get your cube into the black hole with as little hits as possible, and as much style as possible.If your ball goes into orbit, you lose 7 lives as you must change level.
If your ball(which is a white cube) hits a star, you lose a life


Controls
left/right-change launch angle
up/down-decrease/increase power

space-Launch

shift-another level
Used when your ball goes into orbit, or the level is just too dang hard. Uses 7 lives.

My best is Level 11, With 10,957 style points(default levelset)
You get 4 lives for getting yourr ball in the hole

I'm Right and Reality is lying
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 16th Apr 2004 17:09
ummm...not exactly 20 lines but...oh well...nobody cares about what i say


Formerly known as "DarkWing Duck"
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 16th Apr 2004 17:14
o sry just noticed that.
oh well its under 500 commands neway so it could be made into a 20 liner

I'm Right and Reality is lying
Atreides
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 17th Apr 2004 20:53
there are a few lines missing ... try to make it into 20 lines and re-post it ^^

The sleeper must awaken !
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 18th Apr 2004 01:52
It should all be there now. I hope the 20 line contest will be up and running again soon.
NOTE: This code is dbpro only.

I'm Right and Reality is lying
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 18th Apr 2004 01:53
It cut it off again!!!!!

Print "Galeactic Golf" : input "Which levelset do you want to use?(default 0):",levelset : sync on : sync rate 30 : autocam off : set text font "Arial" : randomize levelset + 48 : create bitmap 1,500,500 : for t = 1 to 400
dot rnd(500),rnd(500),rgb(rnd(255),rnd(255),rnd(255)) : next t : get image 1,0,0,500,500 : set current bitmap 0 : set ambient light 20 : position camera 0,50,0 : point camera 0,0,0 : make object cube 21,1 : make object cube 22,0.4 : make object cube 23,0.4 : make object plain 24,100,100 : tries as float : position object 24,0,-10,0 : xrotate object 24,-90
texture object 24,1 : ghost object on 23 : offset limb 23,0,-0.2,0,0 : offset limb 22,0,-0.2,0,0 : color object 23,RGB(0,200,0) : gfactor as float : dim planetx(20) as float : dim planety(20) as float : dim planetr(20) as float : balls as integer
balls = 8 : level = 1 : qpow as float : x as float : y as float : xmove as float : ymove as float : global camx as float : global camy as float
planets = 5 : for t = 1 to 80 : make object cube 300+t,0.5 : color object 300+t,RGB(0,255,0) : next t : gosub MAKELand : do : for lkk = 1 to 2 : set text size 40 : Center text screen width()/2,20,"Level "+str$(level) : set text size 30 : text screen width()-180,screen height() - 30,"Points: "+str$(int(tpo#)) : text 0,screen height() - 30,"Lives: "+str$(balls) : if balls <= 0 : set text size 40 : center text screen width()/2,screen height()/2,"***Game Over***" : set text size 30 : center text screen width()/2,screen height()/2+50,"Game Ended On Level " + str$(level) + ",With " + str$(int(tpo#)) + " Style Points" : sync : wait 1000 : suspend for key : end : endif : if shiftkey() = 1 : gosub makeland
balls = balls - 7 : wait 1500 : endif : if level = 6 and lsk = 0 : lsk = 1 : gosub makeland : endif
if level = 9 and lnk = 0 : lnk = 1 : gosub makeland : endif : if level = 10 and ltk = 0 : ltk = 1 : gosub makeland : endif : if level = 11 and lwk = 0
lwk = 1 : gosub makeland : endif : if level = 12 and lmk = 0 : lmk = 1 : gosub makeland : gosub makeland : endif : position camera camx,50,camy
if leftkey() = 1 : qang = qang + 3 : endif : if rightkey() = 1 : qang = qang - 3 : endif : if upkey() = 1 : qpow = qpow + 3 : endif : if downkey() = 1 : qpow = qpow - 3 : endif : position object 22,cos(qang+180)*2,0,sin(qang+180) * 2
rotate object 22,0,-qang,0 : if qpow < 1.5 : qpow = 1.5 : endif : if qpow > 100+level * 3 : qpow = 100+level*3 : endif
scale object 22,300+qpow*20,100,100 : if spacekey() = 1 and moving = 0 : gosub erasedots : position object 23,cos(qang+180)*2,0,sin(qang+180) * 2
rotate object 23,0,-qang,0 : scale object 23,300+qpow*20,100,100 : xmove = cos(qang)*qpow/60 : ymove = sin(qang)*qpow/60
moving = 1 : rpo# = 0 : tries = tries + 1.2 : endif : if x > 50 or y > 50 or x<-50 or y <-50 : balls = balls - 1 : x = 0 : y = 0 : moving = 0 : xmove = 0 : ymove = 0 : endif : if moving = 1 : x = x + xmove : y = y + ymove : for t = 1 to planets : xk# = sin(atanfull(x-planetx(t),y-planety(t)))*(planetr(t)^2/7)/((x-planetx(t))^2+(y-planety(t))^2) : yk# = cos(atanfull(x-planetx(t),y-planety(t)))*(planetr(t)^2/7)/((x-planetx(t))^2+(y-planety(t))^2) : xmove = xmove - xk# : ymove = ymove - yk# : rpo# = rpo# + xk#*xk# + yk#*yk# : if sqrt((x-planetx(t))^2+(y-planety(t))^2)<planetr(t)/2 : x = 0 : y = 0 : moving = 0 : xmove = 0 : ymove = 0 : if t = 1 : gosub makeland : balls = balls + 4 : level = level + 1
planinc = planinc + 1 : tpo# = tpo# + rpo#*10/tries : tries = -0.2 : else : balls = balls - 1 : endif : endif : next t : endif : position object 21,x,0,y : sync : next lkk : if moving = 1 : ldot = ldot + 1 : if ldot = 81 : ldot = 1 : endif : position object 300+ldot,x,0,y : endif : loop
MAKELand:
x = 0 : y = 0 : moving = 0 : xmove = 0 : ymove = 0 : if planinc = 4 : planinc =0 : planets = planets + 1 : endif : for t = 1 to 20 : if object exist(t) : delete object t : endif : next t : nt = 1 : repeat : randomize levelset + rnd(800) : d = rnd(360)
l = rnd(20) -level/10+15 : planetx(1) = sin(d)*l : planety(1) = cos(d)*l/1.3 : planetr(1) = 4 : for t = 2 to planets : p = (rnd(360) - 180)/(rnd(level)+1)+d : l = rnd(20) -level/10+10 : planetx(t) = sin(p)*l : planety(t) = cos(p)*l/1.3 : planetr(t) = rnd(25)/2 : next t : for m = 2 to planets : if sqrt((planetx(1)-planetx(m))^2+(planety(1)-planety(m))^2)<planetr(t)/2-2 : nt = 0
endif : next m : until nt = 1 : make object sphere 1,4 : position object 1,planetx(1),0,planety(1) : color object 1,0 : for t = 2 to planets : make object sphere t,planetr(t) : position object t,planetx(t),0,planety(t) : lll = rnd(255) : color object t,rgb(255,lll,0) : next t : gosub erasedots : return
erasedots:
for t = 1 to 80 : position object t + 300,0,0,0 : next t : return

I'm Right and Reality is lying
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Apr 2004 17:23
woo! level 15 with 1222 style points this is actually a really original game, the random positions of the planets make it a little hard sometimes but other than that its great. maybe you should develop it into a ful game?

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
Mr Anderson
21
Years of Service
User Offline
Joined: 14th Oct 2003
Location: NYC
Posted: 18th Apr 2004 19:07
I believe it is incomplete as well. Missing the Sub Procs.

IDIC (Infinite Diversity Infinite Combinations)
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 19th Apr 2004 00:14 Edited at: 19th Apr 2004 00:36
Sub Procs?The code in my original post was cut off, use the one further down the page
I might make a fuller version when or if i get bored with my current project

I'm Right and Reality is lying
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 20th Apr 2004 18:09
i got to level 11 with 1608 style points .....(it was my first try...)


Formerly known as "DarkWing Duck"
kenmo
22
Years of Service
User Offline
Joined: 7th Sep 2002
Location:
Posted: 23rd Apr 2004 05:48 Edited at: 27th Jun 2012 06:30
I knew this seemed familiar: http://www.vagenisonline.com/flash/spaced.html

Cool program though, small and physics seem to work right.
LordAnki
20
Years of Service
User Offline
Joined: 22nd Apr 2004
Location:
Posted: 26th Apr 2004 04:11
-_-

u should really post DBP only in the topic so I dont waste my time trying to figure out whats wrong lol.

Anyone wanna upload the exe so i can play?
Proteus
22
Years of Service
User Offline
Joined: 4th Oct 2002
Location: The Future
Posted: 13th May 2004 18:05 Edited at: 13th May 2004 18:06
Nice little game,

got my "ball" to orbit a planet

teh game wiz
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: EWS
Posted: 15th May 2004 16:37 Edited at: 15th May 2004 16:39
hmm.... i couldnt find the hole on level 17 and my ball just kept on orbiting.
http://elliot90.tripod.com/pic.html

W0000000000000000000T
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 6th Jun 2004 02:55
well i think it thats first 20 liner with a movie trailer.
thanks guys

I'm Right and Reality is lying
Black Hydra II
20
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 6th Jun 2004 06:38
Damn you!

Just kidding. The games awesome. I just got ticked off when my ball wouldn't quit orbiting the planets on level 11. Took three minutes before I quit...

"Damn had to remake account!" direct quotation from previous account.
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 7th Jun 2004 20:55
press shift to change level.Its in the post at the top of the list
uses 7 lives

I'm Right and Reality is lying
Dynamyt
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 20th Jun 2004 00:05
w00t. i love this game! its wicked. reminds me a bit of crazy golf. make a fuller version with textures and stuff. its a great game.

P4 1.4ghz, Geforce 2 MX 400, 256mb RAM, 40gb hard disk space, Fujitsu Siemens CTM5010 Moniter (flat screen) at 1024x768, Windows XP
KOL
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 26th Jun 2004 02:10 Edited at: 26th Jun 2004 02:13
Great Game!

Don't let any one discourage you, besides, I looked at Deathstar battles, and I like your creation better...
(And It IS 20 lines)
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 27th Jun 2004 03:04 Edited at: 27th Jun 2004 03:46
Really fun game. I ran into 1 problem. using level set 1. When I reached level 11 there wasn't any gray target visible. Then on one of my launches I got stuck in an endless orbit.

I hope you plan on writing this as a full game, with sound. It really could be that good.

So far I was able to get to level 11 with leaving the power to max.
I'll see if I can top this.


UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 11th Jul 2004 20:19
i am aiming to release V2 by the end of august, so it should be done by the end of this year.

I'm Right and Reality is lying
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 11th Jul 2004 23:33
Where is the hole on level l7?

"Could you do something where you don't need a video card cause i don't have one" - Program Expert
DqP
20
Years of Service
User Offline
Joined: 20th Dec 2003
Location: |\\/|/-\\|_\'|\'/-\\
Posted: 5th Aug 2004 05:25
Where is the 10th holes

eat much pie
20
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 6th Aug 2004 00:45
sometimes the hole gets covered by a planet.

@ Uber, please fix this!


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
exaSoft
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location:
Posted: 9th Aug 2004 08:20
Lol, nice game, however my ball just kept orbitin around not in a perfect way though, i left my computer on, and like 1 hour later its still orbiting. happened on level 17 when i can't find the gray hole.

Hey what is this textbox for??? Btw, is there a way to edit my signature?
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 28th Aug 2004 05:32 Edited at: 28th Aug 2004 05:35
well in reality it would just keep orbiting too (exluding friction from interstellar gasses) and that is what the reset button is for
The Reset button is shift

I'm Right and Reality is lying
flibX0r
21
Years of Service
User Offline
Joined: 14th Feb 2003
Location: Western Australia
Posted: 18th Sep 2004 20:51
Do I get the prize for the best maintained orbit?




http://www.jellystudios.tk
Current Project: Cube3 Arena (TGC Compo Entry)
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 18th Sep 2004 22:58
nice game!!

round.. and round.. and round.. and round lol:



Do you need a complete FPS engine ?? well here it is:
http://forum.thegamecreators.com/?m=forum_view&t=38869&b=6&p=0
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 8th Dec 2004 10:15
i got to level 11 with 140 style points lol, waht am i supposed to try to get it in? i dont know where the ball/box is supposed to go so i didnt have a clue what to do

The Uknown Element Gaming Group
http://www.freewebs.com/tuegames/home.htm
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 21st Dec 2004 02:52
the levels are randomly generated, and after a while the program gives up looking for universes where planets don't intersect

I'm Right and Reality is lying
Mx5 kris
20
Years of Service
User Offline
Joined: 9th Oct 2004
Location:
Posted: 30th Dec 2004 11:04
please release version 2:S


3d meets 2d
FoxBlitzz
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 30th Dec 2004 12:43
WIth your default "level set", I can't find the hole on level 8. Anyways, it's a fun game. THe framerate is a bit inefficient though (Tried to set it to 60, only ran at 37 fps).

UNVIDIA GeFartFX 5600 Crud Edition
Featuring an unbeatable 0-1 FPS in 3DMark05!
If Return to Proxycon were a game, I would die before I saw the door open!
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 4th Jan 2005 02:40
Nice physics. If anything, I'll learn something from the maths.

UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 4th Jan 2005 06:42
Oh, well, unfortunately the maths are incorrect. they suffice, but from a physisist point of view they are lacking.

The formua i used for the effect of gravity on the ball was
[radius of the planet] / [distance from planet] ^2 * [constant]

but the correct formula is
[radius of the planet]^3 / [distance from planet] ^2 * [constant]

I'm Right and Reality is lying
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Jan 2005 08:18
So why not use the correct formula?

UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 9th Jan 2005 09:16
because i didnt realise until the game was finished, and changing them would mean changing many other values and may make the game worse.

I'm Right and Reality is lying
Bring Back the 20-Liners!!
MrModest
21
Years of Service
User Offline
Joined: 8th Nov 2003
Location: Ipswich/Norwich UK
Posted: 12th Jan 2005 01:11
only 41 style points for it cool game though. Sometimes i wish you could send it with more power

Attachments

Login to view attachments
DK_
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 28th Feb 2005 11:00
WOW! I got the ball to orbit a set of planets on level 6 about 30 times!!!! It would probably have kept going on forever if I hadn't quited. You may want to add something to monitor how long the ball travels and stop it after a while. Would be cool if you could make a 3D version two, would get more complicated.

Login to post a reply

Server time is: 2024-11-24 02:33:33
Your offset time is: 2024-11-24 02:33:33