GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Magtraction Prototype
View previous topic :: View next topic  
Author Message
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Mon May 19, 2008 5:56 pm    Post subject: Development Log - Magtraction Prototype Reply with quote

I've been working on a little something for the better part of the day. A prototype for a game I'm calling Magtraction (Magnetica was taken). I've been trying to approach the project like a Ludum Dare game (which is how I tend to do my prototypes anyways). I don't normally share my prototypes and prototyping process publicly, but I figured I may as well this time.

My apologies, but I'll probably be a little vague here. Starting out, I've been a little more verbose on the Ludum Dare blog. That may change in the next few days. I haven't really decided.

Anyways, enough talk. Pictures.

May 19th - 1 PM
Started.

May 19th - 6 PM
First screenshot. Camera is buggy, but all my basic things from a PolyMap file are in. Graphics are a fake 2D OpenGL renderer built on top of 2D Allegro.




May 19th - 9 PM
Camera works. Probably calling it a night. Gameplay tomorrow.


_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Tue May 20, 2008 5:33 am    Post subject: Reply with quote

Quote:

Graphics are a fake 2D OpenGL renderer built on top of 2D Allegro.


If there's one thing Allegro is good for, it's rapid prototyping :)
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Tue May 20, 2008 7:23 am    Post subject: Reply with quote

Yeah, I love it for that. I *always* seem to use Allegro's circle draw to draw me a mouse cursor too. :). I've been trying to write a library and move away from it for years, but I always seem to come back to it. :)
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4989
Location: Silicon Valley!
PostPosted: Tue May 20, 2008 7:27 am    Post subject: Reply with quote

So, after reading various stuffs I'm still unsure as to what this is supposed to be, in the end, as a game.

Enlighten us!
_________________
loomsoft :]
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Tue May 20, 2008 8:21 am    Post subject: Reply with quote

It'll make more sense when I have something playable. That might be later today, or tomorrow. I'd rather not spend the time crafting a delicate story of what it should be. :)

Elevator pitch: "Lemmings with magnets". Top down, particles "flow" and you need to indirectly influence them to go to a goal.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar


Edited by PoV on Tue May 20, 2008 7:28 pm; edited 1 time
View user's profile Send private message
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Tue May 20, 2008 7:26 pm    Post subject: Reply with quote

May 20th - 11 PM
Spent the whole day working on the camera and mouse interaction code. It's almost at a point where it could support multiple views, but it doesn't yet. I need this mainly for the editor (which I was planing to do later), but it might come in handy for the game.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4989
Location: Silicon Valley!
PostPosted: Wed May 21, 2008 2:17 pm    Post subject: Reply with quote

I'm assuming that with your camera code you're able to pan in any direction as well as zoom in and out? That definitely seems intriguing to me -- since I've never done such a scheme. How are you interconnecting your "camera" versus your "objects". I'm assuming here, that, things draw themselves, and therefore need to know some information about the camera. If this is not the case, please -- get into some detail about how things are coupled. It's interesting!
_________________
loomsoft :]
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Wed May 21, 2008 3:41 pm    Post subject: Reply with quote

Yep. Pan, zoom and rotate. All the draw calls are aware of and use the matrix. So all an object does is says "I'm here in the world, and I look like this. Draw me!".

The calls are capable of using any matrix, but just like I use the same BITMAP* as a buffer, I use the same matrix. That's one of my wrapping layers.

Code:
inline void MatrixCircle( BITMAP* Target, const Matrix3x3& Matrix, const Vector2D& Pos, const Real& Radius, const int Color );

This is the generic Allegro Add-on call that takes a BITMAP* and a Matrix. It in turn does a bunch of crazy math, eventually leading up to an Allegro "circle(...)" call.

Code:
inline void gfxDrawCircle( const Vector2D& Center, const Real& Radius, const ColorType Color = CurrentColor );

This is the wrapped call I use for my more "GL like" interface. It calls the above, using my default "Buffer" and "Matrix" globals.

This wrapper is about wrapping any potential graphics API. Since real OpenGL doesn't have a concept of passing a buffer or matrix to draw calls (plus that'd be slow), it sticks to just the bare essentials. As a nicety, since this is a debug themed call, you can directly pass a color, as opposed to setting the global CurrentColor.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Mon Jun 02, 2008 7:28 pm    Post subject: Reply with quote

June 2nd - 11 PM
Roughly prototyped the gameplay. I should have taken more shots through out the day. Alas, all I have for you is this final shot, from me specifically trying to debug a problem.



As expected, found several things wrong with my initial design, but it seems salvageable. Ended the night toying with a physics bug (particles sometimes losing energy, or perfectly reflecting and sometimes freezing). I know that it's my collision reflection in the verlet solver that's broken, just gotta think about how I want to fix it. I came up with a new idea for handling reflections this afternoon, so that's why it's not 100% yet. ;)

Purple - Particle
Orange - Magnet (attracts particles)
Blue - Generator (creates particles)
Green - Collector (catches particles to 'win' level)

White - Mouse Cursor
Cross - Center of screen
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Bean
Admin

Joined: 20 Aug 2005
Posts: 3772

PostPosted: Mon Jun 02, 2008 8:24 pm    Post subject: Reply with quote

I'd be nice to see some video. I always love seeing your experimental shit :D

-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Tue Jun 03, 2008 10:53 am    Post subject: Reply with quote

Sure. Once I have a proper test level ready, I'll either video it, or put a little download up.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Tue Jun 03, 2008 3:44 pm    Post subject: Reply with quote

June 3rd - 7 PM
Fixed the reflections and built a proper test level.



In a way it's now playable. I've uploaded a build you guys can toy around with. Sorry Sonrisu, but you'll probably have the same hyper speed problem if you try to VM/Parallels this.

http://junk.mikekasprzak.com/Magtraction/Prototype/Magtraction-Build01.zip

Controls
Left Mouse Button - Move Magnet #1
Right Mouse Button - Pan
Mouse Wheel - Zoom
TAB - Reset
ESC - Exit

Two builds included. "Magtraction.exe" was how I theorized the game. The magnet only strong enough to influence motion (well, it could be even weaker technically). "Magtraction_StrongerMagnet.exe" is what it sounds like. Easier to do motion swirls like in "Micro Macro", that little game I did in a few hours for the last Ludum Dare.

If you can get all 30 particles to the end, it'll light up yellow. If it doesn't well then one particle got away (I think there's a way to glitch in the corner with the overlap).

A lot of possibilities from this point.

Initially I was thinking of a real-time PuffBOMB 'esc game, where you moved the magnets around. More recently, I was toying with expanding on that, where you could manipulate several things besides magnets (move/slide walls, switches, etc).

After playing it, I'm starting to think magnet manipulation might be lame. However, it's pretty cool dragging the magnet in to the path of the particles (creating swirly things). An option might be to ditch the magnet moving idea, and instead you collect particles with the mouse down as you do in the StrongerMagnet version, and allow a gesture where you can 'gust' your collection in a direction.

Of note, this is a concept I'm toying with for a touch screen driven iPhone title.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Bean
Admin

Joined: 20 Aug 2005
Posts: 3772

PostPosted: Tue Jun 03, 2008 4:12 pm    Post subject: Reply with quote

Funky. Seems too simple from a gameplay standpoint as-is. I know you though, you'll come up with some kinda madness. Or at the least learn some new shit :)

-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4989
Location: Silicon Valley!
PostPosted: Tue Jun 03, 2008 4:40 pm    Post subject: Reply with quote

Alright! Cool demo. I played it in "superfast" mode because I'm too lazy to boot a real windows machine. It worked well enough that I could see how things should function. Here are some basic observations:

  • Simplicity is cool. It's very basic and easy to understand so far
  • Level format is sweet! I had fun making wonky levels. I noticed that if I made really tight spots, the particles could find a way through. It was fun toying around with making funky levels
  • You can only pan so much. One of my "custom" levels stretched out farther than you could pan.

Now, onto gameplay ideas, thoughts, etc:

1) Being able to place the magnets anywhere is not fun. It would be much more fun if you were restricted to placing magnets only in the "surrounding" area of the main map. That is, you can never get the particles to touch the magnet -- you can only get them to make the attempt and bounce against a wall in trying to do so. This would increase the dynamic a whole lot.

2) There should be a set number of magnets you can place. Once placed, you cannot move it. Then you run the simulation and see what happens. This might be too annoying with trial and error.

3) Magnets only pull for a certain duration of time. That is, they do some pulling, then flip to off and fling the particles. Eventually, they turn back on. You could make funky levels where you need to chain a bunch of pulsating magnets to propel the particles around in a level. Combining 1+2 and this, you'd have all sorts of weirdness. Again, trial and error issues.

4) Working on 3, you could have the magnets deteriorate in power over time. It's up to you to click them, or add power (up to some max) in order to keep them going, or else your magnitron machine will basically be broken. In later levels maybe you can have some sort of + or - particles that power up or power down a magnet, respectively. Get too many of one kind and you're SOL.

5) Working on the ends of 4, you could get into the business of + or - powered magnets that attract or repel - or + powered particles, respectively.

6) You could make all the above states toggleable. This works with the iPhone by double tapping a magnet and a little bubbly comes up where you select which type you want, etc.

That's all I have for now.
_________________
loomsoft :]
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10861
Location: Canadia
PostPosted: Tue Jun 03, 2008 7:48 pm    Post subject: Reply with quote

sonrisu wrote:
I noticed that if I made really tight spots, the particles could find a way through.

Yep. Fatter collision would fix that. I test/solve collisions by first finding if the position is inside the polygon, then find the nearest edge. If you penetrate too far, it will find the opposite edge.

sonrisu wrote:
You can only pan so much. One of my "custom" levels stretched out farther than you could pan.

That's what the rectangle ('Rect') at the top of the file is for. It's set to the size of the max zoom right now. You should be able to grow beyond that. :)

Thanks for all the suggestions.

I absolutely agree it's too simple/easy. I just got back from some "Mom Testing", came up with several similar ideas, but pretty much came to the same conclusion. To my surprise, the "normal" magnets version ended up being more interesting, since the particle behavior was more erratic (less like a bad swarming algorithm). I thought the game would be "Lemmings interesting", but isolation here is much more difficult than in Lemmings, so it would be tricky to even take it in a parallel direction. A touch screen also means you need to think about "blob" precision, and not pixel precision like with the mouse.

Some other things I considered.

- Manipulatable levels. Slide a piece along a path putting it in the way, or out of the way.
- Moving pieces driven on oscillators (i.e., they move automatically).
- "Doors" and Switches
- Particle crushing/killing rules.
- Zones/traps that eat/kill particles.
- Fixed areas where a magnet could live.
- Repelling magnets (of course).
- Polarity rules (+ and + repel, + and - attract).
- "Power hubs", where you feed it a certain number of particles to open a door.
- Weight switches (like power hub, but don't sacrifice)
- Some way of having destroyable barriers.
- "Fog of War"

I expected a few further iterations, but I think the prototype is done.

There's certainly a game here, but it's not wowing nobody. Haha, even my mom found it boring. :)


I've started to consider some wilder tangents.

In following the Lemmings idea, I started to consider a lasso RTS like grouping mechanism. So make a selection, and you can do something with a group of things. For example, three could become a bomb, and be used to take out a barrier (or simply self destruct on the spot). However, this isn't bouncy ball particle game anymore. That means we need grouping.

On a related tangent, I got thinking warping this in to a 2D top down Pikmin. Ways to keep keep micromanagement straight forward to mere touch gestures. Interesting, but I kept going.

Back to the "Fog of War" idea. That would add an aspect of exploration to the game. Exploration 'eh? ... Hmm... Pikmin too is a good exploration game. Maybe there's something more interesting here.


In a conversation I had with Madgarden last week, I brought up the idea of a "Master of Magic" (C64) like game, but modernized. Still keeping the iconic look of things, but the code and generic file format I have handy could be painlessly used in something like "Master of Magic".

My concept was to create a deeper game (story), archaeologist(s) stumbling in to a similar situation, with skill gaining akin to Metroidvanias as opposed to statistical RPG's. The actual plot would probably end up rather blatant, but the point is to create a dungeon exploring experience akin to "Master of Magic", but relying on an iconic look as opposed to a Diablo'esc or tile based RPG that these games normally evolve in to.

Now I'm considering something a little more light weight. I'm still toying with how it'll exactly work, but "a 2D dungeon exploration Pikmin" might be a good way to describe it. A leader explores a dungeon, and collects a group of "troops" to pass challenges and battle foes. Throw in some treasure and items and we're on our way out of crappy game territory. :)

We'll see. Besides needing some swarming/grouping rules/pathfinding, content needs to be easy and fast to make. Still a lot of things to figure out, but this is where I'm leaning right now.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Tue Jun 10, 2008 7:27 am    Post subject: Reply with quote

I finally got to spend some time with the prototype build you posted above, and agree with much of what has been said beneath that. You could spit out a very simple game by adding in moving barriers and spots to manipulate geometry (say... attract ten bubbles to this point to activate slide gate) with a time limit for stage completion. Simple indeed, but people play stuff like that all the time. If that seems to go over well, expand on the idea with wilder/weirder stuff.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Magtraction Prototype
Game Developer's Refuge
is proudly hosted by,

HostGator

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.