Started working on something new; I've been playing a lot of Doom and Quake recently, so something in that sort of style. I've mostly got the core mechanics working; shooting, dying, respawning, a few enemy AI's.
I thought so! Congrats!My game appeared in a reel showing off Unity 2D titles at yesterday's Unity Unite event in Copenhagen. :)
Check timestamp. It's just a few seconds, but it was neat to see it on an actual stage!
Thanks! I might consider it. :)I still have almost a year of US license and 1.5 years of NoE license left. If you finish the game in time for that and cannot get an extension from Nintendo, I would offer to submit / publish it on Wii U for you and giving the full revenue to you (minus possible international banking cost if any apply). Just send a PM to me when you are done, should you be interested.
When it comes to eManuals, it is permissible to make a "minimal" eManual, as long as the game is self-explanatory enough, which is less of an hour of work.
EDIT: Also to be able to use the eManual thing on your current laptop, just install DirectX 9.
Which one is yours? Those all looked great.My game appeared in a reel showing off Unity 2D titles at yesterday's Unity Unite event in Copenhagen. :)
Check timestamp. It's just a few seconds, but it was neat to see it on an actual stage!
Oh yeah, I've heard about that one before. Looking forward to it :)Thank you! Appreciate it.
Ghost Song. It was displayed right near the start of the reel.
Congrats! That's really awesome!My game appeared in a reel showing off Unity 2D titles at yesterday's Unity Unite event in Copenhagen. :)
Check timestamp. It's just a few seconds, but it was neat to see it on an actual stage!
[SerializeField] private GameObject player;
[SerializeField] private GameObject playerBody;
[SerializeField] private Health health;
[SerializeField] private GameObject enemyBody;
[SerializeField] private int maxDistance;
[SerializeField] private int maskLayer;
[SerializeField] private bool shootPlayer = false;
[SerializeField] private bool canShoot = false;
public int minNum;
public int maxNum;
int RandomNum;
int timer;
void Update()
{
RandomNum = Random.Range(minNum, maxNum);
timer = RandomNum;
}
void rayShoot()
{
RaycastHit shotRay;
if(Physics.Raycast(enemyBody.transform.position, enemyBody.transform.forward, out shotRay, maxDistance, maskLayer))
{
if(shotRay.collider.gameObject == playerBody)
{
health.health -= 12 * Time.deltaTime;
}
}
}
void OnTriggerStay(Collider areaOfFire)
{
if(areaOfFire.gameObject == player)
{
for(int i = 0; i < 10; i++)
{
if (timer == 0)
{
rayShoot();
}
}
}
}
void OnTriggerExit(Collider dontBang)
{
canShoot = false;
}
My game appeared in a reel showing off Unity 2D titles at yesterday's Unity Unite event in Copenhagen. :)
Check timestamp. It's just a few seconds, but it was neat to see it on an actual stage!
I think a mix of 1 and 2 or 3 is good. Let the game stretch with a limit so it does look ridiculous on some of the crazier screen sizes. Add black bars / extra art if the game passes the limit. Also be wary of the notches some phones have like the iphone x. Definitely don't let the game go into that area.Question for anyone who has worked on mobile before, or just anyone with good ideas. I finally got the mobile game I've been working on to stick to Landscape and to fit around the image, but as you see their is extra space to the right. As my phone has more length to it, as most likely most phones will. The game uses a "720p" screen size for the whole game.
So what would be a good solution to deal with this extra space?
1. Stretch it? Going to assume this be a horrible idea.
2. Keep it black but center the game to middle?
3. Center game to middle but have some kind of extra art to left and right?
4. Something else?
So far leaning to #3. As there are sections of the game where their all no walls and the main object (the Star) can go beyond and isn't limited. And would just need extra contious art for different parts of the game/menus
Btw: Ignore the black bar to the left, that's just my phone. It's actually fully to the left with no extra space before it, only after.
I'll take a shot at it, but you'll have to double check me. Note that there are lots of ways to do things, so I'll just keep it simple here.Hello all, I'm here because I want to know if this is the right way to make enemy shooting at player and deal damage
I'm using Unity Engine and Csharp.
Code:public int minNum; public int maxNum; int RandomNum; int timer; void Update() { RandomNum = Random.Range(minNum, maxNum); timer = RandomNum; }
public float minNum;
public float maxNum;
private float timer;
void Start()
{
timer = Random.Range(minNum, maxNum);
}
void Update()
{
timer = timer - Time.deltaTime;
}
Code:void rayShoot() { RaycastHit shotRay; if(Physics.Raycast(enemyBody.transform.position, enemyBody.transform.forward, out shotRay, maxDistance, maskLayer)) { if(shotRay.collider.gameObject == playerBody) { health.health -= 12 * Time.deltaTime; } } } void OnTriggerStay(Collider areaOfFire) { if(areaOfFire.gameObject == player) { for(int i = 0; i < 10; i++) { if (timer == 0) { rayShoot(); } } } } void OnTriggerExit(Collider dontBang) { canShoot = false; }
I'll take a shot at it, but you'll have to double check me. Note that there are lots of ways to do things, so I'll just keep it simple here.
I'm not sure this will do what you want. This part will basically assign a random number to timer every frame, so it will just skitter around in the range of integers you specify. If you are trying to give the timer a random starting value, like say set it to something between 2 and 4 seconds, what you probably want to do is something like this (note that I changed your data types):
Code:public float minNum; public float maxNum; private float timer; void Start() { timer = Random.Range(minNum, maxNum); } void Update() { timer = timer - Time.deltaTime; }
This will set timer to a random number when the script first starts, and then decrease the timer each frame by the amount of time that has passed since the last frame, so if your starting value is 2, then after 2 seconds the timer will be (roughly) zero. They need to be floats (decimal numbers) because Time.deltaTime will probably be something like 0.006 or whatever. Remember this happens every frame. Once timer <= 0, time's up. You'll have to reset the timer later, but we'll get to that.
So, it looks like as long as the player is within the firing range, which is defined by a collider, you want to fire in the direction the enemy is facing every [timer] seconds, is that right? I'm not sure what the 1-10 loop is for, sorry.
For a start, I'm not sure if raycasting is what you want to use here. This basically just draws an imaginary line with no thickness from one point to another and looks to see if the line touched anything. So, it's good for interacting with objects, checking line of sight, etc. From the player's perspective, they would basically take damage sometimes when they walk in front of the enemy. Can you explain how you want this to work? i.e. is this meant to be a hitscan weapon or do you want to fire a beam or projectile? Does it deal instant damage or is it damage over time while the player is standing in it? I can give you more specific help if you can clarify that.
I used the loop to see how things will work, because as I'm learning I wanted to "experiment" because currently I have no idea where to use the loop, I know it is for repeating the same code, but I have 0 idea which code I want to repeat :)
Thanks for the help, later I will use it hoping it will works :)
I will, but I'm worried if someone gets mad because of all these questions :)You're welcome. When you decide how you want it to work, come back and I'll see if I can help again.
Just in general, I would say that you probably want to put your firing code in update(). So when timer <= 0 and canShoot = true, execute the firing routine and reset the timer. Then you can just turn canShoot on and off when the player enters or exits the collision area, and you can get rid of the OnTriggerStay.
My game appeared in a reel showing off Unity 2D titles at yesterday's Unity Unite event in Copenhagen. :)
Check timestamp. It's just a few seconds, but it was neat to see it on an actual stage!
oh no i feel the urge to gamedev returning to me
if i post that makes it more real right? maybe i can get another bit done on my next sprint.
My game appeared in a reel showing off Unity 2D titles at yesterday's Unity Unite event in Copenhagen. :)
Check timestamp. It's just a few seconds, but it was neat to see it on an actual stage!
Awesome to see. The switch to Unity really seems to have done wonders for your game.
Well, you just missed it being on Sale on Steam for $66 (33% off) for the Desktop license - I don't know how often it goes on sale though since I upgraded immediately when it originally came out discounted to $50 back in 2017.
But in all honesty as someone who got very familiar with GameMaker Studio 2 I would honestly recommend instead learning C# (Actually fairly easy coming from GML) and going with Unity, unless you plan on making something very simple. GMS2 is fairly good all things considered and it was a very hard choice for me to abandon it and start from scratch in Unity, but with every day that that's passed for me (re)developing JAEGER in Unity and coding in C# I keep wishing I did it sooner. There were a lot of headaches I had with the quirks of GMS2 and the GML language in my time using that I've not had to deal with in Unity.
Wow, that looks amazing. Obviously inspired by avatar, but the choreography looks so fucking cooltime to rework my brawler code to work only 2d so i don't have to do sprites that move 8 ways
maybe something in this style which is fairly easy to iterate on quickly
hmmmmmm
What kinda hangups are you having? I've been doing C# for years for my day job, while I use GMS2 for my gamedev.But in all honesty as someone who got very familiar with GameMaker Studio 2 I would honestly recommend instead learning C# (Actually fairly easy coming from GML) and going with Unity, unless you plan on making something very simple. GMS2 is fairly good all things considered and it was a very hard choice for me to abandon it and start from scratch in Unity, but with every day that that's passed for me (re)developing JAEGER in Unity and coding in C# I keep wishing I did it sooner. There were a lot of headaches I had with the quirks of GMS2 and the GML language in my time using that I've not had to deal with in Unity.
I'll take a shot at it, but you'll have to double check me. Note that there are lots of ways to do things, so I'll just keep it simple here.
I'm not sure this will do what you want. This part will basically assign a random number to timer every frame, so it will just skitter around in the range of integers you specify. If you are trying to give the timer a random starting value, like say set it to something between 2 and 4 seconds, what you probably want to do is something like this (note that I changed your data types):
Code:public float minNum; public float maxNum; private float timer; void Start() { timer = Random.Range(minNum, maxNum); } void Update() { timer = timer - Time.deltaTime; }
This will set timer to a random number when the script first starts, and then decrease the timer each frame by the amount of time that has passed since the last frame, so if your starting value is 2, then after 2 seconds the timer will be (roughly) zero. They need to be floats (decimal numbers) because Time.deltaTime will probably be something like 0.006 or whatever. Remember this happens every frame. Once timer <= 0, time's up. You'll have to reset the timer later, but we'll get to that.
So, it looks like as long as the player is within the firing range, which is defined by a collider, you want to fire in the direction the enemy is facing every [timer] seconds, is that right? I'm not sure what the 1-10 loop is for, sorry.
For a start, I'm not sure if raycasting is what you want to use here. This basically just draws an imaginary line with no thickness from one point to another and looks to see if the line touched anything. So, it's good for interacting with objects, checking line of sight, etc. From the player's perspective, they would basically take damage sometimes when they walk in front of the enemy. Can you explain how you want this to work? i.e. is this meant to be a hitscan weapon or do you want to fire a beam or projectile? Does it deal instant damage or is it damage over time while the player is standing in it? I can give you more specific help if you can clarify that.
Raycasting will work for that kind of weapon, as long as you don't mind the hit zone being a simple line. If you want to give it a wider field of fire, you could use spherecasting instead, though that's a bit more expensive. I would say try it out and see if you like the results, and if not you can try a different solution.Sorry for the late answer but I was not available.
I'm using the raycast like a laser when the laser turns on and touch the player it should simulate the "bullets" hitting the player, but if there's another way to do it I would love to know how to do it. I don't want to use projectiles since I'm simulating a gun instead of a rocket launcher.
For the damage let's say If the enemy shoot every 3 seconds the enemy will have a robot feel, I don't want the bang...bang...bang (dots are the seconds) I want more like bang..bang.bang...bang.bang.bang more random shooting.
I had no clue Unity had Spherecasting, looks a great option for my enemy. Thanks.Raycasting will work for that kind of weapon, as long as you don't mind the hit zone being a simple line. If you want to give it a wider field of fire, you could use spherecasting instead, though that's a bit more expensive. I would say try it out and see if you like the results, and if not you can try a different solution.
For anyone doing a game with pixel-art graphics, I hope you plan to implement some nice texture filtering. So many games seem to just click the nearest neighbor filtering option in unity or whatever they are using and then be done with it. This is prevalent even in high profile indie games. Why is this a bad thing? Well because it's nauseating and looks like crap! Why would anyone want wobbly and shimmering pixels?
For reference this is what I'm talking about: https://www.shadertoy.com/view/MllBWf
Doing the leftmost one is not a sane artistic choice, it's just bad. If this applies to you, then I highly recommend this article that comes with code and everything: http://themaister.net/blog/2018/08/...rt-filtering-in-3d-a-mathematical-derivation/
I don't know if anyone here is guilty of this it's just that I've been playing so many games with pixel art (both 2d and 3d) recently where the devs either weren't aware or didn't bother dealing with the bare basics of image quality that I felt like I have to get the word out.
that looks pretty great. I'm thinking more of modern style pixel art rather than retro pixel art(if that makes any sense). Lots of rotations, maybe 3d elements or even full 3d, effects and things like that. Basically sprites thrown on textures with nearest neighbor filtering in a 3d engine and then forgotten about :)Personally, I think if someone has huge, unfiltered, rotated pixels, then aliasing is the least of their problems. :D I have a (kind of rigged together) pseudo-CRT filter, and also avoid rotating pixels for the most part. I do turn off the filter when taking screenshots and videos, as image scaling messes with the scanlines.
This is my game with the filters on: it will look like crap unless you zoom at 100% and then fullscreen the browser window (F11 on Chrome). Pixels are not always perfectly aligned to the grid, but this is a sacrifice /concesion in order to have smoother movement and scrolling:
that looks pretty great. I'm thinking more of modern style pixel art rather than retro pixel art(if that makes any sense). Lots of rotations, maybe 3d elements or even full 3d, effects and things like that. Basically sprites thrown on textures with nearest neighbor filtering in a 3d engine and then forgotten about :)
It depends. I completely agree if we are talking old school style graphics, then it's like mixing resolutions.. you just don't do that. But I've seen quite a few recent infinity engine style games where panning the screen makes all the pixels shimmer and wobble. Not to mention pixel art textures in 3d games.I guess my strong dislike of rotated / zoomed pixels means aliasing issues don't even blip for me. It's like being careful not to obstruct the crosswalk when parking your bank robbery getaway car. :D
This is old man yelling at clouds stuff that will probably die with my generation, when nobody alive actually remembers what it was to play games in that era anymore. It's kind of weird to think about, actually.
Doing some lookdev for a new project. Focusing on the environment art, character is a placeholder.
Also, god I hate twitter's video compression! Posted a cropped zoomed in version for phones, but when I look at it over wifi, twitter still blurs the video for the first half before popping in with detail, and every time the video loops it goes back to low res.
If anyone takes a look, let me know if the twitter vid is low res, compressed and ugly for the first half. I'm probably being too picky about this, but man does it look bad. And I'd hate to post a bunch of vids with compression that Twitter just doesn't like, or something like that.
Doing some lookdev for a new project. Focusing on the environment art, character is a placeholder.
Also, god I hate twitter's video compression! Posted a cropped zoomed in version for phones, but when I look at it over wifi, twitter still blurs the video for the first half before popping in with detail, and every time the video loops it goes back to low res.
If anyone takes a look, let me know if the twitter vid is low res, compressed and ugly for the first half. I'm probably being too picky about this, but man does it look bad. And I'd hate to post a bunch of vids with compression that Twitter just doesn't like, or something like that.