SeriouslyCrunchy's Forum Posts

  • Finally got around to doing the .capx, hope this provides a decent example to anyone out there, I rushed through it a bit so it doesn't like it if you put two inventory objects in the same slot, but hopefully this will do what you need!

    https://dl.dropboxusercontent.com/u/245987915/2slotInventory.capx

  • Hope it works out for you!

    I'll rustle up a .capx for you within the next day or so, it would probably be good for me to have an example of this sort of thing to hand! Just a thought : you will need the personal license level of C2 to create families, though you can probably find a workaround for it anyway.

  • Could you simply have all your inventory items placed into a family, and give the family two instance variables, for example 'In Slot A' or 'In Slot B' . Pressing the A button activates the object for 'In Slot A' that is true, and pressing the B button activates the object that for 'In Slot B' is true.

    Sorry if that's not very well explained, I can further expand on this method if you'd like, and could probably cobble together a small capx to illustrate what im trying to get at.

  • TMAJA

    Sorry for the delay in reply, and sadly I only have time to write a few brief words as its a busy day today.

    You are right that "System| Every tick - Player Object| Set Platform vector X to Self.X+250*dt " would be frame rate independant but :

    Had a quick gander at the manual on dt : https://www.scirra.com/tutorials/67/del ... dependence right at the bottom it says "Don't forget behaviors already use dt (except with Physics where you must turn it on yourself)"

    This would indicate that using the bullet behaviour to constantly move your player forward would make your game frame rate independent, so long as there is no other event changing the horizontal movement of your player character. However im unable to test it out right now to confirm. Give it a go and see what happens!

  • No worries, honestly I love working through these little problems, and its been interesting to test out different things!

    I cant be sure on wether the behaviour is frame rate independent, but considering 'simulate control' effectively runs every tick, you would imagine it might be affected by frame rate changes. Try experimenting between that and the bullet behaviour for best results is my best guess. As is so often the case, wherever possible playtesting should give you the answer!

    Glad to be of help!

  • TMAJA

    Yes, this is getting interesting. We have two ways of doing this, and I honestly think both are viable. If you were to follow the infinite runner template example, you would have to hard code in what 'time' each object would need to spawn at, with its corresponding X and Y co-ordinates, which honestly is a bit of a pain, but would clear up any performance issues.

    However, I'm convinced you can still use scrollto quite happily! So I've spent a few moments editing the infinite runner template and using your approach instead. I think now the best way for you to try this is to edit the way your player character moves forward. You could either give the player character the Bullet behaviour, or if you're already using the platform behaviour, have it so every tick you simulate control of the player character in the direction you need them to go.

    Heres the quick capx I cooked up using the bullet method, if you want to try the simulate control on every tick method, remove the bullet behaviour from the player character and enable the event in the event sheet : https://dl.dropboxusercontent.com/u/245 ... ollTo.capx

    The only way I can see this not working so well is if you need more control then that over your player character.

    Hope this helps!

  • infinite runner not example but it's template here it is

    Apologies, you're quite right its a template.

    TMAJA ,

    My tutorial on ways of extending the above infinite runner template is here : https://www.scirra.com/tutorials/1019/bite-sized-game-development-adding-complexity-to-infinite-runners

    There is a good idea behind your method, usually in an infinite runner you either generate the objects after a certain time and at a certain position, sometimes randomly, but you're building the entire level right at the start and not generating it on the fly so I'm going to assume you want your objects to be always fixed in the same place every time the level is played.

    The bigger issue for me is if you have a pretty large level, there are going to be a lot of objects in the layout, that aren't visible on screen, but will still be impacting performance.

    I need to head out for an hour but this little discussion interests me so I'll come back and expand on it further, even if you don't require any more help.

  • Your game sounds less 'flappy bird' and more 'infinite runner', although flappy bird is of course an infinite runner in itself in a way, so some of the same principles hold true. Have you had a look at the infinite runner example in C2? I also wrote a small tutorial about infinite runners, but I don't think this covers what we're discussing right now.

    I'd like to see a .capx if possible of your attempt with ScrollTo. In my experience, the issue with using ScrollTo for infinite runners is that it in my opinion it gives you less control over certain aspects of the game. Object instance generation and termination are much easier to handle, for example.

  • Is there any other reason other than CPU use for you to use ScrollTo? Are there some special events that need this?

    I have to agree with rezagamertag above. As you rightly say moving many objects is more CPU intensive than just moving one, but I'd say in most cases doing it this way will save a lot of headaches in the long run over using the 'ScrollTo' action. Just don't forget to terminate objects that fly off the side of the screen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is due on today, right?

    I'm unable to attend, for obvious reasons, but I'd be interested in how popular this event was/what kind of attention it drew, if those who were in attendance could say?

    EDIT : Or digitalsoapbox you could also say your experiences in teaching and what the people there were like etc

  • This is a basic game, and the first made as part of my series of tutorials aiding beginners into fleshing out their ideas for Construct 2. It uses assets and sounds from the freebundle, and its not particularly well polished, but I hope to add more depth to these tutorials and games as I go along.

    Please give the tutorial a read first if you can and leave a comment so I know where to improve for next time, thanks very much.

    The tutorial : https://www.scirra.com/tutorials/1019/bite-sized-game-development-adding-complexity-to-infinite-runners

    The final game, best on mobile but can be played on desktop : https://www.scirra.com/arcade/addicting-example-games/16443/rock-smasher

  • If you already have an ammo number variable, right click the 'On key pressed' condition, add another condition :

    System -> Compare variable -> "Ammo > 0". This will mean the object will only spawn if you press the key AND ammo > 0.

    To mirror the shots, I would change "player spawns X on image point 1" to "player spawns X on image point 1 at angle X" where X is a variable that changes depending on a Boolean that is true or false depending on wether the character is mirrored or not.

  • Hi all,

    While I have owned and used Construct 2 on and off for a while to make my own little games and projects in my free time, I havent really embarked on anything big. I've wanted to help what I consider a great HTML 5 engine, but I've been unsure how to become part of this community and what I could bring. I am however brimming over with ideas, so I thought about making a series of prototypes. Construct 2 due to its nature is a fantastic prototyping tool and has a great ability to give life to new ideas quickly. Hopefully by sharing my ideas and thoughts into how to quickly build new creative pillars I can inspire someone, and more than likely learn something myself.

    These would not be intended as tutorials due to their somewhat rough nature, and I am no artist so in game sprites will be a mix of placeholder shapes or mostly taken from places such as open game art.org, or from other free bundles and open source sprites. A lot of these will be uploaded via dropbox or on the scirra arcade for ease of access. While I do intend to make some games for desktop, many of these will be primarily mobile games, and so lets start with something relatively simple, perhaps the granddaddy of mobile gaming, if you owned a nokia anyway...snake

    BASIC SNAKE

    -------------------------------------------------------------------------------

    The premise of the original snake is simple, making it work in a game is slightly less so.

    Here is a very basic version of the original game I cobbled together : https://dl.dropboxusercontent.com/u/245987915/BasicSnake/index.html

    To play, click (or on a mobile device, tap) the left side of the screen to turn snake anticlockwise, and the right side of the screen to turn snake clockwise.

    Heres a quick rundown of what makes my version of snake run in Construct 2. I have an event that activates once every few ticks. The amount of ticks it takes can be varied by a global variable. The whole games mechanics run off this timer. I have a head object which moves in the direction it faces every time the event activates, a food object which is moved every time the head object touches it, a body object which spawns in the place where the head was every time it moves, and has a lifetime dependant on how much food the head has eaten, and a bonus object which spawns after a certain amount of food is eaten, and only stays active for a short time. There is also a behaviour to allow the head to 'warp' across the screen when it goes of the edge of the playing field. The objective is to gain as many points as possible, earned by eating food and bonuses, without crashing into yourself.

    BASIC SNAKE HD

    ----------------------------------------------------------------------------------

    Lets spruce it up a little! Heres the same game, but with art assets and sounds implemented, and with some animations, which luckily for me, can be found in the construct 2 freebundle.

    We're going to turn this game into a sort of 'Snake in Space' with the player as a ship, the food as miniature suns, and an alien ship for the bonus that you can plough through. Looks pretty good, and is very easy to add thanks to construct 2. Usually I would add these after all the functionality of the game is in place, but in this case I decided to put this step here just to show how easy adding art assets is.

    Heres what the original game looks like with the improved art assets : https://dl.dropboxusercontent.com/u/245987915/BasicSnakeHD/index.html

    BASIC SNAKE HD + "ROCKS"

    ----------------------------------------------------------------------------------

    So we have a working version of snake, but how can we add complexity to this golden oldie? You could add highscores, friend lists and other similar social things but the game itself is still quite basic, and game mechanics are what I want to mostly explore here. The game could go on quite a long time and get dull because the game is quite easy, and theres lots of space. Lets keep it simple, but add a layer of difficulty by giving the player something to dodge. Lets throw rocks at them! I have also tweaked the amount of points you get from bonus pickups to be equal to the time left on them, to encourage some speed.

    Some playtesting shows that rocks can pop up out of nowhere from the side and kill the player easily. It does seem a little unfair to spawn a rock with no warning, so lets have a timer pop up, similar to our bonus timer, whenever a rock is about to hit the screen. That should give the player time to react.

    While an element of frustration has been removed with this early warning system, now its very easy to get out of the way of the rock because we can see it coming ahead of time. Perhaps we could have more rocks, lets have it so that the rock can come from any of three directions, and give them all different timers that are randomised after each spawn! That should keep the player on their toes!

    The difficulty spike seems a little abrupt though. First no rocks, then rocks are coming from all directions. We can make the difficulty curve a little better by only randomising rock spawn times after they have spawned the first time. Lets make rocks spawn from the right after 100 timer ticks, rocks spawn from the left after 300 timer ticks, and add rocks spawning from below after 500 timer ticks. This should make for a nice easy ride to begin with, and should end with the player getting rocks fired at them from all directions, but with warning so they can react. We can adjust these numbers as appropriate if we feel the game is getting to hard or too easy.

    Here is the final version of snake + rocks : https://dl.dropboxusercontent.com/u/245987915/BasicSnakeHD%2B/index.html

    BASIC SNAKE HD + DESKTOP "ROCKS + SHIPS + MISSILES"

    -----------------------------------------------------------------------------------

    So we've got a nice little mobile game here that we've whipped up in a few days, simple aim, simple controls, slight difficulty curve.

    Im not going to add any further at this point, but for further consideration, you could easily add some more complexity that you couldnt necessarily add to the mobile game, and turn it into a desktop game. It would be easy to add keyboard controls for turning the ship, and a further control to fire a weapon. You could make the game significantly harder. The player could need to shoot down the rocks instead of allowing them to crash into the tail. There could be a hard mode where score is doubled but there are also enemy ships that attempt to shoot or crash into you.

    The game is still quite bare and missing a lot of polish, I havent added any stat tracking, like high scores and things like that, which I might in fact add over the next few days.

    Hopefully if this and the following episodes that I already plan to make capture some peoples attention this will become a long term thing, but for now, I'd just like to give something back to the community and the developers.

    This is just one basic addition to a game thats been around for a long time to add a bit more complexity, but in future episodes I hope to build several prototypes from one idea. That said, sometimes it just takes one idea added to an already existing one to make something great. You never know until you create it.

    I wanted to throw this out quite quick to get an idea of the reception this sort of thing would get, so this post is quite unpolished. I'll happily welcome any comments or suggestions. I initally plan to upload something once every 2 weeks, and I'm already working on the next set of prototypes.

    Thanks for reading!