[TPE1] HexaSweeper (Alpha 0.3.1)

Show off your games, demos and other (playable) creations.
User avatar
pakoskyfrog
Citizen
Posts: 62
Joined: Mon Feb 04, 2013 12:54 pm
Location: France

[TPE1] HexaSweeper (Alpha 0.3.1)

Post by pakoskyfrog »

To train myself, I decided to participate in the Themed Project Event.
So, i have a month to make my game ! ^^

I don't have any cool name, just an idea : a sweeper-like in an hexagonal grid.
There will be at first a simple mode with the regular rules, and if i got enough time left, I'll add some alternate modes.

Here is the link to the git repo : https://github.com/pakoskyfrog/HexaSweeper. I will post here the advancements and some screenshots.

So... ready, steady, ... Code ! :D

ALPHA 0.3.1 Released !

Some Screens :
The main menu with its own dynamic background...
Image

The game itself, with the HUD, the pause menu and the zoom :
ImageImageImage

A word about the controls :
You can zoom in and out with the mouse wheel.
Left click to search a case
Right click to flag a case (none, bomb, interrogation)
Middle click to activate the case and all neighbors of it EXCEPT the flagged ones (be careful with this, i lost a lot of games... but it's still very useful !)

UPDATES in Alpha 0.2 :

A complete high score management system has been integrated.
Fonts for the HUD and the main menu
You can now restart a new game with the same setup as the current one.

And here is some screen shots !
Image Image Image


UPDATES in Alpha 0.3 :

A second game mode is available !
"Alchemist" : you have to find all the good plants and avoid being eaten by the carnivorous ones...
Green spots indicate good plants
Red spots indicate bad plants
Yellow spots indicate that there are both around

There is a screen from this new mode :
Image

minor update : some bugs fixed
- can't die at first click anymore \o/
- high scores are kept up to a list of length 10 in the file
- and a few little things ^^
Attachments
HexaSweeper_alpha_0.31.love
HexaSweeper by Pakoskyfrog Alpha 0.3.1
(1.53 MiB) Downloaded 312 times
HexaSweeper_alpha_0.2.love
HexaSweeper by Pakoskyfrog Alpha 0.2
(1.44 MiB) Downloaded 259 times
Last edited by pakoskyfrog on Thu Feb 14, 2013 11:14 pm, edited 6 times in total.
User avatar
pakoskyfrog
Citizen
Posts: 62
Joined: Mon Feb 04, 2013 12:54 pm
Location: France

Re: [TPE1] HexaSweeper

Post by pakoskyfrog »

UPDATE 3 :

Still working on the grid, it can now tell you how trapped are the surroundings !

Image
Or, for a bigger area :
Image

Next step is to calculate the (u;v) coordinates under the click, then make this playable !
User avatar
pakoskyfrog
Citizen
Posts: 62
Joined: Mon Feb 04, 2013 12:54 pm
Location: France

Re: [TPE1] HexaSweeper

Post by pakoskyfrog »

UPDATE 4 :

'Where do i click' function resolved !
here is the recognition of the pure grid, just with the (u,v) system.
u is the base vector going down at -pi/6 and v at pi/6, center to center.
this (u,v) coordinate system is ideal to deal with hexagonal grids
Image
But since it's a vectorial generated space, the tiles of the grids are parallelograms !
So we need a correction to adapt it to real hexagonal lattice :
(if anyone needs an explanation, just ask :) )
Image

The colored points are done with a 2D scan simulating many clicks, the color is made of RVB={u,v,0}

With that done i can focus on the game itself, make it playable with a simple HUD ^^
I will concentrate first on the gameplay, keeping graphics and effects for later.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [TPE1] HexaSweeper

Post by kikito »

This looks very nice, keep up the good work!

The "colored image for detecting mouse presses" made me chuckle a bit. It'll burn a bit of memory, but it's certainly straightforward. Just make sure antialiasing is deactivated on your "mouse detection canvas", otherwise you will get weird results near each cell's borders.
When I write def I mean function.
User avatar
pakoskyfrog
Citizen
Posts: 62
Joined: Mon Feb 04, 2013 12:54 pm
Location: France

Re: [TPE1] HexaSweeper

Post by pakoskyfrog »

@ Kikito
Yep, it's VERY consuming ^^
but it was only for the development of my function, it is activated only if i press "v", and is is only accessible if the application is in debug mode !
I prefer make this kind of little visual functions, instead of clicking around and see what happens...
Thanks for the support !

A little update :
The game is playable \o/, i just need to add a HUD and tweak the gameplay and i'll be able to release an alpha version :D
User avatar
Zer0
Citizen
Posts: 59
Joined: Sat Oct 06, 2012 9:55 am
Location: Sweden
Contact:

Re: [TPE1] HexaSweeper

Post by Zer0 »

This is pretty awesome, I remember I tried to make a game like this but gave up.
Looked through some old USB sticks and found it.
Won't even launch from anything else than the love build on the USB. ( I probably made a custom build and lost the source or something )
Last date modified was 2012-11-03 16:47
anyway here's a screenshot of what I had
Attachments
Screenshot
Screenshot
screenshot.png (26.74 KiB) Viewed 8632 times
If you can't fix it, Kill it with fire. ( Preferably before it lays eggs. )
User avatar
pakoskyfrog
Citizen
Posts: 62
Joined: Mon Feb 04, 2013 12:54 pm
Location: France

Re: [TPE1] HexaSweeper

Post by pakoskyfrog »

@ Zer0
Do you remember why you gave up your project ? The screenshot seems promising ^^
Too bad you lost your codes !
User avatar
interstellarDAVE
Prole
Posts: 23
Joined: Mon Jan 14, 2013 8:22 pm

Re: [TPE1] HexaSweeper

Post by interstellarDAVE »

It looks like you are using classes, wouldn't it be possible to make each Hex a class and give it a mouseclick function like a button? Not too sure how to implement that though since i don't know if buttons are built in element to love. You might have to program all that stuff by scratch.

Its coming along great.
User avatar
pakoskyfrog
Citizen
Posts: 62
Joined: Mon Feb 04, 2013 12:54 pm
Location: France

Re: [TPE1] HexaSweeper

Post by pakoskyfrog »

@ interstellarDAVE
It's exactly what i've done with my GUI buttons, it's easy because it's rectangular !
When the mouse moves, it updates a 'hovering' variable in the buttons collection, and when you click, it activates the onClick procedure of the button currently under the mouse (with hover == true)

The problem is the hexagonal shape, you just can't transfer easily the positions and the hovering status. So instead of focusing on the element, i focused on the global collection. But i think both way can be achieve (it's the same differences between differential and integral forms of equations ^^ )

Have you progressed on 'Loveless' ?
User avatar
Zer0
Citizen
Posts: 59
Joined: Sat Oct 06, 2012 9:55 am
Location: Sweden
Contact:

Re: [TPE1] HexaSweeper

Post by Zer0 »

@ pakoskyfrog
I gave up because i lost the usb stick and when i found i I kept on working on another game on it.
I will probably start working on it again.
If you can't fix it, Kill it with fire. ( Preferably before it lays eggs. )
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests