Posted: Tue May 22, 2007 6:37 pm Post subject: Guitar Hero
My work-in-progress: this version has no music, no beginning or ending, nor any order to the frets hit points.
Turing:
%Guitar Hero 0.5 %By Chris Brown %Based directly on the Guitar Hero games (no sh!t) %NOT based on Frets on Fire (since I haven't played it yet) %See scoring below
%Performance/Gameplay const COMP_SPEED :=6%Resolution of movement, among else const DELAY :=20%Time (in ms) between main program loop cycles const DIFF :=50%Difficulty/spacing between consecutive fret hit nodes, low const HIT_LOC :=40%Depth, in pixels, of the fixed fret points const NODES :=20%Number of fret hit nodes const SPEED :=5%Speed, in pixels per cycle, of the fret hit nodes const maxz :=500%Depth of Z-axis
%Scoring const HIT :=1000%Increase for each good fret hit const ALMOST :=1%Slight decrease const MISS :=100%Complete miss const OVERSTRUM :=1%Decrease every time enter is held down
%Display const LINE_WIDTH :=5%Spacing between wall lines const H :=20%Height of fret hit points const W :=40%Width of fret hit points
%Misc globals - no need to change type Point2D : record
x, y :real endrecord
type Point3D : record
x, y, z :real endrecord
type Node : record
p : Point3D
n :int
t :int
hit :boolean endrecord
var keys :arraycharofboolean var score :int:=0 var song :string var mult :int:=1 var node :array1.. NODES of Node
process playSong (s :string) Music.PlayFile(s) end playSong
%Convert 3D to 2D from Point3D record fcn to2DFromPoint (threed : Point3D): Point2D
var twod : Point2D
twod.x :=maxxdiv2 + (threed.x - maxxdiv2) / (1 + (threed.z / 100))
twod.y :=maxydiv2 + (threed.y - maxydiv2) / (1 + (threed.z / 100)) result twod
end to2DFromPoint
%Convert 3D to 2D from x, y, z coordinates fcn to2D (x, y, z :real): Point2D
var twod : Point2D
twod.x :=maxxdiv2 + (x - maxxdiv2) / (1 + (z / 100))
twod.y :=maxydiv2 + (y - maxydiv2) / (1 + (z / 100)) result twod
end to2D
endif endfor put"Score: ", score, " Mult: ", mult
end draw
%Initialize array of hit nodes for i :1.. NODES
node (i).n := Rand.Int (1, 5)
node (i).p.x :=(maxx - (maxxdiv5))div5* node (i).n
node (i).p.y :=0
node (i).p.z := HIT_LOC + ((DIFF * Rand.Int (0, 3)* i)) endfor
%Execution loop cls Input.KeyDown(keys) for i :1.. NODES
%Move each node
node (i).p.z -= SPEED
%Reset appropriate nodes to back of queue in random location if node (i).p.z <= SPEED + 1then
node (i).p.z += DIFF * NODES
node (i).n := Rand.Int (1, 5)
node (i).p.x :=(maxx - (maxxdiv5))div5* node (i).n
score -= MISS
elsif keys (KEYS (node (i).n))and keys (STRUM)then ifabs(node (i).p.z - (HIT_LOC)) < sqrt(DIFF *2)then
score += HIT
node (i).p.z += DIFF * NODES
node (i).n := Rand.Int (1, 5)
node (i).p.x :=(maxx - (maxxdiv5))div5* node (i).n
else
score -= ALMOST
endif endif if keys (STRUM)then
score -= OVERSTRUM
endif endfor Time.DelaySinceLast(DELAY)
draw (1) View.Update endloop
Sponsor Sponsor
DIIST
Posted: Tue May 22, 2007 7:44 pm Post subject: Re: Guitar Hero
Visually appealing,
As for your code, you need to free up your recourses. Do not create fonts within procedural calls unless you plan on freeing them at the end. If their going to be constant leave them as global variables. Other than that good job.
Geostigma
Posted: Tue May 22, 2007 11:07 pm Post subject: RE:Guitar Hero
Impressed.
Saad
Posted: Wed May 23, 2007 6:23 am Post subject: RE:Guitar Hero
Remove the blue line background, it hurts the eyes somewhat. Other then that looks visually very good. Need to wait for gameplay
ashiphire
Posted: Wed May 23, 2007 7:11 am Post subject: RE:Guitar Hero
very interesting
lilmizeminem
Posted: Wed May 23, 2007 11:03 am Post subject: RE:Guitar Hero
this is pretty sweet.
mustve taken a while to make lol ?
Qamar
Posted: Wed May 23, 2007 3:22 pm Post subject: Re: Guitar Hero
haha this is really cool.
good stuff.
Tallguy
Posted: Thu May 24, 2007 12:04 pm Post subject: Re: Guitar Hero
Really cool
Sponsor Sponsor
tenniscrazy
Posted: Thu May 24, 2007 4:10 pm Post subject: RE:Guitar Hero
good game...its kida impossible to acually play tho, and i cant tell if i get a button or not. nice graphics tho
ZeppelinManiac
Posted: Mon May 28, 2007 8:57 am Post subject: Re: Guitar Hero
oh man, this is by far the best program on this site, try this, pick up your keyboard like a guitar, and think of it as guitar hero
lilmizeminem
Posted: Mon May 28, 2007 11:02 am Post subject: RE:Guitar Hero
haha
yeah thats what everyone should do
Metal-Head91
Posted: Thu Jun 07, 2007 11:10 pm Post subject: Re: Guitar Hero
for some reason its not working for me. it keeps giving me errors. first on the "KEY_ENTER", it says that "KEY_ENTER" was not declared than it said that "Input.KeyDown" was not on the exported list of 'Input'. and i dont know why this is happeneing...
Carey
Posted: Fri Jun 08, 2007 8:22 am Post subject: Re: Guitar Hero
You probly have an outdated version of turing
chrisbrown
Posted: Sat Jun 09, 2007 6:12 pm Post subject: Re: Guitar Hero
Newer version, still random, but getting closer to something usable. After this post, this project will be on hold while I finish more important things.
UraniumLobster
Posted: Mon Sep 10, 2007 10:02 am Post subject: RE:Guitar Hero
Thats pretty cool, all though the scoring is a bit odd... great graphics =)