mousepick / entityalpha problem...

Blitz3D Forums/Blitz3D Programming/mousepick / entityalpha problem...

Rook Zimbabwe(Posted 2005) [#1]
I have been messing with this line game idea. Sometimes I run in to a problem with setting the entity alpha... it says Entity does not exist.
I am pretty sure that it simply does not realize that the mesh in question has been moved. But it does not happen every time. Anyone know why?
Code is commented and if someone needs to use a portion of it in their game idea go staight on... I just wanna see whats done with it! :)
{{{ CODE REMOVED TO SAVE SPACE }}


RGR(Posted 2005) [#2]
The error happens when entity = not 0 and camerapick = 0 (for instance when you click somewhere into the air and not a ball) and the entity was actually deleted at last action
entity seems to be actually only a copy of the handle of a ball - delete the ball without deleting the copy will result in an error when you now refer to the not existing (copy)handle


RGR(Posted 2005) [#3]
Code removed to save space
Your meshcopying was too unpredictable - so I made some simplifications.
Now it only paints a brush and the meshes stay as they are.
Compare your code with this one - maybe it gives you some ideas how to make it uncomplcated and forseeable ;-) ?
And its 135 lines shorter
Since I don't know the rules what should happen on click (balls swap positions) - should a Ball be deleted? (was in your code on doubleclick) - now its jumping in 3 lines (what I suspect was planned?)...

EDIT What I didn't look into is what happens after pick. It was swapping meshes and should now be swapping array elements (color numbers 1 - 6) ... anyway it works without error


Rook Zimbabwe(Posted 2005) [#4]
Haven't really made the rules firmly yet... I have just been playing with an idea... 135 lines shorter!!! Dude you rock!!! I will run and run this when I get home!!!


RGR(Posted 2005) [#5]
ElseIf picker=2 And MouseY()>274 Then ; FLAG again...
This change in line 131 prevents multiple clicking on the selected ball... but kills the effect, that the balls can jump below the grey chain ...
As you see, without that, multiple clicking on the selected ball makes some funny colorchanges and jumps ... you can have several balls above and below and more doubleclicks make it even more complicated ...
Wow - with some funny rules and additional chains this could be a hit like rubiks cube ;-)

Edit Added Shininess in code above (lines 14 and 57)
Edit Adjusted colors (lines 62-64)


Rook Zimbabwe(Posted 2005) [#6]
You see how I do it sometimes... I just try something to see what is possible and then the ideas just start flowing... DO it!!! Take your idea and run with it!!! I was just thinking about doing a simple marble solitare game...

I did have a three line game I was working on... Hmmm...

Rook


RGR(Posted 2005) [#7]
Code removed to save space

What about that?
Order the colors into the random selected pattern.
Same colors are at neighbor positions...


Rook Zimbabwe(Posted 2005) [#8]
INteresting but... sometimes the first sphere I click on turns BLUE instead of popping up.

What pattern?

{{EDIT}} Ahhh I see something like a MASTERMIND puzzle here... YES!!! But it needs a better reporting system to evaluate errors maybe? {{EDIT}}

And sometmes they won't switch... I know there is a rule about that...


RGR(Posted 2005) [#9]
if a color is at the right place already you cannot select it (not switch also) - if the place you chose is wrong the sphere drops down to the bottom row.

a random generated pattern where same colors are at following positions

Hey, I made that in 1/2 an hour - I am not sure if its error free - but I detected no errors yet

Edit Right, something like Mastermind was what I had in mind... ;-)


Rook Zimbabwe(Posted 2005) [#10]
I have it!!! We could make the spheres in the correct position SOLID as well... that would help. let me see if I can tweak that...


RGR(Posted 2005) [#11]
You only have to compare in a loop for i=0 to 11 boardarea(i) with result(i) if its equal then no alpha
or test entity boardarea(calculated position) with result(calculated position)


RGR(Posted 2005) [#12]
Code removed to save space

But do we want that?
Makes it too easy ???


Rook Zimbabwe(Posted 2005) [#13]
You know you loop much better than I do... :) I solved the same problem a different and slightly chunkier way!
I don't know if it makes it too easy... Remember one of the important rules of puzzle games is: People get frustrated quickly... simplify it slightly...
This is why there are numbers in minesweeper.


RGR(Posted 2005) [#14]
;-) about the same code
And I saw the point already - it makes it less frustrating

Are you on MSN Messenger? Its easier to swap ideas that way...


Rook Zimbabwe(Posted 2005) [#15]
We wold also need a few sounds like to indicate "IN POSITION" and "ready to be reassigned" and "SUCCESS!" perhaps the most important of these is a great SUCCESS! sound that makes people fell happy and imbibes a sense of fun at the SUCCESS!!!


RGR(Posted 2005) [#16]
And there is a little error - have to find that first - sometimes a color that is in a bottomline changes if the selected color is right ???

Edit I sent you my MSN Messenger Address via EMail


Rook Zimbabwe(Posted 2005) [#17]
I have YIM here and AIM at work... sent you that!

Just playing around with things:
Trying for more of a visual punch... Sounds are needed badly... I may post some on my site as suggestions...
Let me see whats in my library of noise!


Rook Zimbabwe(Posted 2005) [#18]
I think we need to do more... any ideas??? The floor is open for suggestion!


RGR(Posted 2005) [#19]
Hi, Rook
Nice new effects :-)
I went in another direction - I did something new on the rules (gameplay).
20 spheres in a chain - with triple, double and single colors - this makes the prediction, to which row the colors have to be pushed a challenge comparable with Mastermind.
Actually I caught myself playing this "Game" over and over again... My new version is quite addictive in my view. If this has sounds and a perspective like playing several rounds for a score or reveiling a picture or anything... I'd buy our own game (LOL)

I have YIM and AIM too - not permantly running as MSN, but... could be changed... your addresses not in my post yet...

The added dreameffects look terrible in my version. I made the spheres bigger, changed the light and added support for 2 screen modes (800 / 1024). Seems there would be quite a lot of adjustment needed.

And as it seems are we the only ones, lets talk about it on IM


Rook Zimbabwe(Posted 2005) [#20]
OK my YIM is going to be sent in email as well... I apologize I put the wrong hotmail address... My name is Ralph as well so when I type Ralph I usually use a D next (my last name) and I did that... fixed that I think