Dr.Hasan's Recent Forum Activity

  • That's incredible! WOW! This is a perfect example of a result one can expect from "C3 + Programming Mind + Creativity" combined!

    And I know.. this is only the beginning. So many possibilities ahead! Keep going!

  • While a good idea, in my case, a recursion would likely cause an even bigger delay in completion. Each cycle through the loop I'm looking at an element in the array. I'm then looking at the 9 elements surrounding it (x-1, y-1 to x+1, y+1) and basing changes off the results of that.

    Oh right! In that case Yeah, a simple recursion would iterate unnecessarily.

    Your project looks very exciting.. must be fun programming it! Would love to see it in action :)

    Basically, it's purpose was doing some 'cellular automata' to check and see if a land tile had at least 3 neighboring tiles that were terrain and if not, set it back to a water tile (-1)

    Just wondering if the loops are causing any delay? or they're instantaneous?

    For a larger (or denser) map, I was just wondering, how interesting would be to use a Quadtree algorithm for locating the islands? That's a recursive occupancy-detecting method that takes minimal iterations to find the objects in a 2D map (and hence its nearby objects).

    If you're not familiar with it, here are a couple of videos that have good examples:

    youtube.com/watch

    youtube.com/watch (from 2:08 to 3:03 only)

    But if your algorithm if fast enough, then you don't need anything else.

  • In my case, I needed to run through an array of 20,000 elements and check for a number of true conditions and make changes which could affect cells already examined in the loop, making them true. I needed to keep checking the array until all conditions were false.

    Based on your required algorithm, you don't need Loops (at least not directly), what you need is Recursion. Which means, you need one Function, which will have that algorithm to check all 20k items, find all/any found=true, make the changes you want, let it affect others, and then within that function call the same function (call itself) again. Technically, it should keep looping recursively, function within a function calling itself. Yeah, like the movie inception, except, you will keep calling the function only if found = true.

    Which means, let's say in the 500th recursion, if all the found = false, it won't repeat anymore.

  • No. This touch collision logic of touching multiple objects at once (if they're overlapping) always existed.

    Solutions, as you would already be aware are:

    1) Modify collision polygon of tree to not overlap with the polygon area set for owl. etc.

    OR

    2) if Touch is down: sub-events: if Touching Owl, Play_Owl, else if touching Tree, Play Tree, else if. and so on. Priority based on what's on 'Top' perhaps.

  • Nope. They won't. Because you're the game developer.

    You can make them see whatever you want. Like: Room1, Room2, Room3.

    If you have a lot many rooms, I suggest you use Dictionary/Array/etc to save passwords for each room.

    Programming logic will be something like this:

    if Touched Room1, Enter the password.

    If the room exist in dictionary

    Join Multiplayer Room with Room Name: Password.Get("Room1")

    Else: Wrong password

    You can even do the same by having Buttons (that says Room1, Room2) and their instance variable define the real room name (password). That should be easier if you don't want to use Dictionary, or you have less rooms. Programming will then be:

    On Touched button1, Enter the password

    if password = button1.roompass

    Join Multiplayer Room str(button1.roompass)

  • Set the ROOM NAME to be the password. If the password (room name) is entered correctly, you join the room. Otherwise, that room name would not exist, and 'Wrong Password' shown to the user.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a lot for the feedback! and I'll check the problems out. The crossword however, I remember, it was some other word like COW or MEW etc. It's basically checking against the words I've already set, to fill them in.

    Yes, you guessed it right. I have used some AI bots if no real user is found, you can still play with 'someone', and they chat too! :P

    Oh I had set up Chartboost ads, as a Backup, if Admob fails to load, Chartboost shows up. Which it does but I'm going to remove Chartboost now because despite all the impressions, it doesn't give me revenue. Not worth it. The unreliable Admob is still better alone.

    By the way, I tried again, Your video ad worked!

  • Oh I just did !! That's awesome! Well made, shows how much efforts you put in there!

    Also, I noticed how you made the background objects produce such an awesome 3D effect! Really liked it. It's fun and engaging!

    Alright, time for some non-positive feedback as well. Don't worry, couldn't find many.

    1) I think the vibrations can be changed to patterned.. like ( [0.5s ON]-[0.2s OFF] ) x 5 because with the current vibration, I thought I was getting notification. Longer one can be once, only at the end. Just a thought. It may be only me.

    2) I tried viewing a Video Ad.. but it never loaded. Tried twice. I am in the UK, it should have worked. Pls check.

    Anyway. Well done there! I am going to rate it 5 stars.

    Oh. I have a price too for feedback. Why not play my game too? :P

    play.google.com/store/apps/details

    Cheers.

  • Thanks a lot sotano42 !! Really helpful suggestions!

  • newt, Yeah, that's me. Can't I help the beginners? I remember facing a lot of such issues when I started.. and yes I'm still learning despite years of use of C2/C3. But I've also learnt enough to help others, especially programming/logic related issues. And yes, I'll change my phone. Thanks for your suggestion -_-

  • Thanks dop2000, that was a good advice. I will try disabling the objects with behaviors when not in use.

    I had effects before, removed them all, because it used to lag crazily on my phone.

    Thank you chadori, I am using LG G Pro 2 (3GB RAM), Android 5.0.1.

    This is the game: https://play.google.com/store/apps/details?id=com.cricket.iogames

    Yes you're right, I had recently also optimized my events, they were more than 400 in the game layout, but after using Groups and using more functions, I could reduce them to 250 active events where majority are just trigger events. I also converted most of the every-tick events to every after 0.03 seconds.

    The above did seem to help improve the performance slightly. (CPU usage from 10% to about 8% avg).

    Thanks for the link! I did read it a long time ago, but time to read again ! :)

  • Alright so my game has 80 objects when it's running. My android phone heats up when I play my game!

    I realized that I don't need 30 of those objects until Game Over... Initially, they're invisible, but they exist on screen.

    Question is, how much would it help in performance if I do one of these:

    1) Destroy them on Start of Layout, and spawn them all when needed?

    2) Since they're all positioned manually as I want them, I don't want to do the above (placing them back again through programming will be a mess), would it help if I move everything by Self.X + 3000 and bring them all back by Self.X - 3000 (i.e. removing them from screen).

    Thanks!

Dr.Hasan's avatar

Dr.Hasan

Member since 16 May, 2019

None one is following Dr.Hasan yet!

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies