Game Programming and Development Tools

Tic-Tac-Toe – Lazarus

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
This is supposed to be a progress report on the game I'm attempting to create using Euphoria and Allegro.

*In an attempt to help the other attempt to bring back the "Coding" part of Christian Coders Network. *

11/30/06 Downloaded the Allegro library and got it installed properly on my system. Also got a rough outline of the program started - screenshot of which is in that other thread.
Much studying of Allegro examples... then a little coding - then more studying.

I got stuck at one point on trying to make the mouse cursor appear.
I was using show_mouse(buffer) instead of show_mouse(Screen)

Then I found myself unable to get the position of the cursor - turns out I needed to use peek4u() on the mouse_x and mouse_y variables.

12/01/06 Added a few more lines to make it actually look like Tic-Tac-Toe and started filling in more code for getting the player's input.

if (peek4u(mouse_b) = 1) then
putpixel(buffer, peek4u(mouse_x), peek4u(mouse_y), makecol(0, 255, 0))
end if
Testing for mouse clicks turned out to be fairly easy - with a putpixel() function being called to make sure it was working correctly.

The last thing I did to the source code since then was add a procedure to scan through the (x,y) position of the mouse cursor in order to determine which tic-tac-toe box it was inside of.
Fairly easy again, since I'd done that same thing once before with a periodic table program.

That about sums it up so far.

(If you've read this far, I congratulate you. )

More status reports in the days ahead.

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
I'm sorry, but I'm not understanding what your saying due to my small knowledge of other languages. What language is this? Is this Euphoria with the Allegro Library, or are the both Librarys or what?

Edit: GAh!!!!! Post soon!!!!! The mark of the beast is upon you. Not the talking beast, the devil's mark! :runs around in circles:
------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

[This message has been edited by Mene-Mene (edited December 03, 2006).]

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
Euphoria programming language, Allegro graphics library. 2D games are still alive!

The mark of the what?!

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Sighs deeply... Oh is that what your talking about. I have pretty much only done 2d, very little 3d. The Mark of the Beast, your post count was 666 which is the number of the Beast, the devil.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto