View Full Version : MatchUP Game
Michael Clease
04-06-2008, 12:26
I been working on a game for a little while (development stopped for various reasons) but I started work again a couple of days ago and thought it was time to share what I have at the moment.
its a bit rough at the moment but I am working on it.
Pictures are Public domain off the net.
thanks
Mike
**Update 1** Added more graphics and changed the file structure
**Update 2** Added Timer function, split script from graphics
ErosOlmi
04-06-2008, 12:33
This seems a fantastic moment for this forum.
Thanks a lot Abraxas. This game is perfect and finished. :o :o
Another TBGL Entity script!
My son will be happy. He likes those puzzle games a lot. I will just substitute images with some DragonBall or YuGiHo Cards :D
Michael Clease
04-06-2008, 12:43
Thanks for the nice comments but i do think it needs work, its not very pretty at the moment.
I do have another set of graphics they just need sorting I will add them to the first post when I have time.
Petr and Kent help with some very useful routines. thanks guys.
Michael Clease
04-06-2008, 15:05
dont download update 1 if you have already downloaded the original, it is minor changes.
wait until i finish my update tonight if i get time.
thanks
Petr Schreiber
04-06-2008, 16:14
Hi Mike,
that is perfect!
I really like it, just need more practise to not take so many attempts.
Those similar slightly rotated flowers are tricky.
Best try so far 9 attempts, 8 correct, but that was pure luck :)
Petr
ErosOlmi
04-06-2008, 16:32
I played a bit with this new nice script.
What about some transaction effect when images are clicked? Some PowerPoint effects applied to entities?
Petr, maybe I can ask as new feature? But I suppose those effects are to be placed inside the main loop of the script?
My ignorance in TBGL (OpenGL) is very vaste, sorry :(
Petr Schreiber
04-06-2008, 16:39
Hi Eros,
interesting suggestion, I was thinking of turning the cards :)
PowerPoint effects ... problem is that to compose effect in OpenGL/TBGL you have to do something different each frame.
I see it more like job for TBGL and TBEM cooperation.
If you meant fading card from silver 2 picture, it would mean do it one of the following ways:
2 entities, each has own texture and set different transparency
multitexturing ... probably :)
I will see what I can do using current TBGL resources.
Petr
Michael Clease
04-06-2008, 16:40
I will have to think about that because it uses the same tile but applies a different texture. :-\
I could use TBGL_EntitySetColor( SceneID, EntityID, R, G, B ) and make it fade in and out I suppose...
thinking now.....
ErosOlmi
04-06-2008, 16:49
I suppose just turning the cards is a great effect.
Another option I saw in other puzzle games was a background image below cards.
When you solve cards, instead of black rectagle, you show part of the background image.
Ciao
Eros
Michael Clease
04-06-2008, 17:01
A strange thing about my random number routine is if its called before I make the window is about 300 milliseconds after i make the window it is about 2000??
ErosOlmi
04-06-2008, 17:09
Sorry I do not understand the problem.
Are you referring to the following SUB?
SUB RandomLevel()
'...
END SUB
Michael Clease
04-06-2008, 17:13
If you look below where i load the textures you will find this
T1 = HiResTimer_Get
RandomLevel()
T2 = HiResTimer_Get
'MSGBOX 0, "Elapsed time in microseconds: " & FORMAT$(T2-T1, "#0")
try that before
' -- Create and show window
Dim hWnd As Dword = TBGL_CreateWindowEx("press ESC to quit", %Win_Width,%Win_Height, 32, %TBGL_WS_WINDOWED or %TBGL_WS_CLOSEBOX)
Petr Schreiber
04-06-2008, 17:17
Hi,
you mean it takes more time when called after TBGL window is created?
It is possible, as the window starts to handle events using its internal WndProc callback function( must be always ready to handle resizing and others ).
I think it is not milliseconds, but microseconds, so it is 0.0003s vs. 0.002s.
On my PC it is 0.0006 vs. 0.001 ... sometimes 0.002, that varies.
I will check if I can improve this situation.
Petr
ErosOlmi
04-06-2008, 17:20
Yes, I confirm I pass from 400 microseconds if called before the window creation and about 4000-5000 if called after.
I'm quite sure they are related to the fact the new created TBGL window start consuming CPU due to window messages.
And, as you know, in a second Windows fires thousands of messages.
ErosOlmi
04-06-2008, 17:24
What about a new function to shuffle array elements randomly?
ARRAY SHUFFLE ArrayName [, NumberOfTimes]
Its on the list.
Michael Hartlef
04-06-2008, 20:50
Nice little game you created here. :)
I been working on a game for a little while (development stopped for various reasons) ...
Mike (Abraxas), I love these type of memory games. I play the cat memory game at coding monkeys arcade all the time.
My only suggestion is keeping time to solve it. This way not only do you play to solve the game in shortest steps but in shortest time.
Thanks, I will share any image set I come up with.
@Eros, nice to see DragonBall or YuGiHo Card are popular in Italy also. When I lived in Ohio, 2 of my good friends owned a comic book shop.
It was amazing how popular DragonBall or YuGiHo Cards were/are. Glad to see it is a world wide phenomena.
sandyrepope
04-06-2008, 23:30
I love playing the game and have a suggestion for it. How about giving the game the ability to save the best 10 scores with player name?
Thanks
Sandy
Michael Clease
05-06-2008, 00:30
Thanks for the feedback guys I havent had time to work on it tonight but perhaps over the weekend I will.
I do a quick addition Kents timer.
I will split the graphics from the script in the original post to reduce download sizes ;)
updated first post.
I'm a happy camper now... its got all the elements I like and wow those coins and flowers really confuse me to make it very challenging!
Petr Schreiber
05-06-2008, 07:56
Thanks for the update,
the running time is quite motivating :)
Petr
Michael Clease
07-06-2008, 13:55
I am having problem with this script for the last two days and i was looking to see if it can repeated by anyone.
run the script as normal, click on two tiles if they match press escape, does it close ok or does it hang thinair?
run the script as again, click on two tiles if they dont match press escape, does it close ok or does it hang thinair?
mine is hanging and thinair is using about 50% cpu all i can do is close thinair.
this is not seen outside of thinair???
change these 2 lines to make life easier ( BuildSceneLevel)
' tbgl_EntitySetTEXTURE ( Scene, Counter, 18)
tbgl_EntitySetTEXTURE ( Scene, Counter, bLevel(Counter) )
Michael Clease
07-06-2008, 14:02
Please ignore previous post it was a setting in thinair
Span GUI syncronously needs to be turned off (for me) not even sure exactly what it does?
thanks
efly2020
17-09-2008, 23:43
Hello.
So that I could begin to learn thinBasic,
I choose to modify the MatchUp game.
It's a race to beat the clock.
Nice twist to the game efly2020, thanks.