iOS Question Creating a small game

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

I am trying to learn how to create a small game in B4i.

As I am learning, I want to start with something basic like the following game:


You have a guid on the screen where you need to drag and place the objects. The idea is to get all the squares in a row or each square in the box you get points and those objects disappear. Before you know it all the squares are taken up and there is no more room to place anymore objects on the grid. The above video will give a the idea on what I am trying to develop.

Does anyone know where to start with this, as I am not sure what the best way in detecting objects being placed on a grid and hoping someone could give a few pointers and a starting point.
 

ilan

Expert
Licensed User
Longtime User
very nice game. i like the concept.

for such a game you won't need any special libraries. i would do it just with a canvas and types objects. this is similar to a game i did some time ago (Tiny Puzzle) or this one that is more complex (Power Blocks)
the concept is the same. you puzzle parts and a puzzle board and you drag the parts to the board.

it's more simple than it looks. all your parts are basically even rectangles. small rectangles that in specific combination create a shape. when you drag the shape you need ON THE RELEASE PART event to check if the grid rectangles are empty and you can put the shape in that place then you check if a line is completed or any other function you decide.

have you made any games already? you will need some basic understanding to create such a game.
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
have you made any games already?
No, this will be my first game I will create.

it's more simple than it looks
This is why I wanted to look at this type of game to learn the basics of creating a small game.

i would do it just with a canvas and types objects
This is the part I don't really know how to do. I can't work out how to detect if a square has been used or not based on the shape of the object.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
start with this example
(source is included)

1622445380648.png
 

Attachments

  • drag_tetris.jar
    412.9 KB · Views: 153
  • drag_tetris source.zip
    1.9 KB · Views: 149
Upvote 0
Top