GoalRilla

Game development specific discussions.
Post Reply
Pitto
Posts: 122
Joined: Nov 19, 2012 19:58

GoalRilla

Post by Pitto »

Hi everyone,
I wish to show you a little funny project I'm working on: GoalRilla.
It's a Gorilla.bas clone but with different rules and players, instead of gorillas there are two soccer teams. I've recycled some sprites from Jasc soccer.
For me the goal of this project is to learn better how using pointers… and less global variables
It's still in development (0.05 BETA)

Here's source code: https://github.com/Pitto/Goal-Rilla
Here's a video preview on Youtube: https://youtu.be/NCFjn2WVD3M
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: GoalRilla

Post by Tourist Trap »

Pitto wrote: Here's source code: https://github.com/Pitto/Goal-Rilla
Here's a video preview on Youtube: https://youtu.be/NCFjn2WVD3M
Hi Pitto, could you make a zip file? That's a little too much files to download I think.
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: GoalRilla

Post by srvaldez »

hello Tourist Trap
click on the clone button to download a zip file of the project
Pitto
Posts: 122
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Post by Pitto »

Hi,
thanks for the interest.
I forgot to say that to change the player you may use the mouse wheel. Pressing "D" key some debug info will appear.
I've added some minor graphical updates on sources on https://github.com/Pitto/Goal-Rilla(will appear like this: http://pasteboard.co/8AgJKG4ti.png)
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: GoalRilla

Post by Tourist Trap »

srvaldez wrote:hello Tourist Trap
click on the clone button to download a zip file of the project
Hi srvaldez, thanks for the tip!

@Pitto I'll test that in the evening.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: GoalRilla

Post by Tourist Trap »

Ahahah, this banana team version is very funny. A little like Worms +Lemmings, well done!

Pitto, how do you set the trajectory? What command?
Pitto
Posts: 122
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Post by Pitto »

Hi Tourist Trap,

the angle is calculated between position of selected player and mouse position.

line 333 of subs.bi (get_mouse(…) sub)

Code: Select all

			Ball.rds = 	_abtp(		pl(*pl_sel).x, pl(*pl_sel).y, _
									User_Mouse.x, User_Mouse.y)
rds = angle in radiants
to draw on screen trajectory see draw_trajectory() sub

I am planning to add more features such as: time limit for kicking, bonuses, PL vs PC etc ...

Thanks for the feedback.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: GoalRilla

Post by Tourist Trap »

Pitto wrote:Hi Tourist Trap,

the angle is calculated between position of selected player and mouse position.

line 333 of subs.bi (get_mouse(…) sub)

Code: Select all

			Ball.rds = 	_abtp(		pl(*pl_sel).x, pl(*pl_sel).y, _
									User_Mouse.x, User_Mouse.y)
rds = angle in radiants
to draw on screen trajectory see draw_trajectory() sub

I am planning to add more features such as: time limit for kicking, bonuses, PL vs PC etc ...

Thanks for the feedback.
Ok, it's just missing a little arrow to show it at screen. Otherwise this is really well done, no crash, fast and playable.
Pitto
Posts: 122
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Post by Pitto »

Hi all,

I've implemented some new features (as always already availables on github https://github.com/Pitto/Goal-Rilla):
  • smooth camera movement
    terrain may have custom lenght
    10 players for each team
    arrow on selected player
    white shading line along the ball trajectory
Here's a video preview: https://youtu.be/kUpZJGcG2QQ

I hope you like it. Any feedback always welcome.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: GoalRilla

Post by D.J.Peters »

Tourist Trap wrote:... how do you set the trajectory ? What command ?
in case you need a vector angle command.

Joshy

Code: Select all

const as single PI = atn(1)*4
const as single RAD2DEG = 180 / PI
const as single DEG2RAD = PI / 180

type vec2d
  as single x,y
end type

function vecDegree(byref v as const vec2d) as integer
  if (v.x = 0) andalso (v.y = 0) then 
    return 0
  elseif (v.x = 0) then
    return iif(v.y > 0 , 90 , 270)
  elseif (v.y = 0) andalso (v.x < 0) then
    return 180
  else
    dim as integer angle = atn(v.y / v.x) * RAD2DEG
    return iif(v.x < 0 , angle + 180, iif(angle<0 , angle + 360, angle))
  end if
end function

dim as integer cx,cy,mx,my,ox,oy
screenres 640,480

' get center of screen
screeninfo cx,cy : cx shr=1 : cy shr=1

while inkey()=""
  ' is mouse on screen and also the mouse coords are new ?
  if (GetMouse(mx,my)=0) andalso ((mx<>ox) or (my<>oy)) then
    dim as vec2d v=>(mx-cx,my-cy)
    var deg = vecDegree(v)
    var rad = deg*DEG2RAD
    cls
    line (cx,cy)-step(100*cos(rad),100*sin(rad)),7
    WindowTitle "deg: " & deg & " rad: " & rad
    ox=mx : oy=my ' old mouse coords = new mouse coords
  end if
  sleep 10
wend
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: GoalRilla

Post by Tourist Trap »

D.J.Peters wrote:in case you need a vector angle command.
Thanks!
Directional arroy had been added by Pitto anyway.

By the way, very nice ongoing improvements!
Pitto
Posts: 122
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Post by Pitto »

Hi Tourist Trap,
thanks for the feedback.

@D.J.Peters
Thanks for the tips, I'll implement these things soon. I really appreciate your coding style, I'll study it a bit.

Soon -as time permits- I wish improve graphics and gameplay.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: GoalRilla

Post by Lachie Dazdarian »

Work still being done on this?
Pitto
Posts: 122
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Post by Pitto »

Hi Lachie,

I've done some minor update (available in GitHub) such as different characters for each team. Now there are "Bitted apples" against "Angry Penguins".

A screenshot: http://pasteboard.co/yDh1kaXiA.png
Here's a video preview (low res): https://drive.google.com/file/d/0Bw8Kym ... sp=sharing
Post Reply