Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Asteroids!  (Read 14515 times)

0 Members and 1 Guest are viewing this topic.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« on: June 17, 2011, 07:13:14 am »
Asteroids! blog

Latest post - 14/Nov/2011 - Giving shape to the world - One step closer to the dream.

Latest demo - 07/Nov/2011 - Framework-0.0.8 - Moved to zip files so that people didn't have to deal with unpacking 7z files.

Now with This should give the people that can't see the videos a glimpse of what I'm working on.

Basically, I started out with the grand, ridiculous dream of building a procedural universe. A sci-fi sandbox to fit an Elder Scrolls sort of open ended RPG into.

While this remains the ultimate goal of this project, it would be unrealistic to hope to reach that point on the first go. Instead, for it's first iteration, I want to make a relatively simple 'Asteroids 3D!' game, with newtonian physics and blastery, crashing (into the asteroids, hopefully not the computer) fun.



While still pretty up there in terms of difficulty, especially for a single developer's first attempt, it should be achievable in a reasonable timeframe.

The project's overarching goals, however, require a pretty robust framework be put in place. So that's what this project is about; trying to figure out a program design that will be extensible, flexible, portable (though this is low priority) and powerful enough for my needs, while still keeping it fun and focused.

My tools are the OpenGL SuperBible 5th edition, Code::Blocks, MinGW, SFML, GLEW, and Git. And not enough free time.

I'm keeping a blog detailing my efforts here. I began writing for myself, so it can be difficult to follow at times, but I've been improving in that regard.

It recounts my struggles with NeHe's tutorials and SDL before I knew anything about shaders vs. fixed pipeline. In this regard, the SuperBible has been awesome. Highly recommend it to anyone who wants to work with OpenGL. It also has a nifty library and tutorials I've been canibalizing as I go.

I had a GitHub repository but I started using BitBucket instead. TortoiseHg is a much nicer GUI, I think. I want to clean up the code a bit before I let other people peek a it, though. It's an embarrasing mess of spaghetti right now.

--- Updates ---
Monday, November 14th, 2011
Giving shape to the world - One step closer to the dream.

Monday, November 7th, 2011
Been a while. New demo out :D Lighting now works. So shiny!

Looking good. Looking real good.

Framework-0.0.8 - Moved to zip files so that people didn't have to deal with unpacking 7z files.

Monday, October 10th, 2011
New Demo out! Now with collision detection worked into it.
Framework-0.0.7 - Bouncy
Also posted on the blog, how space partitioning helps cut down on the computation required for collision detection.
Collision Detection - Part 3 - Space Partitioning - Divide and Conquer

Monday, October 3, 2011
Been a busy week, couldn't get a lot of work in, but I had time for an update to the blog.

Collision Detection - Part 2 - Resolution - What do we do after detecting the collision?

Monday, September 26, 2011
Collision Detection - Part 1 - Detecting it - I'm going to spend a few weeks explaining how I go about doing the collision detection in the program, with hopefully a working example by next week.

Monday, September 12, 2011
Framework-0.0.6r - Shooting is important.

It's full of stars! - Working on the background, so I can get rid of the green lines.

Deus Ex is fun, but it kills productivity.

Monday, September 5, 2011
Framework-0.0.5.1 - Got the chase camera working. Switch with C. Exit key set to P to avoid quitting by accident.

Saturday, September 3, 2011
New version is up!
Framework-0.0.5r - Cockpit view; camera now moves about the world. The ship itself isn't visible while in this view (currently). Got a background to keep yourself oriented and spread a few spheres about to spice things up.

Next up, working out why the chase view is being difficult.

Wednesday, August 31, 2011

Last update for today:
Framework-0.0.4r - Now with angular momentum!

Wednesday, August 31, 2011

After quite a bit of work, undoing and redoing stuff, I have a working demo:

Framework-0.0.3r - Sphere Edition
Framework-0.0.2r - Triangle Edition

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Asteroids!
« Reply #1 on: June 17, 2011, 07:42:16 am »
I shall allow you to copy-paste from here: https://github.com/svenstaro/physics-playground

It will get you a long way to your Asteroids clone.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #2 on: August 31, 2011, 06:54:23 pm »
Ok, I thought I would dust off this post now that I have something that's at least interesting to mess a few moments with.

After quite a bit of work, undoing and redoing stuff, I have a working demo:

Framework-0.0.2r - Triangle Edition
Framework-0.0.3r - Sphere Edition

Basically you get to control a model around. I'm pretty proud of it.

Currently, I'm not sure why but intel graphics don't seem to like it. I need to check for what OpenGL contexts are supported by the machine before asking for one. It's also compiled for Windows machines.

7z is a nice format, but I'm running into some people who don't seem to care for it. Any recommendations on what archive formats to use instead? I guess I could go with zip, it's just that google doesn't like it when I try to email zipped .exes, and my testers don't have compilers. That's on purpose, I want to be sure that I'm packaging everything a clean computer needs to run it.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #3 on: August 31, 2011, 09:34:43 pm »
I just noticed I had the downloads flagged as private. Not sure if that stopped anyone, but if it did I'd love it if you gave it another go. They should be shared now.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #4 on: September 01, 2011, 12:45:22 am »
Sorry to spam, I've just been on a roll today and want to show off my baby :D

Last update for today:
Framework-0.0.4r - Now with angular momentum!

Instead of a fixed rate of rotation when you press down, I modified it so that it now increases the rate of rotation, and it will continue to rotate when you let go. You now have apply a rotation in the opposite direction to make it stop.

Seems to behave correctly too.

Haikarainen

  • Guest
Asteroids!
« Reply #5 on: September 03, 2011, 07:15:36 am »
Looks cool! When are you going to make a 4 sided triangle formed as a spaceship, attach a camera to it and let you blast of around the asteroids? :]

Btw some stars for bg would be really useful for navigation.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #6 on: September 03, 2011, 04:24:16 pm »
I've already created the ship model. And great minds do think alike, the ship model I settled on is a piramid :P

Got the camera attached to it, and I've got something like a skybox so you can track your rotation. The chase cam is giving me a bit of trouble. Basically, I want a 'cockpit view' that is oriented the same as the ship, as if you were in the cockpit, and a chase came that looks from behind in the direction you're moving regardless of the ship's orientation.

I need to sort a couple of issues, then populate the space with a bunch of spheres, and I should have the next demo up in a few hours.

I'm also thinking of getting fraps to make videos to accompany the posts, since not everyone can run the demo (until I fix other issues) or wants to go to the trouble of downloading it.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #7 on: September 03, 2011, 09:21:49 pm »
New version is up!
Framework-0.0.5r - Cockpit view; camera now moves about the world. The ship itself isn't visible while in this view (currently). Got a background to keep yourself oriented and spread a few spheres about to spice things up.

Next up, working out why the chase view is being difficult.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #8 on: September 03, 2011, 11:53:50 pm »
I went and made a short video, for those who can't run it.


This should give a brief glimpse into what I'm working on.

Next on the list, update the blog. I'm a couple of updates behind already.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #9 on: September 04, 2011, 06:19:31 pm »
Ah, finally up to date with the blog. Last one was a fun post to write, too.

http://kiansprojects.blogspot.com/2011/09/in-drivers-seat.html

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #10 on: September 05, 2011, 06:00:21 pm »
Got the chase view working.

https://docs.google.com/leaf?id=0B5oN4UQG74ysYTk4NWY1MTktOGNjZi00OTJjLWIxMTYtODA2ZTM4NWE4MTFh&hl=en_US

You can now switch between the views pressing C, and watch the ship model from outside. P quits instead of X.

easy

  • Full Member
  • ***
  • Posts: 146
    • MSN Messenger - easy82.contact@gmail.com
    • View Profile
    • Email
Asteroids!
« Reply #11 on: September 05, 2011, 08:25:05 pm »
I've just seen the video, nice work, Kian! Also the blog is cool idea! :)

I guess you do this OpenGL 3D framework project because of the challenge, otherwise I'd recommend you a much more effective tool to create your dream game (with less time and effort).

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #12 on: September 06, 2011, 03:05:21 am »
Thanks! I'm glad you enjoyed the video.

There's the benefit of learning the innards of the rendering pipeline, of course, which will serve me well if I ever get to work profesionally in the industry. But from what I've seen, the tool to create my dream game simply doesn't exist. So I'm out to make it myself.

My dream is to make a seamless solar system, from the surface of a planet to the farthest reaches of space, and everything in between. However, most engines are based around the idea of creating a 'level', loading the resources and giving the player a very limited playing area. With bothersome loading screens in between.

I'm shooting for something more dynamic. There are two hurdles I have to overcome, though. One is content. Making a huge playing area is easy, giving it detail is the problem. The other is memory. Even if you could create all this content, it would take ridiculous amounts of storage.

I'm not in a hurry. Turning this project into a game is the first step.

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
Asteroids!
« Reply #13 on: September 06, 2011, 03:17:55 am »
I think I saw a video of a project to do similar but used procedural content generation. Basically it made worlds that looked like:
http://libnoise.sourceforge.net/examples/complexplanet/index.html

The video was of a ship in space flying down up to the planet's surface. The idea was eventually to be able to fly from world to world, go to space stations, land on the planets etc.

Dunno what became of that project or if it's still going...
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Asteroids!
« Reply #14 on: September 06, 2011, 03:44:07 am »
I've seen a few videos of similar ideas, and it's exactly what I want to play. But they never seem to be ready for release. I think their problem is it's too large a scope all at once, so much that people get discouraged or run out of energy when there's no end in sight.

So I'm taking it slow. Baby steps. I start with an asteroids clone, which sets the base for many of the subsystems I'll need and gives me a practical goal to strive for. If I can get from idea to release on something small, I can then pick up steam working on larger ideas.

I can also refine and learn from past mistakes while avoiding the pitfal of wanting to redo everything because I didn't like the way something worked, with nothing to show for it. If I ever feel like rewriting large chuncks, I'll still be able to look back to past successes.