philx's Recent Forum Activity

  • hey rexrainbow

    I love this plugin! but i have an improvement idea. in my game i want to reduce the cooldown of "fire the weapon" if the player hits an enemey.

    like: Bullet on collision with enemey -> reduce Cooldown interval by 1 sec

    i would very appreciate if you could tell me how i could handle this or maybie if you want make an update?

    i was thinking of setting a instance variable for each player called "CD" and then set the time intervall to player1.CD (= instance variable) but this is neither working, i can only put numbers in there.

    cheers!

    phil

  • Hi guys,

    in the near future i want to work on a multiplayer game for iPads.

    Since the information on mobile platform development is scattered over the whole board, i was thinking of creating a game step by step and discuss every problem i will face during this process.

    I decided to go for a four player local multiplayer battle where each player has it's own joystick in the appropriate corner.

    it should more or less look like this.

    [2][https://googledrive.com/host/0B9IR6fhnjEUvMlhZaU1uR3NCUWc/index.html]

    The first decision i had to make was for the screen size and resolution.

    Since the iPhone screen is to small to play with 4 players, my target platform is only iPad gen 1-3.

    I read that it would be best to pick the best possible resolution with the same aspect ratio for all devices, which is 2048, 1536 (iPad 3Gen)

    For the "Fullscreen in Browser" i chose "Letterbox Scale" because it's said to be the best for mobile devices.

    For more information have a look at

    [3][https://www.scirra.com/tutorials/73/supporting-multiple-screen-sizes/page-1]

    as said in this topic, the performance won't be a problem if scaling the screen down in a lower resolution. for example ipad 1

    [4][http://www.scirra.com/forum/a-thought-on-mobile-image-resolutions_topic51062.html]

    the second problem i had to face, were the 4 different fingers touching the iPad at the same time.

    i played around with touchID's and invisible sprites and came up with this:

    here's a live Demo

    [5][https://googledrive.com/host/0B7m-eoWIKsSMeVNlVzBzMTdFanM/index.html]

    test it on an iPad to move both at once

    and this is the capx file.

    [6][https://www.dropbox.com/s/j5v8oi5ruuyyp4y/multiple_touching.capx]

    I am right now facing something, which is not really a problem but it would be great to know a solution.

    Because i have four players, i have 4 different controls, player characters and bullets.

    right now i repeated exactly the same events for every player.

    can i create something like:

    "on touch of Control_Left.ID(2), move Player.ID(2) to the left"

    like 3 events for left, right and to define somehow to pick the player with the same ID as the controls have.?

    is there another way to achieve this?

    I've been discussing this topic in this thread:

    [7][http://www.scirra.com/forum/topic72500.html]

    Here's a quick view on my events:

    <img src="https://www.scirra.com/images/articles/players.png" border="0" />

    and here's the latest version of the capx

    [8][https://docs.google.com/file/d/0B9IR6fhnjEUvWWlxNGdxU1IyV1k/edit]

    the second problem which i'm facing is the combat. it's a bit similar. I have 4 different player characters and four appropriate bullets. now i want the bullet 1 to destroy p2,3 and 4 on collision but not p1. And bullet 2 i want to destroy p1,3 and 4 ... and so on.

    i tried a lot of things with families and instance variables but i was not comfortable with it.

    Of course as soon as i know how to do these things i will write it down here because i want it to be like a full report on what problems i faced for you as a tutorial. I will constantly continue to develop my game.

    as you might have noticed, there aren't any nice sprites in it and so on. My graphic support is working on it and i will let you guys have a preview as soon as possible.

    For next steps are planned:

    • Power UP's
    • Combat Engine (Bounce of Walls, Teleports, Time, Respawn ... and so on)
    • Achievements

    I haven't got the time right now to commentevery step but i will post problems and solutions here and maybie comment everything like a tutorial when the game is finished.

    cheers!

    phil

    26.08.13

  • check out

    scirra.com/forum/topic65502.html

    where i provide a file for a possible solution for multiple touch inputs.

  • set the different characters as animation frames of only 1 sprite. create the events for the character sprite and choose the appropriate animation frame for the chosen character.

  • very easy to include and very effective!

    thanks for the example. i could use it very well.

  • yeah i totally understand your issue and i am facing exactly the same "problem".

    i tried to solve it with families and instance variables now but couldnt get either to work. so maybie ill just make an event for each of the four players -.-

    Sargas you completely misunderstood our problem here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well , each gamepad has a different id , eh ?

    I never played around with the gamepad object , so this is just ontop of my head

    Give each player an id variable that corresponds to the id of the gamepad you use to control the player with

    And the

    On gamepad key pressed

    If player.id = gamepad.id

    Do action

    are we talking about the pre-set UID or the manually settable instance variables?

    i'm working on something to get this correct atm but i dont really come to a working result.

    EDIT: Whiteclaws i'm sorry, stupid question. it's not instance variables. but how can you set the same ID for the gamepad1 and the player1?

  • i'm sorry to dump old threads. but if anyone comes to this thread like i did now .. i'd like to refer to this thread

    scirra.com/forum/topic65502.html

    where i provide a file for a possible solution for multiple touch inputs.

  • Again an awesome looking game from you! by the way .. are you developing them by your very own?

    how did you deal with the different levels? have you made a seperate Layout for every Level? i was searching the forum but i didn't find a informative thread. where did you read up about levels? can you recommend me something? because i want to have different maps in my game too and it's kind of the same.

    great work. cheers!

  • philx

    Thank you! Because I'm only supporting the 3.5 Retina and 4 Retina screen, it's only 2 different sizes I habe to do work.

    So there are 2 different image sizes:-)

    Kraudi

    how do you manage this? do you detect the Screen Size in C2 and then use the appropriate layout size?

  • have you found a acceptable solution yet?

  • Very nice controller! i love 360 degree version. but there is the same problem as i got when i created my own controller. it always spawns a certain distance away from where the touch input came from.

    i went crazy while trying to fix this. have you got any idea?

philx's avatar

philx

Member since 27 Jan, 2013

None one is following philx yet!

Connect with philx

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Teacher One of your tutorials has over 100,000 readers
  • Email Verified

Progress

15/44
How to earn trophies