Jump to content

Photo

Mastermind for INTV


18 replies to this topic

#1 vprette OFFLINE  

vprette

    Stargunner

  • 1,340 posts

Posted Fri Nov 7, 2014 6:08 AM

my next project :-)

 

early stage

 

M1

Edited by vprette, Fri Nov 7, 2014 6:10 AM.


#2 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,002 posts
  • Location:NC

Posted Sat Nov 8, 2014 10:22 AM

Will this have an ICE level?



#3 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Sat Nov 8, 2014 10:27 AM

Will this have an ICE level?

 

probably not



#4 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Sat Nov 8, 2014 10:28 AM

title screen

 

M2


#5 freewheel OFFLINE  

freewheel

    River Patroller

  • 2,861 posts

Posted Sat Nov 8, 2014 12:58 PM

Will this have an ICE level?

 

I already gave you one and I don't recall any thanks. :(

 

Although your persistence did give me the inspiration for an entire game framework, so I can't give you too much grief. :P



#6 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,002 posts
  • Location:NC

Posted Sat Nov 8, 2014 1:11 PM

 

I already gave you one and I don't recall any thanks. :(

 

Although your persistence did give me the inspiration for an entire game framework, so I can't give you too much grief. :P

 

 

Wha???    Did I miss it?    My memory must be going!!!!!

 

Link?



#7 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,767 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Sat Nov 8, 2014 3:57 PM

 

 

Wha???    Did I miss it?    My memory must be going!!!!!

 

Link?

 

Check it out.



#8 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Mon Nov 10, 2014 9:04 AM

something strange:

 

I try to read 4 inputs (limited to 1-6 range) from the controller, but as soon as I hit the keypad first time, all the 4 values on the matrix seqpo(ii) are filled by this unique value and the program call "exit"

 

ii=1

 

leggi_seq_orig:

gosub hit2
if tasto <7 then seqpo(ii)=tasto:ii=ii+1
wait
rem if ii>4 goto exit
goto leggi_seq_orig

 

 

hit2: procedure
tasto=15
wait
IF CONT2.KEY=1 or CONT1.KEY=1 THEN tasto=1
IF CONT2.KEY=2 or CONT1.KEY=2 THEN tasto=2
IF CONT2.KEY=3 or CONT1.KEY=3 THEN tasto=3
IF CONT2.KEY=4 or CONT1.KEY=4 THEN tasto=4
IF CONT2.KEY=5 or CONT1.KEY=5 THEN tasto=5
IF CONT2.KEY=6  or CONT1.KEY=6 THEN tasto=6
IF CONT2.KEY=7  or CONT1.KEY=7 THEN tasto=7
IF CONT2.KEY=8 or CONT1.KEY=8 THEN tasto=8
IF CONT2.KEY=9 or CONT1.KEY=9 THEN tasto=9
return
end


Edited by vprette, Mon Nov 10, 2014 9:05 AM.


#9 5-11under ONLINE  

5-11under

    River Patroller

  • 3,140 posts
  • Location:Ontario, Canada

Posted Mon Nov 10, 2014 9:14 AM

Is it because you're not waiting for the key to be released?



#10 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 703 posts
  • Location:Japan

Posted Mon Nov 10, 2014 9:25 AM

something strange:

 

I try to read 4 inputs (limited to 1-6 range) from the controller, but as soon as I hit the keypad first time, all the 4 values on the matrix seqpo(ii) are filled by this unique value and the program call "exit"

 

ii=1

 

leggi_seq_orig:

gosub hit2
if tasto <7 then seqpo(ii)=tasto:ii=ii+1
wait
rem if ii>4 goto exit
goto leggi_seq_orig

 

 

hit2: procedure
tasto=15
wait
IF CONT2.KEY=1 or CONT1.KEY=1 THEN tasto=1
IF CONT2.KEY=2 or CONT1.KEY=2 THEN tasto=2
IF CONT2.KEY=3 or CONT1.KEY=3 THEN tasto=3
IF CONT2.KEY=4 or CONT1.KEY=4 THEN tasto=4
IF CONT2.KEY=5 or CONT1.KEY=5 THEN tasto=5
IF CONT2.KEY=6  or CONT1.KEY=6 THEN tasto=6
IF CONT2.KEY=7  or CONT1.KEY=7 THEN tasto=7
IF CONT2.KEY=8 or CONT1.KEY=8 THEN tasto=8
IF CONT2.KEY=9 or CONT1.KEY=9 THEN tasto=9
return
end

 

Like 5-11under said, you need to wait for a key release.

 

Add a routine like this:

wait_for_release: PROCEDURE
  release_count ~ 0
wr_loop:
  WAIT
   IF CONT2.KEY=12 AND CONT1.KEY=12 THEN release_count = release_count+1 ELSE release_count= 0
   if release_count < 20 then goto wr_loop
 END

And then call it from here:

 

leggi_seq_orig:

gosub hit2
if tasto <7 then seqpo(ii)=tasto:ii=ii+1

gosub wait_for_release
wait
rem if ii>4 goto exit

 

 

I haven't tested this...

 

 

Catsfolly


Edited by catsfolly, Mon Nov 10, 2014 9:27 AM.


#11 5-11under ONLINE  

5-11under

    River Patroller

  • 3,140 posts
  • Location:Ontario, Canada

Posted Mon Nov 10, 2014 9:41 AM

Sometimes I do the wait-for-keypress-release routine just before going into the wait-for-keypress routine.



#12 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,767 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Mon Nov 10, 2014 9:51 AM

Sometimes I do the wait-for-keypress-release routine just before going into the wait-for-keypress routine.


That's a good pattern to follow if you need to ensure new input from the player. For instance, in menu selection, where you want to guarantee a new selection and discard any current buffered value from a previous input.

#13 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Tue Nov 11, 2014 8:40 AM

Like 5-11under said, you need to wait for a key release.

 

Add a routine like this:

wait_for_release: PROCEDURE
  release_count ~ 0
wr_loop:
  WAIT
   IF CONT2.KEY=12 AND CONT1.KEY=12 THEN release_count = release_count+1 ELSE release_count= 0
   if release_count < 20 then goto wr_loop
 END

And then call it from here:

 

leggi_seq_orig:

gosub hit2
if tasto <7 then seqpo(ii)=tasto:ii=ii+1

gosub wait_for_release
wait
rem if ii>4 goto exit

 

 

I haven't tested this...

 

 

Catsfolly

 

many many thanks



#14 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Tue Nov 11, 2014 10:53 AM

game is now 50%

 

when you guess the sequence, you will have black * = number or correct pawn in correct position and white * = correct pawn in wrong position

 

I know of a bug that miss the calculation after 3rd sequence and always show 0 and 0.. working on that

 

M3

Attached Files


Edited by vprette, Tue Nov 11, 2014 11:08 AM.


#15 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,767 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Tue Nov 11, 2014 11:59 AM

Here's my feedback:

  • Sometimes key presses are not registered and I have to press the key multiple times for it to be detected.  This is especially so when I want to use the same colour peg multiple times.
  • The input is so flakey, it gets in the way of playing.
  • I don't understand the key peg sequences, I think they are wrong.  Take a look at the attached screenshot:  the same sequence repeated multiple times yields different key peg combinations.
  • Shouldn't there be 4 key pegs, one for each position?  I guess it shows the number of either black or white pegs.

shot0000.gif



#16 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Tue Nov 11, 2014 12:41 PM

Here's my feedback:

  • Sometimes key presses are not registered and I have to press the key multiple times for it to be detected.  This is especially so when I want to use the same colour peg multiple times.
  • The input is so flakey, it gets in the way of playing.
  • I don't understand the key peg sequences, I think they are wrong.  Take a look at the attached screenshot:  the same sequence repeated multiple times yields different key peg combinations.
  • Shouldn't there be 4 key pegs, one for each position?  I guess it shows the number of either black or white pegs.

attachicon.gifshot0000.gif

 

for some reason that I need to find from the 3rd sequence the values are miss calculated, so only seq 1 and 2 work for now :-)

for the buttons I notice the same: it started when I introduced the gosub wait_for_release from above, so something must be optimized

you need to find the sequence of 6 possible colors

key pegs on the right show: right color in right position (black) and right color in wrong position (white)


Edited by vprette, Tue Nov 11, 2014 12:42 PM.


#17 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Tue Nov 11, 2014 1:57 PM

fixed!!

 

the slow button feedback is still there, but the game logic is in now

 

70% ready

Attached Files


Edited by vprette, Tue Nov 11, 2014 1:58 PM.


#18 vprette OFFLINE  

vprette

    Stargunner

  • Topic Starter
  • 1,340 posts

Posted Tue Nov 11, 2014 4:01 PM

I also fixed the button response

 

and this is the final version I distribute to all

 

instructions:

find a sequence of 4 colors

each choice is between 6 colors(keypad 1-6)

at the right side you see a black * = number of correct colors in correct position

and a white * = number of correct colors in wrong position in the sequence

 

game also store the record (less sequences used before finding the solution

 

hit disc at the end to restart

 

I hope you like the game

 

 

Attached Files



#19 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,767 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Tue Nov 11, 2014 6:25 PM

I managed to beat it once.  But I think there's still a problem with the key pegs code:  sometimes the responses to consecutive inputs is not congruent.  The input problems were corrected, though.

 

I'll keep playing to see if I can find a specific pattern that doesn't work.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users