RBuster's Recent Forum Activity

  • Thanks for all the tips,

    I also have knowledge in computer graphics programs, such as max, cinema 4d, after effects, premiere pro, sony vegas pro, and other programs of its kind. But my intention was always to work with games.

    I've done several games using the tutorials and I created 06 games based on what I saw . This problem always occurs when I try to do something different than I have done . I can understand something, but some procedures are more difficult . This is the case of the "array " . Until today I do not quite understand how to use it .

    I'll create a portal of educational games for free access and I intend to create 15 games per month. This naval battle game, for example, when finalized, will be used to train multiplication tables, like a said before. I need a guy like you to help me. Do you have interest in give some advice on games that I have difficulty to build? I would like to pay you for it. If yes , how much you'll charge ?

    Regarding the script about the battleship , I did the following :

    Family1 shipID = ship_1_mid.UID

    for each Family1

    ????ship_1_mid is overlapping Family1 : Destroy ship_1_mid

    ????????????????????????????????????????System Subtract 1 from Nr_of_placed_ship

    ??????????????????ship_2_front shipID = ship_1_mid.UID : Destroy

    ??????????????????ship_3_end shipID = ship_1_mid.UID : Destroy

    ????ship_2_front is overlapping Family1 : Destroy ship_2_front

    ??????????????????????????????????????????System Subtract 1 from Nr_of_placed_ship

    ??????????????????ship_1_mid shipID = ship_2_front.UID : Destroy

    ??????????????????ship_3_end shipID = ship_2_front.UID : Destroy

    ????ship_3_end is overlapping Family1 : Destroy ship_2_front

    ??????????????????????????????????????????System Subtract 1 from Nr_of_placed_ship

    ??????????????????ship_1_mid shipID = ship_3_end.UID : Destroy

    ??????????????????ship_2_front shipID = ship_3_end.UID : Destroy

    No ships appears in the screen

  • I use this:

    family1 shipID = ship_1_mid.UID

    for each family1

        family1 is overlapping family1: family Destroy

                                        System Subtract 1 from Nr_of_placed

    but not work. Maybe the problem is the subevent that verify if overlap happens?

  • Before all, thanks for the tips and come here on Sunday to help.

    I've noticed that the logical issues are very easy for you. For me, programming, even with so many facilitators as they have in Construct2, is more difficult. I know it's a matter of logic and commands are details. I think that I should invest in logic. Would you recommend something for this (book / website / etc). It has to be for beginners.

    I think (just think) that I understood your explanations and I'll try to implement them. I hope that I can still consult you.

    Thanks again.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Avoid overlapping of ships with the border sprites is simple. However, to avoid overlap of ships of other ships, divided into several parts is very complicated, mainly because I will have to create 05 different types of ships. Perhaps the hardest part of the game.

    I'll check the overlapping in "Ship_1_mid on created" event and destroy that part if overlapping is confirmed. If not, I'll create the other parts (end/front) after the "else" event.

    Sometimes 03 ships appears, but after several refreshs, one or more ships disappear sometimes.

  • Nice solution, nimos100

    I found very difficult to use "while". I only had used REPEAT and FOR before.

    As you said, the ships are still overlapping others ships. I thought to include the condition "Ship_1_mid is overlapping family" in the group "Ship overlapping checker"? Anyway to use "or" and "and" together in the same conditions block?

    I had not commented, but I keep using the grid instead of creating ships in coordinates. I want that ships are included in the columns and rows. To create different angles, I'm using CHOOSE pointing angles 0/90/-90/180

  • nimos100

    I'm came back (sooner than I thought).

    I've trouble with while loop. I did the following:

    numberShips = 0

    while

    numberShips <3: Create object Ship1_mid

    family is overlapping family: System subtract 1 to numberShips

    ???????????????? or

    family is overlapping margin (new sprite to restrict game area)

    The overlapping still happens.

    The other problem is with the other parts of the ship (front and end), leaving the restricted area and also overlaps

    What's wrong?

  • You `re the guy. Each post is a lesson. The best thread about a game construction that I participated so far. All very well explained.

    I will now give you a rest :). I'll digest it all and put into practice. Please do not disappear. After implementing all you said, I will return to give you a position or clarify another question, if you allow it. Thank you.

  • But when the ship has 2, 4 or 5 pieces? In these cases, I can have 3, 2 or no piece in the middle of the ship. When you have 3 or 2 middle parts, all have the points of origin "front" and "end"? And the ship with two parts?

  • Very nice, Thanks for the suggestions about overlapping issues. I�ll create the sprite and put it around the game area to restrict it.

    I just don't understand very well the identification of the ships. I beleive that I need to spread 100 sprites on the game area for when the player clicks on one of them, check if there's a part of the ship below. In this case, it first needs to know if any item of the family is there, isn't? If confirmed, then I need to check which part of the ship is, right?

    I intend to create five different types of ships and include them in a single family. But in fact, will be different parts of ships separated. Can I relate all parties to a single ship, or a single name?

    The same issue occurs when I have to check if a ship was included on the screen to see if it is overlapping some other ship. I can check if a piece of the ship was placed. But how can I check if the entire ship was included in the game? I think the solutions is: check each piece of the ship, relating the number of pieces to a variable and check whether the variable has a value compatible with the number of pieces? Is it? I beleive that you have a better solution.

    I really want to thank you for your patience and dedication to this thread. I really appreciate this.

  • nimos100

    I think with the PIN behavior is more practical, but I don't understand why you changed the point of origin. Now the sprite appears on the line rather than within the squares. It's necessary because you are using PIN?

    Two other important issues that it's very difficult for me: the problem of overlap and the fact that the ship is out of the playing area (sea sprite).

    I tried to create a loop with Repeat event and not work 100%. Sometimes the ship appears overlapping other.

    I also need to restrict the area to ensure that ships always appear on the sea sprite. Do you know how can I solve this?

  • nimos100

    I created a CAPX in accordance with your instructions

    dropbox.com/s/6ef019rjkvj6ptp/test.capx

    Currently ships are overlapping in some times and the ship in vertical axis leaves at times of the playing area (sea sprite). I included a loop (repeat) to verify the overlap, but even so the boats are overlapping from time to time.

  • nimos100

    Thank you for all these explanations. Were very detailed , though some points were a bit confusing for me (I'm starting to program ) .

    I had already changed the origin of the sprites to 0.0, as indicated in the previous post and I intend to keep it there.

    My idea is to make a panel with buttons and a display to show the equation and, on the left side, display area of the game ( whith ships in hidden) . This area should be slightly smaller than the height of the panel , so I talked about creating a space around the area of ??the game . I still do not understand how I can do to determine the position of the playing area .

    I also do not understand how to create random orientation to the ship (X / Y or left / right).

    To prevent the ship stayed along the margin , I am using ( int ( random ( 0,9 ) ) * 40 +40 ) for the first part of it . This solves the problem or not ? The tests done so far with the first part of the ship, worked very well.

    Another possibility to distribute the ships : if I create the sprites in the overall size of the ship ( eg 40px / 120 px) and then control it through overlapp event to know which object it is overlapping and how many pieces are still missing from this object through the local variables? This would be more complicated to do?

RBuster's avatar

RBuster

Early Adopter

Member since 29 Oct, 2012

Twitter
RBuster has 2 followers

Connect with RBuster

Trophy Case

  • 12-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies