jayderyu's Forum Posts

  • Since C2 uses a high resolution timer could C2 base it's draw.call on that. My math will be off of course as it's only a sample.

    But wouldnt it be best to just use a system of

    var draw_next;
    var draw_skip =33.2;
    
    while(gamerun){
      process_logic();
      if( draw_next < timer){ 
        draw(); 
        draw_next = timer + draw_skip;
      }
    }
    

    Of course there is fine tuning required. This is just a simple design. But this let's the game process logic at full speed. And once the time passes the draw process starts. This also let's the developer set the draw_skip value to whatever fps level they want.

    Of course I have no idea what is currently implemented :|

  • I agree a good lighting system in games that really use them is just amazing. So much personality and feelings can come from good lighting.

    I've seen some good lighting in C2 though, but it is a lot of work to do it in C2. No built in easy advanced lighting.

  • lucid

    Does Ashley have the new B6 specs? I would love to see the next C2 stable release and the B6 plugin all ready in the near future :)

    especially some of the peculiar stuff for first frame initialization.

  • There are few joint types missing arent there? Also aren't there a form of collision masks to turn collision on and off between objects when needed?

    This would help in making a physics platformer and get jumpthru.

  • yeah I agree. I would love to know what he wants for his project.

  • So any opinions on the demo?

  • You can ask the CocoonJS team to implement this. Otherwise no there is no keyguard for browsers that I know of.

  • I remember that sample. it's really cool.

    But SpriteLamp also support normal mapping and depth mapping which adds a lot of depth and colouring to an object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is ONE RULE TO RULE THEM ALL.

    CONVENIENCE IS KING

    The OP is right. It seems today that there a very large number of developers that have switched to using MAC. Even many Windows games are coded on MAC, but compiled on a Windows machine. Had a few job interviews and indie game companies and MACs where the number one computer I ever see.

    getting an entire office to dual boot is not convenient and so that doesn't fly. A 1 man developer that's fine. For an IT department at any game studio that's just not going to happen.

    So it's good to hear that this will come some day.

  • This is cool software. However I'm concerning over the practicality of this. Don't get me wrong I would love to use this in my games. I think the effect of dynamic lighting like this is gorgeous and adds depths. BUT.

    1. This is PC only tool. The result is 4 images per frame of any given sprite. 1 Diffuse and 3 Maps base on the light system. I have a demo game that has the PC where one animation has 60frames. That's 240 frames with SpriteLamp. memory and storage wise this is shot.

    2. Developer needs to create the base light maps to be processed. The guide shows that while it exports 3 maps it needs 2 to 5 light inputs. Again that's going to be for just one animation 60 frams where I need to create these light inputs. Can't imagine what this would be like over the entire characters animation.

    3. This seems impracticale due too number 2. HOWEVER this would work SUPER well for static parts of the level. Wich means that use of spritelamp only works best in games where light moves. Which is often dungeon games, dark exploration games where the ligth source is carried by the player.. though shooting blasters would look super cool too :D. But again only the terrain gets' the beenfit.

    4. The Only practical way to make this work for moving characters is to use Spriter/Flash like tween based animation. That's why dynamic lighting works for 3D models. 1 Light map and it's MAPPED over the 3D model. Spriter based animation would still require more. but at least it's not based on the sprite's angle an not per frame.

    BUT OH WOW. I would love this in my games.... super coool. WANT WANT WANt.

  • Anyway to remove this start up screen completelt. I thought the purpose of "Use loader layout" was to have out own custom screen asap. However for larger projects that start up C2 screen(I know I can change the icon) can sit up on the screen for 2 minutes waiting for the game to load. THEN it switches over the the loader layout for another 2 minutes.

    Half the time is spent on the screen which I would have thought only needed for c2runtime.js and the first layout assets. But it really seems half the game is spent on the preloader.

  • AnD4D

    because dt is still based on a millisecond clock. C2 uses dt based on a 60fps millisecond clock. So when you use dt your trying to create a universal math and multiplied value. The reason and it's just suspect reason that the 30fps dt isn't the same due to the idea that yoru also only processing logic at 30fps rather than continuing to handle logic at 60fps.

    Not that I would associate logic to FPS at all. I'm just using that as an anology.

    So on

    PC, box.ImpulseAngle(0, 100 * dt)

    iPAd, box.ImpulseAngle(0, 100 * dt)

    In theory tries to unify the the force based on the clock. So results should be similar.

    How physics works is that Box2D uses a time step.

    Each time step consists of 2 primary values.*

    * Step

    Step is the amount of px the objects moves per itteration. Large steps allow for farther movement. but this reduces accuracy for collision detection. This can lead bullets to shoot through objects.

    *Itteration

    The number of times the physics shuold take 1 step(above). The more itterations a Physics.Render will call step.

    Now when a programmer makes the basic timestep. it tries to take into account the difference of time from last frame render and how many Itterations shuold be called. However this usually works best for FASTER computers and often the basic time step doesn't do very well on slower than the primary development computer.

    This is the problem that's happening hear. Your slower computer can't keep up with out something to fix the speed value.

    Now how does dt come into this.

    Well keep in mind that the dt is a reference time between. 0.0 to 1.0. On a faster computer the dt is much smaller due to the fact that it does everything faster. Where as a slower computer dt is a larger number to compensate for the difference in time.

    So when you set your mobile game to run at 29fps vsync it falls out of sync. And the reason I think this is happening is because yoru logic is now running at 29fps(speculation based on what I'm hearing. In theory with all the exrta time your logic should be able to more than keep up... unless your game logic is throttled.

    So this is why I think the current C2 use of 30fps isn't to give developers more logic time for physics and game processing, but instead to slow down the game to run on older devices. So instead of giving you access to all the yummy CPU time. C2 drops everything.

    That's all speculation of course. but it's one reason why your game is having troubles with the lower 30fps.. you don't have more CPU time you have less.

  • AnD4D

    That's right. You shouldn't be using dt. I understand the the desire too. but it's a bad idea. Box2D isn't built to work with dt. Box2D has a straight foward information that the results of Physics from Box2D are dependent on the binary being run on. So this means that results will be different from different CPU render levels.

    Box2D suggestion is to just use different levels of settings for the devices. This is annoying. Instead there is a way better alternative. There is a high resolution fixed time step for Box2D. but it needs to be programmed in manually to the use of Box2D. The problem is that C2 fixed time step is rudemntary and not advanced enough to handle different platforms. You will need to modify physics timestep option. So every tick you will need t modify how many steps the Physics will use. This will smooth your physics.

    Also I want to point out that I'm not convinced that the 30fps implementation in C2 right now is the right implementation. From what was written it sounds like option doesn't limit just FPS rendering to 30FPS, but also your entire game logic. How hard is it to just say. Draw On Time X and to set that time X. I get the feeling this is an entire game slow down :( BUT I could be wrong and we might just need more practice.

  • That's amazing. I was going to make a Vania game some day. but I'll wait until your done :D

  • DPADS on a touch screen are EASY.

    Create 1 sprite with an arrow image.

    Create a var in the sprite called DIRECTION

    Have for ButtonArrow sprites with direction names for each.

    Then

    IsTouching ButtonArrow

    Function.Call(ButtonArrow.direction)

    Then do whatever game logic you want in the function. you can also do without the function. but doing it in the function allows for better future protability of the buttons and easier to integrate with keyboards and gamepads.

    Now if you need Analog directional input and not a DPAD. then I have a tutorial in the mobile section that covers the needs. It needs a small update, but the CAPX provided is up to date and shows how to cover pretty much handling all the C2 Touch hurdles.