Physics stuff...
Don't use physics for character movement. Or at least don't use a purely out of the box physics implementation for character movement.
Making the control of a character purely physics based often doesn't feel right and doesn't handle various cases the way that you want.
It sounds like the problem you have is with the time step not being locked.
In Javascript you could be seeing large fluctuations in dt if your code is causing the browser to garbage collect frequently. You should probably profile the code and see if you're seeing any spikes in processing on the time view and try and narrow down the routines which are forcing garbage collection and tidy these up. Pooling game objects rather than doing new/destroy operations is usually a pretty easy first step at cleaning this up.
Another thing to look at is by limiting dt, crappy psuedo code below:
- dt = getSystemClockTick();
- dt = dt < min ? min : dt > max ? max : dt;
- Do stuff with dt...
Physics is particularly troublesome with low refresh rates, so you could look at stabilising things with a Runge-Kutta approximation to smooth things over the time step. Fourth order approximation (RK4) is pretty solid but you could likely get away with a second order (RK2) if CPU cycles are tight.
Good luck!
Looking good man. I don't post in this thread often, but I read it all the time. You're game has come a long way since you first started posting about it. When is it out? I'd buy it.
razu, was "You is dead" intended? Neat video regardless!
I'm a little confused by those pictures because even if the framework reports an incorrect frame time your code, if it's working correctly, should give deterministic results in space, the only noticeable difference would be in time which I don't think those pictures show (unless they're jump height as a function of time). Or maybe I'm just making myself look stupid by posting when I'm too tired :e
Yeah, I put that in as placeholder text, but people reacted nicely to it, so it's staying. Kinda one of those things you'd never get through a 'proper' studio.. Like it'd ever affect one sale!! I like it!
It's the little things that matter: your text "Complete" underneath the first star is set about four pixels (ish) too far to the right. You can manually place it, or use some kind of measure string function to center-align it.
Yes, defeating the point, indeed.That makes sense. Like I said, I could always just implement my own delta time calculation, but I will not be able to use *ANY* part of Construct's physics engine (which is the main reason why I'm using it), since dt is built into their engine and evidently not calculated with enough precision. Unless I create all of my own calculations from scratch, I will not be able to circumvent their dt implementation.
Well, there is perfect convergence. The decrease in height actually tells... This could be the problem, but even the 30fps plot has enough points that it should solve the trajectory much more accurately than it does even with the Euler method. I don't think most platformers use higher order methods and they still work fine at 30fps. Also, there doesn't look to be any convergence from 45fps -> 60fps, just a decrease in height. Has to be a code problem.
Cool. Just wanted to make sure it was intentional. Really neat game, massive props for sticking with it all the way through the fit and finish part -- the part I always struggle with. Do you do it as a hobby or is it your job?
It's the little things that matter: your text "Complete" underneath the first star is set about four pixels (ish) too far to the right. You can manually place it, or use some kind of measure string function to center-align it.
The image you posted doesn't seem to be the same as the one I'm directly referring to...Now, here's a weird one! I looked and thought it was off too, (even though it's drawn centred at the same x-coord as the star). But looking more closely, it's actually fine! Some kind of optical illusion from having the word 'Fast' unbalance it I think! Cheers though! And you're right, the little things really add up to make the whole thing better.
Still, bringing that image into Photoshop, you're right, it does mostly seem to be an optical illusion (it is still one pixel too far to the right, according to my numbers).
You might arrange the three stars in a triangle (with the "Complete" one on top) to fix this issue, but that might be more trouble than its worth. Sorry for the trouble! The rest is looking great, by the by. = D
Our Ichi Post mortem:
Early 2011, everyone at Stolen Couch Games was still in school developing our exam year project Kids vs Goblins. Jay van Hutten, a fellow year mate, was developing a game of his own called Ichi. It was a elegant puzzle game that utilized a one-button mechanic in a way that didn’t feel gimmicky. The goal of the game was to guide a ball past a number of rings on the screen. By touching the screen you rotate bumpers, which caused the ball to change in direction. You could also hold your finger down to draw a line, once the ball hit the line it would travel back in the direction it came from.
About a half year later we spoke to Jay at a congress were he was demoing his game. I (Eric) shared my interesting in redeveloping Ichi for multiple platforms and making it a really great commercial product. Jay loved the idea and the day we finished Kids vs Goblins we were working together to make a bigger and better version of Ichi.
No developers were harmed during the making of this game
Redeveloping a game is nothing new to us. Stolen Couch Games actually started in 2010 when we got an assignment from Zoë Mode to create a multiplayer version of their hit game Chime. The multiplayer demo we made eventually led Zoë Mode to develop Chime Super Deluxe, which featured some nice multiplayer modes. While the programmers were re-creating Ichi in Unity, Jay and I were designing new features to add to the game. Because the core of Ichi was so sound, it wasn’t hard to come up with dozens of new puzzle ideas to make the game better. The final product had teleporters, splitters to create multiple balls, objects that could disappear and a few more things. Nothing too fancy, but it all worked great. The best thing we added was the level editor that allowed players to create their own levels and share them online. Since then, 11,000 levels have been shared, quite a bit more than the 50 levels we originally included with the game. Ichi launched in June, after 3 months of development, which went mostly smoothly. The actual problems started right after we launched the game.
Getting featured
We knew that many people would consider Ichi as just another puzzle game, so we had to let people know how special the game really is. We spent about a week contacting the press about our game and we got a nice amount of coverage. But press alone won’t make your game a hit. If you read any guide on marketing for mobile games you always get to the point were the importance of getting a feature by Apple/Amazon/Google is expressed. We already got a feature on the Mac app store for our first game, but our published arranged that. We didn’t have a direct contact within Apple, so we had to come up with a way to contact them.
Luckily we had a few device IDs that belonged to Apple employees on our Testflight account. So we found out the matching email addresses and we send separate emails to every one of them. 2 of them, responsible for the iOS AppStore, loved the game and showed the game to the rest of the team. Our contact from the Mac AppStore was in love with the game. We Skyped for a few hours and everything was set.
Ichi was Apple’s Editor’s Choice for a week on the Mac AppStore and on iOS we were bumped to the new and noteworthy category and we got a small banner in the games section.
We’ve seen developers doing no marketing at all for their games because they believe they’re games will sell themselves. This is mentality is wrong. Just look at the top grossing games on iOS. Almost all of them spend enormous amount of time and money on marketing. Only by spending time and money, will you actually earn money.
Mayday, mayday!
The launch of Ichi went great. We were selling thousands of units a day and those numbers were actually increasing the days after the launch. But than something went wrong. Suddenly the game would crash once it has launched. This had never happened in any of our tests before. Why did the game crash all of a sudden? It turned out that the firewall at our server provider, which hosted the user created levels, was malfunctioning. Since we had never encountered this before we weren’t prepared for this. As you can imagine we were pissed off, but the gamers were even more pissed off. The 1-star ratings were poring in, so we had to work quickly. Within a day we made a quick patch that made the game run again. We submitted it and Apple was kind enough to approve it in record time. But the harm was done. The sales momentum the game had was gone. Sales plummeted because of the bad reviews. Instead of getting thousands of sales at $4.99 a piece we were down to hundreds.
The lessons we learned from this is that you should be prepared for something you can’t predict or test. We expected our server to send just numbers to the game, instead it was sending lines of random code. For our next games we’re making sure that the game handles these rare cases the correct way. One day of extra development time is better than losing thousands of dollars in revenue.
Monetizing
We wanted to use in-app purchases in the game to earn some extra revenue post-launch. We were thinking of putting an in-app purchase on the level editor. So if you wanted to make your own levels you had to pay a dollar extra. But we opted against this because the editor would generate content for the game. Content is important so we couldn’t make the overall package weaker to earn some money. Instead we asked for an in-app purchase when the player played more than 10 user-created levels. We guessed that only 5% of the players might create a level and 70% would play user created levels. More people means more revenue. Unfortunately this tactic didn’t work.
We launched the game with 50 built-in levels and player could play 10 user created levels for free. At the end of 2012 only 300 people out of 400.000 bought the in app purchase, an insanely low percentage. Why did almost no-one buy the in app purchase? We think it’s because people were done with Ichi after playing 50 build in levels. Nobody is going to play 10.000 user created levels, let alone 100. Ichi’s retention wasn’t high enough.
Getting a lot of players, quickly
A few months after the release of Ichi sales were basically dead. We were making about $15 a day, which didn’t get us one step closer to world domination anytime soon. So we had to do something. Instead of letting our game die we looked at “free app of the day” deals. The first free app of the day deal we did was Free App A Day (FAAD). In one day Ichi was downloaded 130.000 times. We were blown away by this number. After this we contacted Amazon USA if they could feature us. They loved Ichi and featured it as their free app of the day. After that, Amazon Europe featured Ichi as well. AppEvent did the same, resulting in another 30.000 downloads from mostly the Netherlands
Ichi featured in the Amazon AppStore
Free app of the day promotions are great. Unfortunately it is unlikely that your app will become super popular once the promotion is over. We earned only $80 from the days after the FAAD promotion. But still it is better than nothing. One good tactic might be to get a lot of downloads using these promotions and then switch to a freemium model. You will have hundreds of thousands of players who will generate revenue though ads and/or in app purchases.
Critically, Ichi is a great success. We’ve gotten wonderful reviews and players seem to love the game. But commercially the game hasn’t done that well. We barely broke even on the development costs. Most of the revenue came from the Mac version, mainly due to the feature by Apple. iOS came in second, revenue-wise. The Android, PC and Linux versions didn’t make more than a few hundred dollars. Despite all of this we feel that Ichi was worth our time, it was great developing it and we delivered something we’re proud of.
It's still crazy to me that games like Hard Lines and Ichi can get featured and receive critical success, but still struggle to make good money. After my first iOS game I'd already decided it wasn't worth the risk again to rely on mobile for revenue. ...
tl;dr: Game developers arn't publishers.
Pretty much.
My aim for this game is: Become A Published Indie Developer
So, I can't fail.
As a freelance developer, hopefully it'll be a good advert for my skills. And having a game you made entirely by yourself gets past the "What bits did you do..." obstacle of talking to new clients about the titles you've worked on before. The answer becomes: All Of It!!
Promoting and getting Chopper Mike seen by a reasonable amount of people... seems as much chance of winning the lottery.. but, then, someone wins that every week!!
I'm more excited about the things I can't imagine, like the emails and meetings I've had just from posting about my game. That's cool!
If you count success purely in terms of financial success, then I think you're in for a tough time. But if you look at the bigger picture, just getting a game out is a massive achievement! So, big high fives all round to published and to-be-published devs!!
Making video games is and always has been favorite hobby, and I think I want to keep it that way. I don't want it to become a job.
Wait until you have a family. Working nights is OK for a while, but at some point you realize that making games is a very hard hobby to keep when you have a full time job and a family.
It seems to be the goal, indeed.... Part of what I'm looking forward to in getting Chopper done.. is getting some spare time back! Imagine the luxury.. finish work at 5:30pm, don't write code until 9am the next day!! Or from Friday 5:30pm to Monday 9am!!! Paradise! ...
http://globalgamejam.org/2013/cis-dis-vs-beat
http://globalgamejam.org/2013/stoneheart-beauty-beast
http://globalgamejam.org/2013/coward
I don't know whether it's encouraging or discouraging to see people make more in a weekend than I do in 2-4 years.
This is the tale about a knight who is madly in love with Lady Gloria. To overcome his fears he asks four villagers to help him on his epic journey. In a hectic 4 player co-op mode you and your friends take control of the villagers.
Use your tools wisely and gather the required resources to make the castle even more presentable when the Knight finally admits and shows his true love to Gloria.
Work together to achieve the end goal, gather resources, pickup fancy hats to show your true style and enjoy the sights. Or even stab your friends in the 4 player co-op saboteur mode in which one player will work against the rest! Has to be played with four controllers.
I don't know whether it's encouraging or discouraging to see people make more in a weekend than I do in 2-4 years.
I don't know whether it's encouraging or discouraging to see people make more in a weekend than I do in 2-4 years.
There is basically no code. Literally just 4 lines simulating a jump to the right and spawning the little colored squares - this is looped 3 times with different colors. The rest is Construct's physics engine doing the work. You have parameters here to change gravity, acceleration etc., but that doesn't happen in the code or at runtime. What you see causing these wildly different jump arcs is *only* the framerate changing.
And even with no change in the framerate, this is the result due to (unavoidable) framerate jitter (+/- 2 fps):
^ And that's just one example. Every time you restart the simulation the difference in the arcs between the three jumps is slightly different. It is only predictable in the way that the framerate jitter is. In this post I described the only way to get deterministic results: forcing the engine to literally stop whenever it doesn't render at a full 60 fps. It is bizarre that this is necessary and the fact that their delta time implementation, however imprecise it may be, can't even compensate for minimal framerate jitter of +/- 2 fps is certainly baffling as well.
But rest assured, this is a fundamental flaw in Construct's physics engine. It has many of those.
Our Ichi Post mortem
I don't know whether it's encouraging or discouraging to see people make more in a weekend than I do in 2-4 years.
Yep, I went to the last two global game jams, and sort of made a failed ludum dare attempt.The thing with Gamejams is you have so little time, so you're super focused on getting something cool done. No feature creep, no spending forever polishing stuff.
Have you ever jammed before? If not, give it a shot. It's very refreshing.
[EDIT]Hell, we should do a 3 hour or so Jam sometime with GAF. Everyone gets the same theme and a couple hours (3 to 5 is ideal) to make something. You'll learn new stuff, it's a fun time killer and by the end of it you'll have a little game to release.
Just out of curiosity, may I ask what your target platform is? (assuming it's not PC)Does anyone here have any experience writing a custom memory manager for their game? Game Engine Architecture has a section on it, but there's some things I'm not entirely clear on, such as how to store the free list in a pool allocator and so on.
Just out of curiosity, may I ask what your target platform is? (assuming it's not PC)
I kind of have the same aspiration only I'm not a developer really so if I don't make money there's no real world benefit like you have with chopper serving as a portfolio entry or resume padding. I guess it's basically an art project for me. Seeing what I have in my head turn into something concrete and interactive in front of me is quite satisfying. Im just making something I think will be fun and hopefully everyone else will find it enjoyable.Pretty much.
My aim for this game is: Become A Published Indie Developer
So, I can't fail.
As a freelance developer, hopefully it'll be a good advert for my skills. And having a game you made entirely by yourself gets past the "What bits did you do..." obstacle of talking to new clients about the titles you've worked on before. The answer becomes: All Of It!!
Promoting and getting Chopper Mike seen by a reasonable amount of people... seems as much chance of winning the lottery.. but, then, someone wins that every week!!
I'm more excited about the things I can't imagine, like the emails and meetings I've had just from posting about my game. That's cool!
If you count success purely in terms of financial success, then I think you're in for a tough time. But if you look at the bigger picture, just getting a game out is a massive achievement! So, big high fives all round to published and to-be-published devs!!
I guess the thing is, PC (and potentially several other platforms? I really can't answer on this front) is presumably going to manage your memory allocation and free requests perfectly well, unless potentially you are making a huuuuuge 3D open world engine or something.Well, potentially every platform. I think I understand it better now, re-reading it, basically you use every free block to store a part of the free list since there are as many free blocks as there are entries in the free list. I'm not really writing an engine so much as experimenting with stuff that might be useful if I were to make an engine. Just general tools and techniques, really.
I guess the thing is, PC (and potentially several other platforms? I really can't answer on this front) is presumably going to manage your memory allocation and free requests perfectly well, unless potentially you are making a huuuuuge 3D open world engine or something.
This means that you may well end up in the situation of spending a lot of (limited?) time to learn about something that is probably not at all necessary for actually making games.
Now if you're say, studying computer engineering (I did, got my M.S.) and really want to understand memory allocation for reasons along those lines, great. Or if you have free time and you just like understanding it, great. But if your actual goal is an engine and/or game, 2D or even 3D, and you have limited time because you're working a job as well, I don't know that it'd be the best use of your time, just my respectful opinion.
Does anyone here have any experience writing a custom memory manager for their game? Game Engine Architecture has a section on it, but there's some things I'm not entirely clear on, such as how to store the free list in a pool allocator and so on.
I did a basic memory manager for the 3DS version of Gunman Clive, but I don't really know what's considered to be the best practice. I basically just divided up the memory in a bunch of chunks of a few different sizes and had a simple array to keep track of which chunks were occopied.
I'm currently studying for a master's degree in Computer Science, so yeah, it's more a learning experience than anything else. The book does mention that you can get away with using the standard malloc() and free() if you're developing a PC game because of how the hardware is architectured, but I figured it'd be useful to know how to do were I to develop on another platform.
That's nice to know. Out of interest, how did you deal with dynamic allocations that weren't of a common fixed size (e.g. a struct or object)? Round the size up?
I just received my finalized 8 track OST made for my game, I hope you guys like bass driven dubstep chiptune boss themes
seriously