• entries
2
2
• views
936

# Dystopian Lights: Dev Blog #2

1039 views

I am excited to say that I have gotten a bit of work done on Dystopian Lights recently and also excited to see that people are downloading it and trying it out on their android devices. I haven't received any feedback yet, and please don't hesitate to give any critique or suggestions. I am really open to everything as this is my first serious project that I think has any validity of professionalism in it, and I really would like to see it succeed. I do have a few updates for you guys and will have a new version ready for download by this weekend, but here is the new stuff I've been working on.

## 1. Capacitor

I have enjoyed playing shooter games on mobile devices but many of the free to play or inexpensive ones all do something similar with their weapons schemes. Generally you select a ship and it has specific weapons with it, or you toggle on and off the different weapons you have while only being able to shoot one weapon at a time. Since I am such a fan of the chaos and destruction in these games I was trying to come up with a good way to enable the player to have all weapons active at the same time without it being too overpowered. My solution is a capacitor. Your regenerate energy every second and certain weapons use more energy than others. When your energy is depleted, you can only use your basic shot. With this enhancement to the game, it has given it a new level of customizability and even greater balance. It has also given rise to new ideas that will be implemented before I release the next version which should be before the end of the month. You can still toggle off and on your weapons in order to control your capacitor usage, or you can just watch it drain and toggle off automatically and wait for it to regenerate.

## 2. Health Packs

One thing that was missing from the game was the ability to heal after you have taken damage. Since there should be ample amounts of chaos, then you should really be able to heal after all the damage that you have taken. Each enemy now has a 10% chance to drop a health pack on death. Another way to heal right now is to level up. When you level up you heal fully. This may change in the future as it does seem a bit overpowered and throws the balance of the game off quite a bit.

## 3. Balance

I am working on balancing things in the game to make it feel like you get a good amount of time of play before you die and where your skill can extend that time substantially if you are good at dodging and killing things. This is no easy task and I imagine balancing changes will continue from here on out until the full game is released. Some of the changes are the required points you need to level up each time. It's a simple algorithm and can be easily extended to add more balance later if needed. Besides just the points required for leveling be updated, I have also changed around some of the spawning algorithm. Spawning happens in two forms in this game. There are random spawns, and pattern spawns. With the random spawning, a random enemy that falls within the level range of the current players level will spawn at a random location within the bounds of the game and outside of the hit radius of the player. The other form is the patterns. A pattern is randomly selected based on a few conditions and will spawn around the player. Usually it will appear as a circle or triangle. The pattern spawn will be forced every 15 seconds or so, sometimes exceeding the max enemies a player would see at the given level of random enemies, but is still limited. This form still uses the same algorithm for enemy selection, which is something that I need to revisit as the enemy selection favors higher level enemies the higher level the player is and scales at a very unbalanced rate.

### Some Code:

Something I wanted to share with everyone was the code that I use for my health bar and the capacitor energy bar. With this code you will notice that there are 2 draw methods that are being utilized. That is due to the nature of the game and it's post processing to achieve the glow effect. The PercentBar.Draw() method will draw the darker lines that you see inside of the health and capacitor bars, whereas the background is the DrawPostProcessed. This is probably a poor name for the method as it's not post processing anything, it could be renamed to DrawLines and DrawBackround for a better naming convention but this works for me since I am just trying to distinguish between what is post processed for the glow effects and what is not. The parameters foregroundColor and backgroundColor are optional and will default to green and red, which is what the health bar uses, but you can also make the foreground color anything that you choose as well as the background color. If you give the backgroundColor a 0 alpha value then it will just look like the bar is shrinking if it decreases in size or will look like it is growing if it is increased. This PercentBar class can be used to represent any kind of percentage that you want to display such as health, energy, or even a loading bar.

    public class PercentBar
{
private float width;
private float height;
private Color backgroundColor;
private Color foregroundColor;
private Vector2 location;
private float percentShown;

public PercentBar(float width, float height, Vector2 location, Color? foregroundColor = null, Color? backgroundColor = null)
{
this.width = width;
this.height = height;
this.location = location;
this.backgroundColor = backgroundColor ?? Color.Red * 0.6f;
this.foregroundColor = foregroundColor ?? Color.Green * 0.6f;
percentShown = 1;
}

public void updatPercent(float current, float max)
{
percentShown = (current / max);
}

public void Draw(SpriteBatch spriteBatch)
{
float segmentSpacing = 4;
float segmentWidth = 2;
float segments = width * (percentShown) / segmentSpacing;

for (int i = 0; i < segments - 2; i++)
{
spriteBatch.Draw(Primitives.line, new Vector2(location.X + (i * segmentSpacing), location.Y), scale: new Vector2(segmentWidth, height), color: foregroundColor);
}
}

public void DrawPostProcessed(SpriteBatch spriteBatch)
{
spriteBatch.Draw(Primitives.line, new Vector2(location.X - 5, location.Y - height * 0.25f), color: foregroundColor, scale: new Vector2(width * percentShown, height * 1.45f));
spriteBatch.Draw(Primitives.line, new Vector2(width * percentShown + (location.X - 5), location.Y - height * 0.25f), color: backgroundColor, scale: new Vector2(Math.Abs(width * percentShown - width), height * 1.45f));
}

public float PercentShown
{
get { return percentShown; }
set { percentShown = value; }
}

public float Width
{ get {return width; } }

public Vector2 Location
{ get { return location; } }
}

Hey. Just tried the game briefly. Unfortunately, I have a pretty low end device (it's an LG4K), so the game was pretty much unplayable.

I was seeing framerates under 10 fps consistently.

Given what I did see, the game looks really cool visually.

I'd love to hear about how you accomplished the warping of the grid. I really liked that.

I might give the game another shot on an emulator on my pc or something later.

Best of luck!

Hey sorry for the delayed response. The game does use graphics shaders so it will require a GPU or else I'm not sure if it will run properly. I am optimizing it currently so that lower end devices with a low end GPU can still run it well. I had hoped to have this project finished a while ago, but it seems it just keeps dragging on.

https://gamedevelopment.tutsplus.com/tutorials/make-a-neon-vector-shooter-in-xna-the-warping-grid--gamedev-9904
I use something akin to this for the warp grid.

## Create an account

Register a new account

• ### Similar Content

• In this video we will add rigidbody and collider to our player.

• I'm making a 2d platformer game as a learning experience, and I need a character and some backgrounds.
The idea is a person on the brink of death "running" through his memories. The background is his memories.
This game will make minimal revenue, because it'll be a free mobile game.
I'll give you more details if you respond.
Thanks.
• By Defend
Obligatory disclaimer - Yes this is for academic purposes, not for making actual games.
I've been employed as a Software Engineer for 2 years but still feel like a beginner when it comes to writing a game engine (and much of coding in general). What little experience I have with writing 3D software from scratch is from super rough university projects (which we called "engine" but that's definitely debatable). Meanwhile, my current job doesn't really take me down this line of learning.

This thread is to ask for advice; mainly pointers to good guides, or comments on what structural approaches are considered to be good ones. I'm looking for something that teaches me about how to structure a game engine so that:
it's good for learning about writing an engine it's not completely devoid of modern techniques it will be usable for later feature learning; networking, AI, unit testing, etc. (I imagine this criterion is typically a given anyway.)
Some things I'm aware of so far (you may want to comment on any of these):
https://www.gamasutra.com/blogs/MichaelKissner/20151027/257369/Writing_a_Game_Engine_from_Scratch__Part_1_Messaging.php I also have the book Kissner recommends: Game Engine Architecture by Jason Gregory. From what little I've read of it, it appears more advice than structural guide. ECS was a buzzword back when I was at uni, but the more I google it the more it appears to have become a dirty word. Unreal Engine's source
Regarding ECS: For all the flak it appears to generate nowadays, it is at least a structure. If ECS isn't recommended I'm interested in what other general structural approaches there are.
Regarding Unreal: I'd love to jump in and learn how Unreal Engine's structure works, but it might be biting off more than I can chew.
Language of choice is C++.

Thanks

• By Ikkon
Hi guy , i wanna really quickly introduce myself , So i'm a 18 year old Highschool student that have been for a while really pationate about video game (i have been doing Esport , Streaming all that really fun stuff) but lately i had to made a choice about what i wanna do in life and i'm pretty sure its going to be in the video game industry. Last year i started learning to use UE4 , pretty much only for fun trying to recreate cool stuff i was seing in the game i was playing at that time. But now , i wanted to trie creating something of my own so i wanna show you what a got in the head. Also , I'm french so sorry if my spelling is quite right..

So in Short , i was playing lately alot of FPS (Quake champion , Law Breaker and bunch of other cool game). I was talkinh with my friend and its pretty much their that a got the global idea of what this game is going to be. I wanted to take little simple game mecanics from every game and put them i one unique game. For exemple , Player could Strafe Jump like in quake , while other Start randomly Wall running like in Titanfall 2. After i came up with what would be the game objective , because player won't start playing a game for no reason . I didn't played CTF game for a long time so , i decided why not make this a CTF game , But ctf is kinda mainstream and really linear in term of game play,
This is when my friend had this idea of <<Why not let the player decide if the want to play it ''Run it down to the flag'' or ''let's just #*@! the other team'' (sorry for the bad words) >>. at this time i had a clear idea of what would exactly be the Core ''gameplay'' (if we can call this gameplay).  To win you have two option :
1- Capture the flag and bring it back to your's. If you managed to do so , the game instantly stop and you win.
2- Kill all the enemy team.
Now you most be thinking , <<Well how? they will just respawn right?>> well no , because i came up with the idea of limiting the number of time player can respawn using some kind of respawn point system.

i'll came up with more details later (i have to go to my next class) , but let me know what you think about my idea? what should i add or ajust?

• Hello! I'm new to the scene of video game developing and was wondering if anyone here has any experience developing 2D fighters and are up for making a little test demo to see if the idea would catch on to the public? I have no way of paying but I want to put the demo onto Kickstarter and I will pay a good amount if I get a good amount. Please, if you want to contact me for more info, add me on my Discord or Twitter. Thank you, and see you later!