shirogr's Forum Posts

  • Hi

    I am making a variation of Pepper Panic Saga-match 3 game (https://king.com/#!/play/pepperpanic of those that may not know it) as an exercise to learn about arrays and grids. I have run into a wall though when I came to merging the tiles-peppers together to produce a bigger one. Anyone have any ideas on how to approach this?

    Thanks in advance.

  • I can do the switch fine, but I want to learn if there is another way, so that I can save on sprite size.

  • Hi

    I would like to have a sprite highlight when I hover my cursor over it. Is there any way to do this (an effect maybe?) without going to a different animation frame?

    Thanks in advance folk.

  • Nope, I never got a reply from anyone and I also posted on Reddit-no luck there either. I have abandoned the project now and will NEVER touch tilt controls in Construct 2 again.

  • This is an interested idea. I will try this and see if there are any limitations that may arise. Thanks.

  • Hi

    I want to make a strategy game where the player will be able to conquer and manage multiple cities. Each city will have a number of statistics (location, population, type and location of building etc). I also like to give the player the opportunity to randomize the map when he starts a new game. To do this, I am thinking of using 1 array for each city, that will hold all this information inside.

    Since my game will feature a lot of cities, I would like to ask if there is any way to dynamically produce arrays in the beginning of the game. The current way to generate arrays is to drag and drop them from the editor, which is not practical when I want to produce 100s of cities and distribute them on the map or when I want to give the player the opportunity to choose the size of the overall map (eg Small map/55 cities).

    Any thoughts on the subject?

  • Anyone? Any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rho

    We do not know if Regga354 wants to make a slot based rts like e.g. Kingdoms of Camelot (in which case your method is better) or if he wants to make a RTS like Command & Conquer where there are no slots, the buildings have various dimensions and the player can pretty much build wherever s/he wants (in which case I think my suggestion is more appropriate).

  • check this post for some advice

    https://www.scirra.com/tutorials/298/pe ... bile-games

  • Just do not forget to check for collisions before you spawn the building, otherwise you will end up with stacked buildings, one on top of the other.

    My suggestion in steps:

    Step 1 - every tick, have the new building sprite follow the cursor (MouseX, MouseY)

    Step 2 - Make the new building 50% opacity.

    Step 3 - every tick, check for collisions (AKA see if another building is already built on the spot you want to place the new one)

    Step 4 - If step 3 has passed (no collisions), then make the building glow green.

    If step 3 has not passed (collisions have turned up true) then make the building glow red and do not continue to step 5.

    Step 5 - If step 4 has passed successfully and the player clicks the e.g.LMB, then make the building's X,Y the same as the MouseX,MouseY.

    In general, what you try to do is a substantial process imo, not just a couple of quick events. You also have to factor in saving the position of the building if you want to create saved games or go back and forth between menus.

  • Ok. I have read through the forums, checked the touch object in the manual, I have downloaded capx to see what other people have done and have experimented for lots of days (I did print out the values returned) but I still can not find a way to implement Tilt controls consistently on different mobile devices.

    The target:

    I am making a game where I want to make a penguin move left when the player tilts his phone left and right when he tilts it right in portrait mode. I used the following methods.

    -The first one used the Touch.Gamma expression.

    -The second one used the Touch.Beta expression.

    -The third used the Touch.AccelerationXWithG expression.

    The problem:

    Each method works on some mobiles but not on others!! I tested on the following mobiles and have noted what controls work and what not:

    Samsung Galaxy Wonder (android 4.2.2): Acceleration Yes, Gamma Yes, Beta No.

    Samsung Galaxy Tab 2 10.1 (android 4.2.2): Acceleration No, Gamma No, Beta Yes.

    ----Also, if the player has deactivated AutoRotation on their phone, Touch.AccelerationXWithG returns 0 which, as you can understand, breaks the controls.

    Samsung Galaxy Fame (android 4.1.2): Acceleration No, Gamma Yes (inverted), Beta No.

    Sony Experia Acro S (android 4.1.2): Acceleration Yes, Gamma Yes, Beta No.

    Request:

    Can anyone help me figure this out? Other people have made games with tilt controls that work on multiple devices, so I am probably not doing something correctly (or I am plain dumb). I am willing to give a consulting fee of $10 to the person that can help me solve this issue. Below I include a link to the capx that I used to test things and an apk, so you can see the code I used and test it on your phones.

    https://dl.dropboxusercontent.com/u/1342998/OrientationTest_Multi.capx - capx

    https://dl.dropboxusercontent.com/u/1342998/OrientationTest.android.apk - apk for phone iXDK export

  • [quote:3lsn29tn]Try using the "Touch" object and checking Alpha,Beta and Gamma values to capture device orientation, then, simply translate this into commands to move your character...

    EG, if Touch.AccelerationXwithG > 3 THEN move player forward (with G takes into consideration gravity)

    Could you elaborate a bit please? For example, if I am at portrait mode and I tilt the device left/right to move 10pixels at the appropriate direction, how would this be?

  • UPDATE

    Apparently, if you replace Touch.Gamma with Touch.Beta, the controls work fine!!

    Could someone explain to me with this is so (it will probably be useful in the future)? Isn't touch.gamma supposed to be left/right and touch.beta front/back?

  • Hi.

    I am a game designer that has just started using Construct 2 seriously and have almost zero programming skills. I am currently making a mobile game with tilt controls. I have run into the following problem and although I read through the forums and the documentation, I still have not found a solution to my seemingly simple problem (could be down to inexperience).

    I have locked the game in portrait mode and have added touch controls. My goal is to make my sprite move left and right by tilting the phone left and right in portrait mode. Unfortunately, although the controls seem to work when I hold the phone in landscape mode, in portrait they are a bit erratic and work half the time.

    Can anyone help me on this subject or point me to a post that I may have missed? I include a screenshot of my event sheet. Thanks in advance for your help.

    <img src="http://i.imgur.com/Wnsbpeg.png" border="0" />

  • Thank you ramones. I will try this as well.