the_Shit_hawk's Recent Forum Activity

  • Yes thats exacally what Im looking for! Is there anyway i can get a capX from you?

    there may be some left out, as i made a few versions of it, however, i believe downloading this should give you what you need. https://www.dropbox.com/s/ciiwxzjkntcpi ... 3.c3p?dl=0

    if you have any issues let me know and ill open it up and see what needs to be done.

  • could also use a counter variable.

    every x seconds/tick,if counter =0, rotate 1 degree , add 1 to counter,-trigger once if true - if counter =>45 , set counter to 0, wait 2 seconds, add 1 to counter.

    this would cause it to rotate 45 degrees and then stop, and then continue

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • could also use a counter variable.

    every x seconds/tick,if counter =0, rotate 1 degree , add 1 to counter,-trigger once if true - if counter =>45 , set counter to 0, wait 2 seconds, add 1 to counter.

  • i assume you're also using a physics behavior if bouncing without events? physics can drain power as well.

  • Hmm, I guess my question is more like if the BULLET behavior is draining a lot of battery. As I said in my previous post, the app is very simple and for test purpose only:

    1. You create some solid boundary on the 4 sides of the layout

    2. You create several sprites (say 4) with bullet behavior and bounce off solid

    No event at all. So there is nothing to optimize.

    Build the android app and let it run (so the sprites will be bouncing around) for 3 minutes, and the CPU total will be ~7 minutes on my Nexus 6.

    Not sure if it will be the same on other phones. Thanks.

    it could be, think of construct as something like windows. when computers first came out, you had to type a paragraph of code to open a program file, but people noticed a lot of the time you type the same lines of code over and over and over. so they made a button, that when you press it, it executes a predetermined line of code. so when you click the button for an app, in the background its executing multiple lines of code to open even more lines of code which comprise the program.

    my point being, in construct, even though you didnt program any events, the simple fact that theres a sprite or an object means theres lines of code in there, determining shape size position etc. i would assume the background code on the bullet behavior would be something along the lines of every tick move sprite x spaces at y angle, so every tick, which is 0.001 seconds i believe, its repositioning, redetermining size, color, shape, etc, and relaying that information in a way that you can see it and understand it. thats 1000 times a second. even if im wrong and its only 0.01 seconds, thats still 100 times a second.

    most apps are static, and comprised mainly of webdata, i.e facebook instagram twitter snapchat etc. so the information is mainly sent when the page is reloaded, a lot of apps will generally only be performing a function when a button is pressed.

    maybe think of it as gifs vs still images. maybe not on newer pcs, but theyll generally take longer to load. this is because its a constantly moving image, its changing files every x seconds.

    maybe the constant bullet behavior could be contributing to power consumption, maybe try adding goals, that when the balls hit they disappear and respawn a few seconds later. it'll provide breaks in the bullet behavior and possibly give the phones proccessor a second to catch up to itself. a lot of it has to do with the phone itself. cheaper phones tend to be lacking so as to push you to buy the $1000 one that will be outdated in a month.

    slowing movement speeds etc may also help lower consumption, though, im no expert.

    as the above mentioned, debugging will tell you when and where you're lagging, so you'll be able to tweak your environment accordingly.

  • yeah i think hes looking to just add a blank event instead of a sub event; but if youre just using it as a placeholder/reminder that something will eventually go there, you can also add comments, and then write in what you want to put at a later time, i.e "score system goes here" and then next time you open up its not just a blank event like uhmmmmm whatd i want here. lol.

  • Click: Tools>Script Editor.

    Delete the default code.

    Paste in new code from Leaderboard GAS file.

    Save (Enter a project name)

    Click: Run > setup.

    An Authorization Dialog will appear. Click Continue.

    Click Allow (It is safe because it is your app. ...

    Click: Publish > Deploy as web app

    more details visit our website

    https://www.besanttechnologies.com/trai ... e-training

    sidenote - its never wise to copy and paste code. copy it manually unless its from a trusted source. there can be hidden data in a copy and pasted text, which, when entered into something that can run said text, or you know, put into something like an app or game, can cause undesired interaction between your app and your user; which could do many unwanted things, i.e. data mining your users, infecting their accounts, or even intercepting payments etc. Granted we can do a lot of cool stuff with construct, but never forget theres people who do way more without it out there. everything you've seen on a computer was made by somebody, well, up until recently w google but even their softwares manmade at some point.

  • > what if you set the array value to a variable, and then have in game triggers change the variable?

    > i dont use arrays, though i probably should learn a bit.

    > however, ill use a similar method in my games so that as you progress spawn times get faster, making the difficulty increase the further you progress.

    >

    Actually das a good idea!. I won't use variables though I will use dictionary, sort of same thing. So I will load up the dictionary from the project files. I think I finally got a way fwd... Go go go....

    dictionary would be using stock variables yes? such as CanvasSnapshot and Player.x etc?

    or is it a seperate function?

  • why dont you have the player always on the lower layer and all objects that should be behind him are on his layer

    then objects that are supposed to be in front of the player spawn on the top layer.

    so you can check:

    if player overlapping another object

    AND

    object.layername = "toplayer"

    this would work however i only have access to 2 layers, the top of which would contain the HUD and controls. however, as the game is mostly contained in 800x800 pixels, it may work to just have hud always on top of z order.

    also, objects are randomly spawned, so i suppose i could say on created if sprite y => player y send sprite to top layer; the issue with this is that thats essentially what i have, except instead of changing the layer ive been reordering z order. ill play around a bit now that ive some free time and see what i can manage.

  • ok, so, im currently saving up for a licensed copy and am using the free version w registration i.e. 50 events instead of 30.

    so i know with the paid version theres wonderful features, such as the ability to add more than 2 layers, and that handy little z order list; however, i dont yet have those, and am looking for a temporary workaround.

    what i have currently is working up until i added my scenery object, so it may just be too much going on, sorry for the lack of capx, but essentially i have an autorunner.

    if player x >=400 set player x400 - this keeps him in the middle of the screen and all gameplay at x 400

    the player essentially stays at 400, and all scenery moves 180 degrees when right is pressed.

    i have sets of emitters, one for a tree sprite, with several large tree backgrounds, a second emitter for single tree sprites, 2 more emitters for a ground path sprite, and a fifth emitter for scenery such as rocks, bushes, random plants.

    the idea was to use disneys style of 3d layering, to create an almost living environment.

    currently, my event sheet says

    On Right Key Is Down > tree bg,tree bg2, groundblock,scenery - move speed angle; Groundblock,Treebg2,Treebg - move to bottom of layer

    -sub event - player - on collision w scenery, if player y>= scenery , scenery ,player, groundblock, treebg2,tree bg - send to bottom of layer

    this makes it so that the objects move when you hold right, and whenever youre moving they rearrange and correct their z order

    the problem i've been having, is i'm trying to make it so that if the player sprite is in front of an object so to speak, their z order is higher, and they show in front of the bush etc, but if their z height is lower, placing them higher on the screen, behind the scenery, it would show up in front of them, blocking part of your view.

    it seems to work about 50-55% of the time.

    all of the background trees and ground paths function fine, but i can be at the bottom of the screen and still show up behind some objects.

    anybody have an easier way of ordering objects z layer other than constantly sending things to bottom/top of layer as theyre spawned or creating multiple layers (as im capped at 2 layers atm)

  • The only way it seems possible is via a plugin or recording sounds via users microphone, which could prove interesting for a beatboxing mpc, so i guess ill try to go that route for now,but if anyone has ideas or suggestions itd be much appreciated.

  • So i know i can upload sounds into the game file to be used, but for my project I would like to enable to user to add sounds from their device; I've attempted using the file chooser to set a string variable of FileChooser.FileURLAt(0), and using the audio Play by name feature, but it seems it will only load things in your audio or music folders. would there be a way to allow a user to import sounds to be set to different sprites? the end project is a basic MPC, sixteen sprites, all linked to different sounds when you touch them. i can do it no problem with stock sounds, but it would be awesome if users could load their own samples onto the buttons.

the_Shit_hawk's avatar

the_Shit_hawk

Member since 2 May, 2017

None one is following the_Shit_hawk yet!

Trophy Case

  • 7-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

9/44
How to earn trophies