D: Warpfield

WARPFIELD
An initally slapdash rush-job comp D entry by Gareth "Gazza_N" Wilcock that got tarted up a fair bit as he went along

Version 1.1a
image
image

Download:
Warpfield 1.1a - Windows ZIP file(+-6mb)

Gameplay:

In Warpfield, you play as a mining starship drifting through an asteroid field, searching for valuable Gemmacubes. In order to collect them, you must manipulate the ship's warp field to attract and repel asteroids and gemmacubes. Asteroid impacts will damage your ship, so it is important to control their orbits and trajectories using the field. Guiding two asteroids into colliding with each other will yield more gemmacubes.

The game ends either with the destruction of your ship, or with the collection of the required quantity of Gemmacube matter (indicated at the top left of the screen).

Controls:

The intensity of the warp field is controlled using the up and down arrow keys on the keyboard. The up key will increase repulsion/decrease attraction, while the down key will increase attraction/decrease repulsion. Pressing both keys at once will instantly reset the field. Gemmacubes are collected by colliding them with your ship.

Other neat notes:

UPDATED!
A few more than 14 hours spent on this, then, and great fun to work on! Warpfield is now as polished as I can make it in its current form. My thanks for all the feedback (please don't stop!), and do enjoy!

Initial:
I whipped this up over a roughly 14-hour marathon session (except the music, which I had lying around from an old demo track) so it's rough, but fairly complete gameplay-wise. Time constraints mean I likely won't come back to it unless there are glaring bugs, and it's a little tricky initially, but once you get the hang of it I hope you'll enjoy it!

Comments

  • This is really neat :).

    I've got very little to add here, unfortunately, which is ok if you're not going to working on it more. The first minor gripe I have is that while the background warping is effective, it gets confusing after a while - I kept forgetting whether I was pulling or pushing and often you don't have time to check the colour of the ship. Perhaps have some lines that stream into the ship when pulling and stream out when pushing; and the speed of the streaming is based on the intensity of the push/pull? It's a simple thing, but it might make it easier to at a glance see whether you're pushing or pulling and to what intensity.

    The other point is that it became frustrating at points when you masterfully break two massive asteroids onto each other only to have the Gemmacubes speed off out of control. Perhaps there should be a little more weight to Gemmacubes of larger asteroids?

    I like this idea and that background warping blows my mind :P.
  • Heh, the title alone was enough for me to guess that this was yours, I believe. :P

    This is rather fun!

    I found the warp field fairly easy to read (and pretty ^_^), although the above poster's idea of having the ship "suck in" or "throw out" lines appropriately might not be a bad idea.

    I will note that, if one can pull if off (as I did twice, I believe), one can render the game quite easy by manipulating gemmacubes into orbit around the ship (likely by colliding a few asteroids near to the ship with an appropriate attractive field): since gemmacubes destroy asteroids and through that produce more gemmacubes, they form both a protective shield and a means of production, allowing the player to sit back and let the game be won. Perhaps either have gemmacubes not interact with asteroids, have them mutually annihilate, or have gemmacubes destroy asteroids but not produce more cubes.
  • edited
    Thanks for the comments, folks. Much appreciated. ^_^

    I did have an effect similar to the sucky-in-lines you guys mention, except I found that it was too obtrusive. I have another idea for a more subtle effect though, which I'll see if I can implement before deadline.

    That "cube shield" situation is actually really cool, but I agree that it doesn't serve the purposes of the game well, sadly. I intended for the splitting of asteroids with cubes to introduce a risk/reward situation to gameplay, but clearly the asteroid fracturing rules need a little more refinement.

    The warp effect is actually crazy simple to pull off in Game Maker, and I'm very happy that people like it. I'm more than happy to give a more detailed breakdown of how I did it if anyone's curious.

    P.S. I'm amazed that nobody's commented yet on how the asteroids look like choc-chip cookies. :P

    P.P.S.
    Heh, the title alone was enough for me to guess that this was yours, I believe. :P
    That, sir, is quite the compliment. :D
  • edited
    What an interesting idea! I wanted to eat the delicious-looking choc chip cookies but they kept exploding into crumbly goodness XD

    I really like that it's a gamble choosing how long to keep sucking things in, before having to repel them. It's a very simple but fun gameplay mechanic.

    It does feel pretty complete, but one thing I can think of that would be pretty cool (if you come back to it), would be to somehow allow for the field to cause objects to get into orbit of your ship. If the player got the timing of the attraction/repulsion & direction of the cookies right, they'd be able to get one orbiting the ship, which would also form a protective shield.
    Awesome stuff man!
  • Aaaah, but you CAN coerce objects into orbit! The physics totally allow for it! You just need to get the field strength and timing right. :3
  • Ah that's fantastic, I didn't notice that! I see you did mentioned it, sorry.
    Anyway, very cool idea :)
  • At a guess, is the warp field effect created by texturing a dome-shaped model with the background (or a portion thereof) and then manipulating its scale in the depth-axis (whichever that is in Game Maker)?
  • edited
    Good call. ;) I go about it a little differently, but the idea and end result are the same. I use GM7's textured triangle functions to draw a 2D "spiderweb", and fiddle the vertices according to field strength to approximate a rasterised sphere. I then use the background texture again, but keep the UV values of the vertices at their calculated zero-point texture coordinates (after adjustment for background drift), which gives that lovely refraction effect. Quick and easy, and a nice effect to boot!
    Thanked by 1Elyaradine
  • Wow I wish I knew how that worked. I'm using GMS and I'm having trouble figuring out how to do blending modes like Photoshop's multiply and overlay... The manual's confusing XD

    Though for me advanced gfx manipulation will have to come after AI... XD

    Looking awesome! :D
  • To be fair, Photoshop's multiply and overlay are ridiculously non-uniform and hard to reproduce accurately... Blend modes are a bit like shader-lite, in that they're applying maths per pixel.

    Final pixel colour = colour from what you're trying to draw now (src_color, for source) * source blending factor + colour that's already there (dest_color, for destination) * destination blending factor. The different blending modes are all about different values you can assign to those factors.
  • edited
    I've been able to reproduce PS blend modes pretty much all of the time just by cheating around them (usually just painting things into the textures themselves, or using a similar operation that is close enough), but if ever there's something you can't create using one of the cheaper methods that you somehow absolutely have to have, the maths operations are documented elsewhere. They can get pretty damn expensive though, especially the ones that branch (Overlay, Soft Light, etc.).

    (edit: this is in hlsl, though I imagine GM would do something similar.)
  • edited
    @Tuism: Don't let all the jargon scare you: I'm mathsing a bunch of points on the screen and having GM connect the dots and stretch the background image to look like a sphere/cone. :P All the drawing functions are in the Advanced Drawing Functions of the GM help file. Take a look! :D
  • Wow thanks guys for the attempted explanations! To be honest I understand the concept behind it, I just obviously had zero experience with it and @Gazza_N I certainly am quaking in my boots at all the jargon... All the words are kinda just swimming around in my head @_@ Though I do certainly understand the vertices and polygons and deforming and shaders and whatnots...

    I just really need to put some work into understanding it and working around the syntax.

    But before that I'll need to get my AI working so people can test my game XD

    @Elyaradine thanks for the link, although I don't know how it relates to gamemaker's src_color and dest_color... But when I get there I'll definitely try it out :D

    And yeah I can imagine it being super expensive, I saw Stealth Bastard running quite slowly, and I think it's exactly because of the blend modes. I still wanna try and use it sparingly though - the cyberpunk glowy colours is something I eventually wanna make use of :)

    @dislekcia I'll get around to it one day! I tried following the manual's blend mode things and they always turn out nothing like what the image says it should be @_@ But ya syntax XD


    Let me not derail this thread XD
  • @Gazza_N: Heh, that sounds a little more complex than what I envisioned, but nevertheless an elegant way of doing the job, I think. ^_^
  • edited
    Version 1.1 is available in the first post. Changelog is as follows:

    Gaemplae:
    - Nixed crazy-awesome "cubefield" exploit. Gemmacubes no longer fracture asteroids, and will shatter on contact instead.
    - Increased Gemmacube collection radius.
    - Tweaks to asteroid flight paths to present more opportunities for clever use of orbits and less "oh gods giant asteroid flying right at me repel repel please repel aaargh".
    - Minor tweaks to physics.
    - Increased victory score target

    Graffix:
    - Increased polygon count for warpfield effect, because more polygons = more emotions.
    - Made background seamless, tweaked scrolling a tad
    - Added field reset gfx effects.
    - Added effects to differentiate cube collection and destruction
    - Added two more asteroid sprites, because reasons.

    Sownde:
    - Fixed bug where first activation of warpfield would result in a short "pop".
    - Added field reset sfx.
    - Added smash sfx to indicate cube destruction.


    Do enjoy, and please let me know if you have any additional comments or suggestions!
  • Version 1.1a is available for download. This will be my final submission for the comp, barring horrendous game-breaking bugs or gameplay problems.

    Graffix:

    - Replaced all game sprites with pretty renders. No more space cookies. :(
    - Added subtle "ripple" effect to better communicate field strength and direction.
    - Fixed minor artifacting in reset effect due to z-fighting, because GM7 is stupid.
    - Zoomed camera out very slightly

    Gaemplae:

    - Reintroduced random offscreen gemmacube spawns.
    - Introduced slight delay between double-button press and field reset (to prevent reported accidental triggerings of reset).

    I still welcome comments and feedback, and wish everyone else luck in the comp! :3
  • I really like it! ^_^

    The ripple effect seems to me to help communicate the warp field without becoming distracting, and the changes to the rules -- in particular gemmacubes being now destroyed by asteroids without destroying them -- make for a more entertaining and challenging game, I think.

    I don't know whether it was the tweaks to the asteroid trajectories or not, but I had little trouble in capturing them into orbit and smashing them together, only getting hit a few times.

    I don't think that I ever used the field reset option, I'll confess, but it's probably something that's better to have and not want than to want and not have.
  • I'm overjoyed. I owe it all to the feedback I've received here and on the GTalks. ^_^

    Because the field reset is instant, I've found it's a good way to perform precision slingshots, releasing an orbiting rock at the right point in its orbit to collide with another rock just outside the field radius. Of course the idea is to use the tools at hand in whatever way helps you reach the target score, so there's no "right" way to play!
  • Ah, fair enough -- I tended to attempt to collide asteroids close to my ship rather than far off, so I didn't have cause to develop that technique, I suppose.

    It seems to me that it's a point in favour of the mechanic that it allows such varied tactics to arise from just two keys. ^_^
  • Well, that is my hope - that enough interesting situations arise from that random spread of rocks and cubes, and that the inputs allow you to handle them in interesting ways. I've had a few great ideas pitched to me over GTalk to give more gameplay situations and control, but I'll stick with this core mechanic for the purposes of the comp and pray the judges don't fall asleep. :P
    Thanked by 1Nandrew
  • edited
    Heyho, good folks. Warpfield is as done as it's ever going to get under my supervision, and with the comp deadline gone I have no need to hoard my super top secrets of wintastic winnery (oh, if only... ;_; ).

    So have the GM7 source file with assets, with my compliments. It can be opened in any version of Game Maker later than 7. I hope it benefits someone out there.

    All I ask is that you kindly respect the credits for the background image. It was sourced royalty-free from http://tjuart.deviantart.com/art/Starfield-resource-1-162455620, under the proviso that it only be used noncommercially and that a link to the source be provided. All the other assets were made by me. Have 'em. They're mostly awful. :P
    Thanked by 1Nandrew
  • Coooooool :D Thanks thanks! :D

    I'm super curious about the source for the warp effect, it's HARD to find any examples in GM, so I'm super grateful for anything I can find! :D

    So a question - can the warp effect be pulled from your game to Game Maker Studio without problems?
  • It's been successfully compiled in GMS, and my understanding is that you just need to add a variable declaration to the Create event to get the rotating sprites working correctly.

    Also, you will need the Pro version to get access to the polygon functions, but other than that it should work. :D

  • Oh, right. It occurs to me that I didn't answer your question properly. :\

    The warp effect isn't something that you can just unplug from the game and plug into another in one easy action, no. Not written that way, sadly. However, you'll be able to get an idea of how it's been implemented (the magic is in the Step and Draw functions of the Warpcore object) and use that to inform your own use of the effect in a game.
    Thanked by 1Tuism
  • Awesome, I'll look into the code when I get to the visual effects juicy bits :)

    Thanks! :D
  • Some of the code may be a bit obscure, because it was written in a hurry and not commented in detail. I'm happy to elaborate if anything's unclear. :)
Sign In or Register to comment.