Jump to content
  • Advertisement
Sign in to follow this  
Ivan Reinaldo

2D Need help achieving a programmatic 2D effect/animation

Recommended Posts

" rel="external">youtube link

at 1:38 - 1:42, purple things (I think this is particle system) that come off from the moon.

Someone else had decompiled the game in the past, and the assets shows that the dark blue area around the moon (after purple things come off) is just background image. So my assumption is that there are many of those 'purple things', that use additive blending to give different density of 'purpleness'.

The details that I'm looking at are:

  1. As those purple things come off completely from the moon, it forms jagged shapes
  2. At the edge of those jagged shapes, color blends smoothly instead of sharp turn between purple and dark blue(I know how to do it with simple shapes, but in here, the jagged shape itself constantly changes)
  3. further from edge between dark blue and purple, at the light purple direction, the density of purple is nice and smooth

I'm pretty familiar on animating objects by manipulating transform,  but this one seems like a lot of color works with programatically created shapes, any idea?

Here's a picture to clarify

 

msJmK.png

Share this post


Link to post
Share on other sites
Advertisement

A place to start would be to choose your favorite noise function (simplex is great, although you can likely get away with something even cheaper). If you want to scale the result and control the smoothness of the outline, make it periodic (eg by sampling your noise along a circle). 

You can likely get away with sampling your outline once at the start of the effect. Just make sure it has enough points to seem detailed when fully expanded. Then map the sampled 1D noise vector onto a circle. Use the noise value as an alpha modifier for the current "ray".

Each frame increase the radius of the outline by some amount (you can increase it by a fixed amount, an amount proportional to the noise value or you can modulate it separately from a different noise vector).

Use a simple triangle strip to fill the shape. Like this:

triangle_fan-300x280.png

Modulate the alpha across the shape with a separate low frequency noise function. Render this result at something like half resolution to a separate render target.

Blur the intermediate result. You can lower the size of the render target to 1/4 or even 1/8 to increase the amount of blur without paying for it. You'll have to try out different scales to find out what values suit your taste best.

Finally, blend the intermediate onto the final scene. Play around with the different noise values (frequency and type) to get the effect you want.

Share this post


Link to post
Share on other sites

I wonder if that was made procedurally or even particles. Could be "simple" polar texture mapping, animate the tex coord, use a wrapping/tiling texture and blend ... somehow. To really know, we'd need the source of that game.

You should tell what you got at your disposal (language, graphics API or engine), since if you want to go procedural you'd need pixel shader access or something, as irreversible shows.

As for procedural: It can be as complex as you want. I recommend a look at shadertoy. Here some examples which I think do something you're after or at least serve as a starting point.

Eclipse1

Eclipse2

(PS: I searched shadertoy with the key words plasma, halo, radial, circular and polar. Visually though the best results came back with "eclipse" :P

Edit: Here a bare example of what I had in mind above: PolarMappingAnimation .

Should have mentioned earler: shadertoy needs WebGL to work. Sorry. 

Edited by unbird

Share this post


Link to post
Share on other sites

@irreversible @unbird

Thank you, I get what you guys meant. I got an idea in mind too, I'm not sure if it's even plausible though.

I'll code and post it here to see which gives the best result.

Coming back in 2 weeks or so :D

Yes, I can use pixel shader (just trying to recreate effect on a whim, not on a project or something, I'll use anything as long as I can grasp the logic)

Edited by Ivan Reinaldo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Tags

  • Similar Content

    • By Alberto Muratore
      Hello, my name is Alberto Muratore and I'm a young game developer specialized in programming.

      Last summer I finished working on Abstract Arena, my first completed project published on Steam. During the development, lasted more than 1 year, I created every aspect of the game except for the audio sector. I previoulsy joined small competitions and had collaborations within the amateur scene, since I started having fun with game development when I was a kid. In the recent months I also started writing videogames reviews for a english-italian website about indie games.

      Abstract Arena Steam page: http://store.steampowered.com/app/678230/Abstract_Arena/
      Abstract Arena website: http://www.abstractarena.com/

          

      I'm currently offering my skills as freelancer in the role of programmer: what I'm searching for is a project that only lacks of the coding part. I'm very good at using the GameMaker: Studio engine, and I already own a license to export on Android platform. I can write code for any genre of 2D games, and I already have experience with the peculiarities of the Android platform (multiple touch controls, accelerometer). I will be able to start working full time only during September, so be aware of that.

      The plan is the following:
      1 - you have an idea about your next project (2D game of any kind, for Windows and/or Android platform),
      2 - you (or your team) create all of the graphics and audio resources,
      3 - I write the whole code for the game (gameplay, menus and anything within the game) putting everything togheter [during September],
      4 - if you like my work you can choose how much to pay for it, and you (or your team) keep the rights to sell the game without sharing any percentage with me.

      Thank you for reading my announcement
      If you have any question, please write me at the following address: albertomurat@gmail.com
    • By N Drew
      I am working on a 2D SideScroller game in my own made game engine using SFML and C++.I am searching for 2D artists,especially pixel artist for making and animating characters,backgrounds and other props that can be made in any Drawing Program.The artist will become part of the team of Hammer Studios and he got a part of the Revenue Sharing.If you are interested send me a mail at:ghiurcutaandrei@gmail.com .If you are not an artist but you want to be a part of our Team,Soon we will be recruiting an C++ AI programmers that worked in SFML/OpenGL.
      We work together using Discord.

    • By Ds ds
      Hi, my name is Andres, I'm a programmer with a technician degree and a Diploma in C#, looking for a project in Unity to start my career in game development. I don't do it for a paid but a recognition and start a portfolio, preferably a 2D game. Thanks for read, have a nice day. 
       
    • By Doommy
      If someone could assist me through this I would be really grateful. I'm using SharpDX/C#/WinForms but I think this could more apply to directx in general.
      I'm very new to graphics programming and I'm really just trying to do something as simple as displaying a rectangle to the screen.
      Here is my issue:
      I have the below code:
      ----------------------------------------------------------
       var desc = new SwapChainDescription()
                  {
                      BufferCount         = 1,
                      ModeDescription     = new ModeDescription(1024, 768, new Rational(60, 1), Format.R8G8B8A8_UNorm),
                      IsWindowed          = false,
                      OutputHandle        = form.Handle,
                      SampleDescription   = new SampleDescription(1, 0),
                      SwapEffect          = SwapEffect.Discard,
                      Usage               = Usage.RenderTargetOutput
                  };
      I'm not sure if the window is loading in full screen. Actually to make it go full screen I actually have to set the forms property to: this.WindowState        = FormWindowState.Maximized; but that only seems lke Im using a C# code to maximize the form. For instance if I don't set the form to maximize, the form loads at the original size if IsWindowed is set to false. I recall with directx programing using dx7, when I set full screen you could actually see what looked like a display resolution change. I'm not seeing that. It pretty much looks like the form is loaded at the same size as the screen and not the value I provide in modeDescription. This is not what I want as well because I want to set the display to 1024x768 to avoid stretching of my graphics in wide screens.
      Can someone help me make sense of this please.
    • By bartekm777
      Hello
      About me
      Lvl 28   Programmer (day job: non-gamedev-programmer, making games as a hobby for about 2 years) Some vector art experience - tried to make some assets on my own using vector software and scripts   Some design experience (designing my own games ) About game
      Turn-based fantasy rpg inspired by games like Heroes 3 (also WoG mod), NEO Scavenger, Battle Brothers I would like to create easy to use editor for creating custom scenarios (similar to the one from Heroes 3) World and story are clean slate, I did some drafts but I'm not good at it so it's possibly subject to change I decided to create graphics using vector software + scripts to make it faster (rpg's tend to have lots of assets), also it's more precise and easier to create tileable graphics (for example: rivers, paths) No sound/music work has been done yet Who do I look for?
      Definitely someone with 2d art skills  I would like to focus more on programming 2D animator (skletal animations are preferred) Additional programmer could make development faster Someone for creating sounds/music/both It's a hobby project, I work on it in my free time. In case the project make it to the finish line and get shipped  - I can offer rev-share  
      Below should be few screens of what I already did (about 2 months of work) - some graphics, editor prototype screenshot and game prototype screenshot




    • By this. games
      [Free]
      Looking For: 2d Artist and Animator.
      Requirements: Experience in 2d art and ability to commit to 1-2 years of work.
      Payment: Rev-Share (Think Free as the product may not end up being sold)
      Description: An 3/4 view 2d game with a Sci-fi style. The game is based on a man who was put into stasis for punishment for his crimes. He has woken up 100 years later and must now regain his position at the top of the criminal underworld by killing his opponents. There will be a "Hub World" city and then PCG gang hideouts where you fight enemies. The assets required will be tile sets for the different hideouts, assets for the city ie buildings streets etc. and characters both the player and a number of enemies.
       
      Send resume and portfolio to thisdotgames@gmail.com if you are interested.
    • By Liquifire
      So I'm making this basic 2D engine using Haxe Kha, and i just need to integrate some physics. Just basic collision detection and gravity on basic shapes, nothing too detailed. But i want to try not to write it myself, so i just want suggestions on what open source phyisics engines i could use, and that wont be impossible to integrate. Thanks in advance.
    • By Hive Entertainment
      Hey everyone we are looking for a 2d artist for health bars, inventory, items, weapons ect. Unfortunately I can not pay at this point in time however if you are interested please let me know and I am sure we can work something out. I am also looking for landscape modelers in 3d message me for more details or email me at hiveentertainmenttech@gmail.com




    • By Strifexxx
      Hi guys, check out our new game about sticks. Feedback welcome!

      Stickman Destruction 5 Annihilation is a sequel to the legendary game of survival, where to make incredible tricks, driving different transport and getting into different crash! The game is made in the best traditions of simulator games with ragdoll physics elements. Make incredible jumps and tricks and destroy the enemy! Your task is make the finish alive or dead!

      Download on Google Play: https://play.google.com/store/apps/details?id=com.stickman.destruction.annihilation5
      Youtube:





       
      Website: http://strifexxx.wixsite.com/cyberpony
      Facebook: https://www.facebook.com/groups/577850349043463/
      VK: https://vk.com/club122273704
    • By callmevivi
      Hi! 
      So, I've recently thought of a nice twist to a hack and slash-type zombie game that I'd love to make (mostly so that no one can steal the idea I'm not gonna elaborate to much on the story, but that should be no issue to help me, I think).
      But my problem here is that I have little to no knowledge of coding. I AM willing to learn, but I'd rather not have to develop 50 games before I've learned how to develop the game I actually wanna make. I'm just a hobbyist. I don't have that kind of endurance for this.
      The game I'm looking to develop is basically just your typical Player having to fight their way through masses of zombies in a city towards a certain safe place, going from location (check-point) to location.
      The only controls I really want for the player to have are:
      -to interact with objects (like talk to people aka trigger a dialogue or cutscene, pick up objects like weapons, have commentary appear when interacting with something (like the player clicking on a corpse and triggering the player thinking "Please, don't attack me to. ... Thank you very much, Sir.". All of this could be established with simply triggering a cutscene though.),
      -move with the arrow keys or ASWD,
      -have a health bar (not necessarily displayed, I just want the player to actually be able to die if they get gnawed by too many zombies)
      -and hack away at zombies coming towards the player. Just let out all your frustration by bashing in their faces, maybe have a satisfyingly-bloody animation when they die. 
      -Hopefully have companion characters fight zombie hordes with you. (Although I could get creative and find excuses not to have the side-characters fight with you)
      -No jumping required.
      -Inventory would be nice but not necessary either. 
      -Saving your current game progression manually would be great, but could be done with check-points, too.

      Primary focus of the game would be just having fun hacking away at zombies and getting to know the characters, who I hope to make worth getting to know. 
      I've been researching the internet for game engines for weeks now but I haven't really found one that seemed helpful to me, mostly because the reviews are full of vocabulary that as an absolute newbie I understand none of. So, whenever I read the cons for an engine in the review I understand very little of it.
      Although an engine that requires absolutely no coding and still be able to perform all of this would be an absolute dream come true, I believe that's quite impossible to find. The only non-coding engines I've come across so far are absolute garbage due to limits, buggy, underdeveloped, or abandoned by their creators. I'm willing to learn coding, I'm not afraid of it as long as there are tutorials and templates out there, too. 
      As I'm a hobbyist I'd rather not pay for an engine or to export my game. I'm most-likely not going to sell my game for money and if I do it won't be expensive at all no matter how much time I'd invest in it. 
      Obviously the game would need to either be open source or let me publish and distribute the game freely.
      The only game engine I've found so far that I believe I'd understand is Adventure Game Studio, but I haven't used it much yet, just watched a couple tutorials on youtube. But it's a point-and-click only engine as it seems so it won't be of much help for this type of game, unless I get really creative with my controls (I'll keep this engine in mind for other possible projects in the future, though).
      I've tried Godot as well, which seems to be really hard to learn for a beginner of my level, especially as the coding language is completely unique to the engine from what I've read (and noticed myself).
      I did come across Unity and UE (Unreal Engine) and from what I've read it seems that Unity is better, but, again, I understand very little of any reviews I've read. What's mostly scaring me away is that services that have Premium possibilities you pay for are usually really limited in a stupid way. But if this is not the case, hey, let me know!
      Pixel-art-ish animation would work well, too, so an alternative to RPG Maker would be fine (or at the very least a cheap alternative where I don't have to pay monthly for).
      The art for the game I can provide and create completely by myself if it's 2D. I'm an artist mostly and I have experience with making comics and digital drawings (fanart mostly hahaha) and I've gotten into animation which I'm fairly decent at (I'd be willing to learn 3D animation, though!).
      So, that's about all the info I think might be of importance, but if there's anything more you need to know to help me, I'll answer as quick as I can!! And if you tell me I gotta give up on some of the features I want the game to have, I'd be willing to listen to suggestions. 
      Thanks in advance to everyone who is willing to help me!
  • Advertisement
  • Popular Now

  • Forum Statistics

    • Total Topics
      631354
    • Total Posts
      2999506
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!