Guitar hero project problems

BlitzMax Forums/BlitzMax Beginners Area/Guitar hero project problems

verfum(Posted 2008) [#1]
Hi there, okay I'm having a little fun doing a 2D style Guitar hero and I've come accross a few snags, the first one is key states, I'm using this code in the button container to detect a strum as in the key was pressed down and the threat struck.
If(m_pressed And KeyHit(KEY_ENTER)) 
	m_strummed = True;
Else
	m_strummed = False;
EndIf

This only kind of works, it works if you have the F1 pressed down and strumm the Enter but also if you have the Enter down and strum the F1?
The second problem is a note being hit variable, so if a button object successfully strumms a note object it reconds true, else if it strums nothing return false, but it return false regardless.

For Local n:Note = EachIn note_list
		
If RectsOverlap(m_x, m_y, 45, 45, n.m_x, n.m_y, 45, 45) And m_strummed = True
	m_hitNote = 1
Else If Not RectsOverlap(m_x, m_y, 45, 45, n.m_x, n.m_y, 45, 45) And m_strummed = True
	m_hitNote = 0
EndIf

next

I think I am doing something wrong there though :/

Thanks :)


Retimer(Posted 2008) [#2]
A little off-topic, but have you thought of supporting actual controllers for the game? I have some things I screwed around with a few months back to support alternate controllers for my engine, maybe you're interested..

x360 Guitar Controller (USB):
JoyDown(32) = green button
JoyDown(1) = red button
JoyDown(3) = yellow button
JoyDown(2) = blue button
JoyDown(4) = orange button
JoyDown(6) = back button
JoyDown(7) = start button

JoyHat(0) = Flipper values
JoyU(0) = Whammy values



verfum(Posted 2008) [#3]
Yeah did create another post on this, I am going to try a USB ps2 guitar and if that doesn't work I'll use a x360 controller, thanks for the codes :)


Mark Tiffany(Posted 2008) [#4]
Most (all?) keyboards have limitations on what key combinations can be pressed at the same time and detected. And each keyboard tends to be a bit different. Obviously the "normal" combinations work, but always others like f1 & return.