GoalRilla

Game development specific discussions.
Pitto
Posts: 119
Joined: Nov 19, 2012 19:58

GoalRilla

Postby Pitto » Jul 04, 2016 20:12

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

Postby Tourist Trap » Jul 07, 2016 8:55

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: 2545
Joined: Sep 25, 2005 21:54

Re: GoalRilla

Postby srvaldez » Jul 07, 2016 10:09

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

Re: GoalRilla

Postby Pitto » Jul 07, 2016 11:33

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

Postby Tourist Trap » Jul 07, 2016 12:08

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

Postby Tourist Trap » Jul 08, 2016 8:47

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: 119
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Postby Pitto » Jul 08, 2016 11:45

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

Postby Tourist Trap » Jul 08, 2016 11:49

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: 119
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Postby Pitto » Jul 14, 2016 12:38

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: 8189
Joined: May 28, 2005 3:28
Contact:

Re: GoalRilla

Postby D.J.Peters » Jul 14, 2016 19:36

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

Postby Tourist Trap » Jul 19, 2016 23:03

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: 119
Joined: Nov 19, 2012 19:58

Re: GoalRilla

Postby Pitto » Jul 20, 2016 11:25

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

Postby Lachie Dazdarian » Feb 05, 2017 17:10

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

Re: GoalRilla

Postby Pitto » Feb 15, 2017 12:48

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

Return to “Game Dev”

Who is online

Users browsing this forum: No registered users and 5 guests