Your Story [uDG 2011]

Member
Posts: 283
Joined: 2006.05
Post: #1
2D space cargo transport game, maybe.

[Image: snap-11_07_10__220031.png]

Latest build: http://www.maximile.net/stuff/Your%20Story.app.zip
Source: https://github.com/maximile/Your-Story
Objective: Use the arrow keys to make a mess.
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #2
No new build today, I worked on an FBO class. Now everything is drawn to an FBO, which is scaled up to fill the screen using nearest neighbour interpolation. This makes it easy to adhere to a blocky pixel grid without any effort; I've used it in lots of games before.

I also added a quick fullscreen mode, really nice and simple now I can target 10.5 and above.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #3
I like the colorful tiles so far. I look forward to seeing what you come up with. Smile

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #4
I've updated the first post with a new screenshot, binary and objective.

Didn't get as much done this weekend as I'd have liked, but at least now I have a moveable camera and some kind of routine for updating game objects.

Next up will be sorting out some nice camera movement, limiting it to the level bounds. I'll also try out different methods for my main loop timing – I don't think I need interpolation, but I feel like I should be able to get rid of the occasional skipped frames.

I'm really looking forward to getting a controllable vehicle and some physics going.
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #5
Got some constrained camera movement working today, which is good but not exciting enough for me to upload another build. I'm also working on layers with parallax.

It's already a bit slow, hopefully that's just because I'm binding the texture for every tile when i only need to do it once.
Quote this message in a reply
⌘-R in Chief
Posts: 1,260
Joined: 2002.05
Post: #6
Well a quick Shark profile will tell you. Or OpenGL profiler. The former likely before the latter.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #7
It depends. A lot of OpenGL performance hits are delayed until you actually flush the buffer.

Though yes, in general changing the texture for each quad you draw can be many times more expensive than drawing the quad without changes. Also, the draw calls themselves are very expensive. If you set the texture once, write a bunch of triangles to a buffer, then draw them all at once it's generally several times faster. Heck, for tile data you can just generate the geometry once anyway.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
Most OpenGL state changes, you pay for them on the next draw call. So if OpenGL profiler is complaining that glDrawElements is using a lot of CPU time, it could be due to excessive state changes.
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #9
New build, with a parallaxing background! Download it from the link at the top and have a play, if you like. (No gameplay yet, just move around using the arrow keys).

The level is defined by a plist in the package, in a simple format. The tile map is in there too. So if you get bored you can always have a go at creating your own. Which reminds me, I'm having a hard time deciding whether I need a level editor, or if I should just use a text editor and keep editing the level files.
Quote this message in a reply
Member
Posts: 65
Joined: 2008.09
Post: #10
I'm getting some artifacts, and a little bit of tearing, but otherwise looking good. I see Command-R has made his way into one of the entries. Ninja
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #11
[Image: snap-11_07_31__223215.png]

I've finally made another build, you can grab it from the link at the top.

The main new feature: the editor. Activate it from the file menu, hold tab to select a tile from the palette and use the mouse to paint with it. Switch between layers using the number keys.

Open and save work, but you have to manually create or copy the map file (there's one in the bundle if you want to have a go). A lot of map settings still have to be changed by editing the file. But hopefully it has enough features now to let me get started on making some rooms.

I tried out a few different things before I settled on this in-game version. It makes sense to have a separate editor palette window, but I got confused with the multiple OpenGL contexts, and it looked ugly - not a big deal, I know, but I really like the retro feel of having it in the game.
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #12
OMG! I love the pixelated CMD-R!
Quote this message in a reply
Moderator
Posts: 384
Joined: 2002.08
Post: #13
A *HUGE* kudos for supporting ASDF keyboard layout properly in Dvorak keyboard mode... you are using keycodes rather than the letters themselves that are being hit. You just got a +1 in my mind Smile
Fun looknig visuals, Cmd-R pixelated is truly excellent!

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #14
Thanks for the kind words. Smile
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #15
New build! (link at top)

I've hacked in some early physics, just to test the tile collision shapes. It's starting to feel like a game!

It catches on the cracks between tiles (as expected), so I think I'll have to go through removing as many shared borders as possible without making them concave.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Kung Fu Killforce [uDG 2011] JustinFic 34 33,618 Jan 14, 2012 12:49 PM
Last Post: skyhawk
  Flying Sweden [uDG 2011] WillMiller 59 48,916 Oct 19, 2011 08:05 AM
Last Post: ThemsAllTook
  uDevGames 2011 - Updates SethWillits 47 27,578 Oct 19, 2011 05:09 AM
Last Post: Carlos Camacho
  Same/Sane [uDG 2011] revelation 17 16,964 Oct 18, 2011 12:03 PM
Last Post: SethWillits
  Leader of Mans [uDG 2011] AndyKorth 48 32,602 Oct 17, 2011 03:11 PM
Last Post: AndyKorth