Wednesday, November 28, 2012

And so it ends

Okay exams are done. I'll edit this post with whatever I manage to make in the next few days. Hohohohihihihhehehe.

Sunday, November 11, 2012

Exams

This game is on hold until I am finished with these 'exam' things. See ya in a few weeks!

Friday, September 28, 2012

Animation - It continues

Hey dudes. I made some more frames of animation for Centure. Found a really great program for it: Graphics Gale. It's a little unwieldy at first but it's worth learning because it has some really useful features. I love my paint.net but I'll be using this from now on for animation at least.

Here's some punching animations I made. If you want you can use 'em to play around with animation. Make a .gif, do whatever. I'll probably share a bunch of these by the time the game is done. Whenever that is. I need to edit these a tiny bit.


I'm planning to make a little game in the console (command line window for the uninitiated). But it involves doing all the crap XNA was doing for me. I'll put it up here if I manage to get it running. It really shouldn't be hard to make after I get everything set up. But this is programming so it could be terrible :P.

Wednesday, September 19, 2012

Animation - It Begins

I have the beginnings of Centure's animation set up. Have a look at this video that explains where things are at the moment:


To give you an idea of what animating is like, here's what some of the frames look like:


I made 8 of these for the walking animation. That was a fun day. The game should be done in two days (lol).

Sunday, September 2, 2012

Your mom is a collision

Today I got rid of a few major errors in my collision detection system. I had a terrible one where collisions from the bottom refused to happen and another one that made the character bobble in and out of the platform slightly. Those are now gone. There are still a few that need to be worked out however.  Somehow changing my movement class started creating bugs in my previously sublime collision detection system. Most of them have required me to add a little room for error to fix... once I've found the cause.

I also worked on the camera for ages trying to emulate Cave Story's cool inertia effect. I think it was coded  pretty simply it's just that that game doesn't have to account for the player speeding up a lot so it didn't have the issues I had when trying to code it. So I made my own version of things that I'm pretty happy with. Maybe I'll change it later.

I also changed the size of the window on start up. We now have an interesting 1200x675 which is quite sexy but not nearly as sexy as full screen mode. The scale of Centure was a bit big for the standard 800x450 so I bumped up the screen size 1.5 times while keeping everything else the same.

I don't think I should create the first level until I have all the collision stuff fixed. Urgh.

Here's a screenshot of the platforms I've been messing around with to test out movement.


Lol I've just realised this entire blog is me talking about collision detection and not making a game haha! Well my original game was a complete mess so I'm glad I started again and now I'm ridiculously close to being done with collision detection that works on slopes! It's waaay better than what I started with!

Here's a new To-do list so I can have fun crossing things off:


  • Fix up that gravity (90% done)
  • Fix collision issues
  • Cut down on collision checking using some variation of intercepting rectangles
  • Make sure collisions work in a way that the character can change size at any time
  • Entering polygons via CSV (probably)
  • Work out an animation class 
  • Get all of Centure's animations back (70% done)
  • Make a running animation for centure
  • Figure out how Centure's tranformation will work in different contexts
  • Create a better way to initialise levels
  • Draw some clouds (Yeah! Clouds!)
  • Create more platforms for the first level
  • Design the background art for the first level
  • Create animated and non-colliding objects
  • Rework the camera class
  • Make CenturePoly symmetrical since rare cases will cause collision issues
  • Think of more stuff for this list
  • Wednesday, August 29, 2012

    A wild header appears

    So today I tried for like an hour to draw girl hair for Lera since I feel her design is missing something but I kind of suck and everything I make looks worse than how it is now. So I got bored of doing that and made a header for the blog. It's also basically what the title screen of the game will look like.

    I'm hoping I can recreate this scene at some point in the game. Maybe Centure will be heading off into danger and ignoring Nybble's requests to turn back so he shouts out to him: "CENTURE!". This reminds me of the work I'm going to have to do to set up all the in-game text. I've never even done anything like that before so I'm going to have to figure it out from scratch. Shouldn't be too terrible though.

    The idea is that the dialogue won't freeze you in place so you can just ignore it and keep on playing, hence the see-through text-boxes. It also means you can jump around like a lunatic while reading it if you care to do so. None of this text will be anything tutorial-related though. I'll leave it to the player to figure things out.

    Tomorrow I have a crazy short university day so I'll probably get to work on the game. And by work I mean write some more code to fix some stuff from the previous post. Probably.

    EDIT: Just for reference here's my old to-do list:


  • Make sure collisions work in a way that the character can change size at any time
  • Decide on how to determine when the character is on the ground
  • Fix up that gravity (90% done)
  • Jumping
  • Clean up the movement class
  • Entering polygons via CSV (probably)
  • Work out an animation class
  • Improve the camera
  • Set up an option for 2x size graphics
  • Sunday, August 26, 2012

    I put in a good day's work

    Start of today:
    • collisions broken
    • no gravity
    • no polygon flipping
    • no jumping
    End of today:
    • collisions less broken
    • gravity works
    • polygons flip
    • jumping works
    • fine-tuned movement
    For tomorrow:
    • variable jump height done :)
    • fixing collision bugs
    • starting animation
    • cleaning up code
    • improving camera positioning and movement
    • and more!
    If you like reading lists of things this post is for you! If not here's a gif for you:




    Wednesday, August 22, 2012

    Minkowski Collisions - I Want My Game To Have Slopes!

    I'm going to outline how I did the collision detection in my game. I'm not going to provide actual code, just the idea behind each step. You have to code it yourself and work out the issues yourself. You can see a video of this system in action in my previous post.

    First I'd like to recommend this brilliant article by David Rosen about using vectors in games. There's lots of interesting stuff there that can help you out and since I'm going to talk about vectors a tiny bit in this guide you can go and get the relevant info there.

    Taking the Minkowksi Difference:


    The idea behind my collision detection system is the Minkowski difference. If you're a boss at understanding things (unlike me) you can check out this guide to Minkowski collision detection and ignore the rest of this post. I mostly used it for the flash app on that page to provide some intuition of what Minkowski difference actually does.

    Why use Minkowski? What is it?

    The Minkowski difference takes two convex polygons and produces a third. The way it does this is by taking the coordinates of each vertex of the first polygon and finding the difference between that and the coordinates of each vertex of the other polygon. This produces a scattered array of points in space.

    e.g. The Minkowski difference of {(1,1);(3,1);(2,2)} and {(2,1);(4,1);(3,2)} is:
    (1,1) - (2,1) = (-1,0)
    (1,1) - (4,1) = (-3,0)
    (1,1) - (3,2) = (-2,-1)
    (3,1) - (2,1) = (1,0)
    (3,1) - (4,1) = (-3,0)
    etc...
    (2,2) - (3,2) = (-1,0)
    You'll end up with 3*3 = 9 points.

    We can create a shape using the outermost of these points. If that shape contains the origin, then we know we have a collision. This is our goal. Using polygons for the player and every other object means we can use the Minkowski difference polygons to work out how collisions with these objects would occur.


    The polygon I currently use for Centure

    Sunday, August 19, 2012

    So I did some stuff and now I can make a game

    I worked on ironing out bugs in my collision detection system today and I think I finally have it working! Even if it is its simplest form. It's a miracle! Here's a video about it:


    Go watch it on youtube.

    Here's some stuff I still need to do:

    • Make sure collisions work in a way that the character can change size at any time
    • Decide on how to determine when the character is on the ground
    • Fix up that gravity
    • Jumping
    • Clean up the movement class
    • Entering polygons via CSV (probably)
    • Work out an animation class
    • Improve the camera
    • Set up an option for 2x size graphics

    Friday, August 10, 2012

    I am doing stuff I promise!

    Just so you know I'm not being (that) lazy, here's what I've done since my last post:

    • Designed and animated my first enemy. A very basic, canon-fodder type.
    • Designed and animated my second enemy. It's an extension of the first and I had to individually draw 15 or 16 frames of animation. Madness.
    • Designed Lab 17, Lera's base of operations.
    • Designed the first level of the game.
    • Designed the in-level textboxes. I made them semi-transparent for reasons you shall later see.
    :\
    ROAR!!
    What's that you're standing on Centure?

    Wednesday, August 1, 2012

    Another concept

    I just like updating this after I design something new. You can take guesses about what everything will be for.

    NB: This is an image of what the game will look like using the resources I've designed so far. It's not an actual screenshot. Yes there will be a background.


    I don't have enough time or motivation to program collision detection after a day at university. But I don't mind designing or animating since it's less effort. The weekend should allow me to get to work on it properly.

    Sunday, July 29, 2012

    Concept of opening level platforms

    Yep, an idea of what the platforms should be like in the first level and perhaps the first world. How specific is that? I'm surprised by how well this scales! I need to set up the game at double size sometime.


    This is my idea so far. It'll be a world of levels that focus on jumping probably. I'm scared of how many platforms I may have to make. Maybe I'll cheat a bit.

    Today I programmed in the morning and worked on graphics in the afternoon (with loads of breaks because weekend). I could totally turn that into a habit. Making graphics is really relaxing after all that thinking.
    • Set the camera bounds when loading the level... (Have I done this?) Now I have :)
    • Start work on collision detection before doing anything fancy 
    • Remeber to code it in such a way that the character can change size at any time
    • Find a way to define all solid objects as polygons now i just need some convenient way to load them
    • Figure out how to detect collisions between these polygons and the player and move the player out of them apropriately
    • Decide on how to determine when the character is on the ground
    • Jumping
    • Flipping the polygon of the character
    • Entering polygons via CSV (probably)
    • Work out an animation class
    • Improve the camera
    • Set up an option for 2x size graphics

    Saturday, July 28, 2012

    Collisions are red

    Pretty self explanatory. It only stutters like that in the video.


    • Set the camera bounds when loading the level... (Have I done this?) Now I have :)
    • Start work on collision detection before doing anything fancy 
    • Remeber to code it in such a way that the character can change size at any time
    • Find a way to define all solid objects as polygons now i just need some convenient way to load them
    • Figure out how to detect collisions between these polygons and the player and move the player out of them apropriately
    • Decide on how to determine when the character is on the ground
    • Jumping
    • Flipping the polygon of the character
    • Entering polygons via CSV (probably)
    • Work out an animation class
    • Improve the camera

    Tuesday, July 17, 2012

    Mr. Minkowski what are you doing in here?

    So I've been back working on the game these last few days. I'm using Minkowski difference to figure out if two shapes are overlapping. I'm going to use it for collision detection. This should make it easier to do collisions on slopes and with different shapes than just rectangular platforms. I came up with my own algorithm for doing the Minkowski difference. Actually I came up with more than one and wrote it a few times before I settled on this one. I'm not sure this is the best way to do it but I'm quite happy I was able to come up with something that works and I guess I can replace it later or edit it a bit since I have a few ideas to make it more efficient.

    I'll make a video showing what it does. I've got a hazy idea of how I'm going to use it for collisions that I'm going to have to flesh out next. Once that's working (this could take me a while though) I'll be able to move on to things like animation and the full range of character movement. Only then will I design the first level. It may be slow but I'm making progress! I still have no intention of giving up on this project.

    Now get out of my house Mr. Minkowski! You're a function now and I'm done with you!

    Here's my to-do list from last time:

    • Set the camera bounds when loading the level... (Have I done this?) Now I have :)
    • Start work on collision detection before doing anything fancy 
    • Remeber to code it in such a way that the character can change size at any time
    • Find a way to define all solid objects as polygons now i just need some convenient way to load them
    • Figure out how to detect collisions between these polygons and the player and move the player out of them apropriately
    • Decide on how to determine when the character is on the ground
    • Jumping
    Here's a silly video about Minkowski difference:

    Friday, June 1, 2012

    What's Happening

    After a period off from working on the game I realised I've kind of made a mess. Literally. My code was all messy and inefficient and I found it hard to get back into working on the game. So I've decided to start from scratch and get things up and running again with a bit more planning this time and a more orderly structure so if I  take a break it's not impossible to come back to it. To anyone who's thinking: "Why don't you just work on it like it was?" trust me it's for the best that I don't do that. I've got too much to fix on that old version for me to even consider it. The cool thing is that taking a step back for a little while means I can see that more clearly now.

    So anyway progress continues on the game. I have been back to work on the rewrite of late despite my loooming exams. I've written a sort of game structure and am working on making some code for moving characters around reusable so I can just use it for enemies and whatever else I decide to chuck in there. It's all simple in concept and then damn complicated when I actually have to do it. But a great thing about making a game is how many strange unexpected problems it throws at you. It's a great way to learn about programming without having to construct meaningless problems for yourself to solve. There are so many problems pre-built into making a game it's like a student's nightmare dream!

    I expect to be finished with the game in around 3 months. Lol.


    I'll just edit this post until something interesting happens. My word I'm working slowly. I can't wait for these exams to end!

    Things done on the new version - update of randomness 13/06/2012:

    • Created a system to handle loading the right graphics for each level. I tell it what level and it loads the graphics. Mostly just boringly designed platforms. Admittedly I only have one level but I have tested it. I think.
    • Created an input system that converts keyboard input into a direction vector (basically just keeps track of up, down, left, right, nothing, or any combination of those) and some other variables to keep track of other buttons. Oh and I made it pretty simple to change the controls for later. The reason for the whole conversion thing is because I...
    • Made a movement system that'll contain a bunch of functions (tools) to move the character (or indeed anything) around given the right input. But since the keyboard input is turned into this other form I can use the keyboard input for these functions or just give it input and it won't know the difference.
    • Made a camera that is restricted to certain bounds. I'm planning to make it able to follow any object I choose. That way I can switch it to random objects and amuse myself.
    • There's also something that defines everything in the game as an object - maybe I should have used the term sprite? - and stores the properties of that object and then a special version of that I made called a playerobject that's for the player. It was the first thing I made.
    • Made functions for movement for a topdown or sidescroller game. I could always use the topdown one for enemies that hover or something since I do intend to keep this a sidescroller. I also added inertia to these which you can set to anything you like.

    And here's a little short term to-do list:

    • Set the camera bounds when loading the level
    • Start work on collision detection before doing anything fancy
    • Remeber to code it in such a way that the character can change size at any time
    • Find a way to define all solid objects as polygons
    • Figure out how to detect collisions between these polygons and the player and move the player out of them apropriately
    • Decide on how to determine when the character is on the ground
    • Jumping





    Tuesday, April 24, 2012

    Update

    Here's a quick status update. The game has remained largely unchanged since my last post. I've had a series of tests in quick succession and haven't had a chance to update it. I'm happy to say I should be able to get back to work on it tomorrow. And I'm super keen to get back to it. I have a strange desire to... animate things. It's not very fun drawing each frame but when you're done and you see things moving and looking natural it's an awesome feeling.

    So in the mean time here's a skin I made of Centure for minecraft a while back. It's not exactly perfect so feel free to edit it and turn him into... a zombie or a goat version of himself or just make a better version if you're artistically inclined. I'm okay as an artist and I hope I improve while making the game. Half the fun of making this will be to improve all my skills.

    Minecraft skins sure are tiny. Now I need to study for another test.

    Friday, April 13, 2012

    The Story

    So today I took it easy on the coding and wrote a basic outline of the story. It's surprisingly sci-fi! I'm not even a huge fan of science fiction but there you go. I added a synopsis to the right of the blog there. I'm sorry if it's hard to follow. I want to tell you what's going on but also... don't want to tell you what's going on. If you know what I mean.

    Here's a description of the major players (so I don't forget haha). I'll add the character art as I design it:

    Centure: Created by Lera, he's the newest Biological Creature and our protagonist. He doesn't say much but he knows more than you think.


    These are Centure's 2 forms

    Lera: The creator of Biological Creatures. She's wanted after avoiding the police following a terrible accident that occurred during the creation of the Biological Creature she attempted to make just before Centure. Several people were killed in this accident - serious stuff!


    Lera - early version - I might change her completely

    The Corha World Government: They funded and powered the Biological Creatures operation but are now trying to wash their hands of it. And that means destroying every Creature Lera has ever made.


    I will never ever animate this - well maybe one day

    Biological Creatures: Creatures created by Lera as requested by the Corha World Government. Lera wishes to save them and does not believe they deserve to be destroyed. They are slowly losing power as their power source has been removed by the Corha World Government. Centure, the newest, suffers the least from power-loss issues.


    Lera and Centure

    Nybble: Lera's computer. A lighthearted A.I. who communicates with Centure by writing on the world around him using a new technology developed by Lera. In contrast to Centure, Nybble never shuts up stops talking.

    EDIT: I've since changed this idea. Though writing on the world sounds cool, I feel like it'll be basically impossible to read while moving which breaks the flow of the game. I have another idea though :)

    Hopefully, armed with this information, you can more easily understand the synopsis.



    Moon

    Moontastic!

    Hey dudes! It's been a while. I've made quite a bit of progress since my last post. I worked on my new collision detection system (mentioned in the "plan" post) and managed to get it about 80% working. Enough to make it playable which is good enough for today since I'm tired of working on it. I also did my first background. It was a pretty hasty job but it looks pretty awesome! I can always go back to it and make it look even better later. It really adds to the atmosphere of this first level.

    Click for a mini version of the background art

    The first level's aim is to teach the player the game mechanics as seamlessly as possible. See the "z" in the first picture? It's a puzzle of sorts since it's up to the player to notice it and press the corresponding key on the keyboard to see what it does or they'll be stuck falling into that pit forever. I'm certainly not going to tell you the controls!

    Next up is to complete the design for this first level (I'm about 50% done), work out the bugs in my collision detection system and finally finish the animations for the big character.

    Saturday, April 7, 2012

    Moving Slowly Onwards

    Things are gradually moving along. I've added a box around my character to cut down all the collision checking the game has to do. So now if something's in the box it can worry about a collision in the next frame, if not it can just idle along. Yep I'm saving processing power on a 2D platformer.

    I uploaded a video where you can see what the box actually looks like and a nice glitch I've run into. I figured I'd be able to see why it happens in SLOOOW MOOOOOTIOOOON but no luck there.

    The box wont actually be visible in the game I just made it like that so I know it's working as intended. Good. Great. Now to fix those bugs.



    Monday, April 2, 2012

    Minigame: Evil Eye

    This was designed in my car

    So I made a little "game" I've decided to call Evil Eye to play around with per-pixel collision detection. Actually it's more of a toy than a game. I did half the coding while in the car! I'm on holiday now and may not be able to work on the game much in the next few days. But I'll get back to it ASAP. As for what I've been doing until now... getting my driver's license. Not even joking.

    So Evil Eye is a test. I'll put it up for download for you guys to mess around with. There's no goal to it and if you can't get it to work you're not missing much. Trust me. I'll put it up on mediafire and hope for the best:

    Evil Eye - A per-pixel collision test program. Let me know if the download works.

    Next up is to implement this in the actual game, after that I have to complete character movement for the big version of the character and then I can start enemy and level design!


    Wednesday, March 28, 2012

    Nice

    The plan behind the plan:

    I'm writing this for myself as much as anyone else. It's a plan of action. I've been using an interesting (read wrong - at least I think) method of collision detection. I made it up myself. It works but it's pretty slow and causes loads of problems and it hurts my brain fixing them and my fingers typing them and my eyes looking at my ugly code. So. The new plan is another method of collision detection that may or may not work. I've made a copy of my game if all goes awry so I can go back to what I have now.

    So what are we doing eh, CentureMan?

    Short version: Better, faster collision detection.

    Long version: Welllll, I'm going to use the amount of overlap in collisions in addition to the speed the character was going, both vertically and horizontally just before the collision to decide where I will put him so he doesn't get himself stuck inside walls. That was my original problem: I can work out if he's in a wall now how do I decide where to put him to get him out? Where did he come from exactly? I think I can figure that out now.

    The other thing I want to do is use this per pixel stuff in conjunction with this new method. I've never done that before so it should be interesting. I think I'll start off by making a little program that does that just to test it out and learn the ropes.

    So how long will this take?

    Probably a few weeks, but in theory it'll be faster than my old method. We'll see how things go.

    I want a picture

    Okay
    This is what the game is about.

    Monday, March 26, 2012

    I see more collision detection

    Check out this link: http://create.msdn.com/en-US/education/catalog/tutorial/collision_2d_perpixel

    Per pixel collision detection - very cool. My game doesn't have this yet but it's a priority now. It looks simple enough to add too. At the moment I have a block around my character that I'm using to detect collisions. The problem with this is that he's wider than his feet, so he can hover over the edge of platforms, standing on nothing because the square around him isn't over the edge yet.

    What per pixel collision detection does, is check every pixel in the image and see if it's colliding with the pixels on another image. It's on my to-do list. Now to do some real work :/

    Thanks to Evan for linking me to this.

    This is his true power. Or a glitch. Nice lack of background.


    Let's get cracking

    What is Centure?

    Centure is a game I'm working on in my free time. It's a 2D platformer (much like mario bros.) revolving around the idea of switching between two versions of the same character on the fly. You'll see more in due course.

    Who are you?

    I'm that guy that made Centure.

    Why that name?

    I just made it up to have something to call this blog and I'm sticking with it. Seriously.

    How far are you now?

    Right now? I've been working for a few weeks now and I'm gradually getting the character movement down (together with collision detection). I've never made a game before and this is a spare time project so excuse the slowness of my work. Rest assured there's loads of effort going into making movement perfect so the rest of the game isn't hampered by it. I want it to be fun just to move the character around.

    Are you going to give up on it?

    No.

    What's this blog for?

    It's just a place where I can update anyone who cares about how development is going.

    Can I help?/ Do you need help?

    Nope! Sorry, but I'm really interested in seeing how far I can take this on my own. It's sort of a challenge for myself. I'll be doing everything myself except testing. You can help with that when the time comes, I guess.

    If you have any other questions, just chuck 'em in the comments. I'm sure there'll be millions seeing as this is such a high profile game and all.

    A rough draft of a punching animation