Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Member Since 22 Sep 2011
Offline Last Active Nov 04 2014 05:23 PM

Topics I've Started

Animation program?

31 October 2014 - 05:22 AM

Hello, I'm looking for an animation program that's geared towards game developers. Right now, I'm using Photoshop and the game engine's animation features but they're both very limited.


For example, I made 4 stars in PS, and then I have to rotate them all inside the game engine to create this:





But, that's 4 rotating objects and grouping them all the time is a pain. I just want to have one object with 50 frames instead of 4 rotating objects with 50 frames.


Anyway, any recommendations?

Visual representation/Graphics

27 October 2014 - 08:33 AM

Hey gamedev, I've been working on this game on-and-off for a long time now. It's basically a runner where you need to press buttons at the right time to advance.

Anyway, I decided to add a 2 phase system. For example when you're in phase 1, you can only collide with blue platforms. When you're in phase 2, you can only collide with red platforms. It used to be only 1 phase, but it was kind of boring.

Now, the problem is that it is very unclear in which phase you're in at the moment. I need some more visual representation.

Video of game: https://www.youtube.com/watch?v=FVGq7qkvp0w (Background music picked up )smile.png

Game : https://www.dropbox.com/s/ev2tput1g6mq9y2/game.exe?dl=0 (ctrl to switch phases, space to jump. Sorry for the crappy levels.)

Yeah, to me right now it looks very unclear in which phase you're at. I tried changing the player colour depending on what phase you're in, but it looked very derp and didn't help. A while ago I tried a border, but it was very epileptic and unappealing.

Also, the levels look dead. When I add a lot of platforms to them they look a lot nicer, but the game becomes almost impossible to play because it becomes super hard.

So yeah, if I can't get a more clear representation I will go back to no phases.

Any suggestions on the matter? Thanks.

Calculating co-ordinates of a line/ray that's increasing in height with a known slo...

02 August 2014 - 05:53 AM

basically in my game I'm firing a line. The line's anchor point is at the very bottom of it, and half of its width.
When I fire the line, its rotation gets set to face where we want it to go. Then, with each frame of the game, the height of the line increases and it looks like the player is firing a laser.
Here's the code for the initial setting-up to fire and later move the laser. Javascript, using PIXIJS.
    function fireLazor(mouseData){
firing = true;
slopeY = (player.y - mouseData.global.y) / (player.x - mouseData.global.x);
slopeX = (player.x - mouseData.global.x) / (player.y - mouseData.global.y);

lazor.rotation = lazorRadians;
lazor.x = player.x;
lazor.y = player.y;
Alright, now that the laser is set to go all we need to do is increase its height and it will go in the direction we set it to go.

lazor.height += lazorAcceleration * DELTA_TIME;
Now, that all works fine and dandy. Here's a visual to help.

I first wrote some code to basically check the whole path of the laser and see if it hits something, IN ONE FRAME. It works perfectly, but it does so in one frame and the second we fire the laser. And obviously I need for it to check gradually as the laser travels.
The problem comes in when we want to collision check the front of the lazor to see if it hit something. We need to figure out what the co-ordinates of the front of the laser are. So, I thought that if we know the slope and the rate at which the height is increasing we can just do(simplified example that would run each frame, except of course without resetting the xtocheck and ytocheck to the player co-ordinates.) 
    ticks = lazorAcceleration / slopeY;
    xToCheckForCollsion = player.x;
    yToCheckForCollsion = player.y;
    for(i = 0; i < ticks; i++){
    xToCheckForCollsion += 1;
    yToCheckForCollsion += slopeY;
I've tried multiplying, diving, both slopeY and slopeX, and other things I could possibly think of. Multiplying by delta time in different spots, ceiling and flooring, just don't know how else to twist it.
But, that doesn't work. The collision checks sometimes get ahead of the laser, sometimes they get behind it and etc.
Does anybody know how to get the front-coordinate of the laser? Or maybe even do this whole thing another way, I don't know. 
SOLVED(not rly)
Alright, instead of doing that I just did some geometry and rotated a point.

Designing levels...

01 September 2013 - 06:57 AM

Hello, I had an idea for a flash game, basically it's a puzzle game that's tile-based. Each level has a finish that you must get to, but to get to it you need to place tiles that are given to you. I have a prototype going and it's not really a code intensive game, but the problem is creating the puzzles. Like, I only really thought of 1 or 2 levels but I can't come up with anything anymore, how do you do it? I mean, you could always "Borrow" them from other games and then take out some tiles to place, this is the last resort though.

Vector hell!

12 August 2013 - 12:09 PM

Hello, this is the first time using Vectors, and I don't get the math behind them. 


Here's my situation(3d Space):

Vector X

Vector Y


I want to get a third vector that goes from Vector X to Vector Y, and then I can just scale it myself. Halp.