Author Topic: Do any of you code for your jobs?  (Read 8457 times)

0 Members and 1 Guest are viewing this topic.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #120 on: April 03, 2022, 03:05:07 PM »
Ugh, this is acting way less accurate than the old timer. Not sure what's going on.

I have the first text/gamechild destroy at 2 secs and the next trigger at currentTime = 3 seconds, but it doesn't. Only at 4 secs or later. Same with trying like 3.5/3.6/3.7, I get nothing before 4 secs. It's like the timer isn't working before 4 seconds?

Basically limitations I'm seeing with this code currently is:

-Can't display anything before timer = 1
-Needs like an extra second to process between updates so need to space out time events by at least 2 seconds
-Can't timer stuff as a float, only whole number integer (which is bizarre because it's definitely a float)


Here's my code:

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class Timer2 : MonoBehaviour
{

    float timerCurrent = 0.0f; // timer value
    bool runTimer = false; // for a simple start / stop toggle
    public Text timerTextUI;

    void StartTimer(float tickrate)
    {
        runTimer = true;
        InvokeRepeating("MyTimer", 0, tickrate);
    }

    void MyTimer()
    {
        if (!runTimer) { StopTimer(); return; }
        timerCurrent++;
        timerTextUI.text = "Time: " + timerCurrent;
    }

    void StopTimer()
    {
        runTimer = false;
        CancelInvoke();
    }

    void RestartMyTimer(float tickrate)
    {
        timerCurrent = 0;
        StartTimer(1.0f);
    }


    // Start is called before the first frame update
    void Start()
    {
        StartTimer(1.0f);
    }

    // Update is called once per frame
    void Update()
    {

        if (timerCurrent == 1)
        { displayText1(); }
        if (timerCurrent == 4)
        { displayText1(); }
        if (timerCurrent == 8)
        { displayText1(); }
        if (timerCurrent == 12)
        { displayText1(); }
        if (timerCurrent == 20)
        { displayText1(); }
        if (timerCurrent == 41)
        { displayText1(); }
    }

    public void displayText1()
    { transform.GetChild(0).gameObject.SetActive(true); }

}
« Last Edit: April 03, 2022, 03:12:13 PM by Bebpo »

GreatSageEqualOfHeaven

  • Dumbass Monkey
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #121 on: April 03, 2022, 03:11:06 PM »
couple of compile errors.

        timerTextUI.text = timerCurrent.ToString();

        StartTimer(float, tickrate);

oops, my bad - the above should fix the above; I'm pseudocoding from my head, so don't have syntax highlighting and autocomplete XD

Also I see you're using tickrate instead of time.deltatime. Is this better for a more stable time between all different computers? I.e. I want big boss to jump out on screen at 5 seconds in on the level because at 5.5 secs something else will fall into the screen covering it and at 4.5 seconds the same thing so only during that 5 second window is the screen open for the boss to jump in.

Void start{startTimer (1.0f)}

Then if currentTime = 5 seconds = boss jump out?

Yeah, invoke / invoke repeating both use real time for their delays; the delays are basically artificial, the code runs, but then it gets told 'wait for x seconds first tho plz'.
For really fine tuning of order of events at specific times, you might want to consider a coroutine, because you can literally stack yields inside one and do

Quote
private IEnumerator BossSetup()
{
     yield return new WaitForSeconds(5f);       
     Boss.gameObject.SetActive(true);
     yield return new WaitForSeconds(0.5f);       
     BossAnimation();
     yield return new WaitForSeconds(0.5f);       
     OtherThingHappens();

which will wait half a sec between each chunk, but if you're otherwise good, you're otherwise good!

e:
Ugh, this is acting way less accurate than the old timer. Not sure what's going on.

I have the first text/gamechild destroy at 2 secs and the next trigger at currentTime = 3 seconds, but it doesn't. Only at 4 secs or later. Same with trying like 3.5/3.6/3.7, I get nothing before 4 secs. It's like the timer isn't working before 4 seconds?

just to be clear, are you using it like a stopwatch, or like a timeline? A tickrate of 1 should mean it runs the timer ~ once per second; if you want it more accurate, you can run it faster, and do like, a 0.1 tickrate with your timings multiplied by 10 - its still going to be more efficient than hammering in Update

e2:
you say nithing runs between 1 and 4 seconds, but thats the only thing you check in the code you posted...?
Code: [Select]
        if (timerCurrent == 1)
        { displayText1(); }
        if (timerCurrent == 4)
        { displayText1(); }
« Last Edit: April 03, 2022, 03:17:20 PM by GreatSageEqualOfHeaven »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #122 on: April 03, 2022, 03:16:15 PM »
Oh, ok, I didn't know what tickrate does. Will do it at .1 to get more accurate timings.

Yes, I'm using it like a stopwatch, watching the stage flow and writing down the # when I want each event to happen.


I like your coroutine concept, seems perfect for stage scripting of events. Will use that next time.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #123 on: April 03, 2022, 03:27:15 PM »
There's still a weird thing where it doesn't want to do anything before about 4 seconds real time. No idea why. I set the tickrate at .1f and trying to display first text at 10 and nothing happens. It starts with the next one at 40.

It's fine as I can set the first one to display under start();

GreatSageEqualOfHeaven

  • Dumbass Monkey
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #124 on: April 03, 2022, 03:31:08 PM »
yeah, unless you're checking the timer in another bit of code, the one you posted only does stuff at 1 second and 4 seconds, so it doing nothing between those is as intended...?

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #125 on: April 03, 2022, 03:42:44 PM »
The one at 1 second doesn't run though...

But I got it all working just putting it under start for the first one and first timer related one being at 30 ticks (.1f tickrate) which is fine. Just seems like there's a brief lag with the tickrate before it can run commands?

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #126 on: April 03, 2022, 03:43:26 PM »
Oh, speaking of multiple scripts. How would you write a multi-use respawn script if you want to respawn at different offsets each time? Just have the offset be a public variable?

GreatSageEqualOfHeaven

  • Dumbass Monkey
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #127 on: April 03, 2022, 03:56:41 PM »
The one at 1 second doesn't run though...

But I got it all working just putting it under start for the first one and first timer related one being at 30 ticks (.1f tickrate) which is fine. Just seems like there's a brief lag with the tickrate before it can run commands?

huh, it might be an order of execution thing;
in the original script, in this line:
Quote
InvokeRepeating("MyTimer", 0, tickrate);
that zero means 'run this shit immediately' - you can delay it there, which might stop it missing the first set value...?

Oh, speaking of multiple scripts. How would you write a multi-use respawn script if you want to respawn at different offsets each time? Just have the offset be a public variable?

in terms of splitting up functionality, you can do
Code: [Select]
Vector2 Setspawn(int spawnIndex)
{
     Vector2 spawnPos;
     //whatever you're doing to offset the spawn here, eg if you spawn one unit further to the left on each death
     spawnPos = new Vector2((0-spawnIndex), 0);
}

void DoSpawn(transform spawnPos)
{
     newSpawn = spawnPos + SetSpawn(timesDied);
     instantiate(player, newSpawn, transform.rotation);
}
or whatever.
Or you could just have two floats for spawnX and spawnY, and set them directly? that would probably be even less complicated
« Last Edit: April 03, 2022, 04:02:03 PM by GreatSageEqualOfHeaven »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #128 on: April 03, 2022, 04:11:15 PM »
Fixed all the timers. Now the game should "hopefully" work on every setup.
Now gotta finish up the art assets.


Btw, so with the animator in Unity, when you put animation on a sprite and you scale the sprite up or down the animation scales as well.

But, when the object dies, if I have a death animation it's not scaled :|  I think this is because the gamemanger script has it setup where the object and its death animation are separate because you put for each object "death effect" where you drag a prefab which is the death animation & sound effect for that thing. Not sure if there's a quick solution to this other than to go back to the animation program and resize the animation loop at the scale you're going to have the sprite in game so the animation matches on death.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #129 on: April 04, 2022, 12:00:36 AM »
Been sprite & animation making for the last 8 hours. Done with all the sprites/animations I needed. Now just gotta put them on objects and allllmost done. Need to make like one song and some sfx and clean up a few small things. Might make it by the midnight deadline.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #130 on: April 04, 2022, 03:11:26 AM »
Just turned it in at 11:59pm.

Not super happy.


Most things worked. I never got to the rest of the music or upgrading the game over/title pages or adding any additional script features like a retry button on game over for each of the final boss phases. Or doing any interesting UI movement stuff.


Implementing all the sprites and animations I made today including player/enemy/boss sprites, animations and death animations and even replacing the bullet sprites with more Cave-like bullets and animating some of the environmental effects a bit more took hours.

Worst of all, I spent like 3-5 hours today entirely on the final boss animation and death animation since I wanted it to be the most impressive visual piece of the game. Instead of a small 16x16 I upscale 10x just to get working in my game, it's a big 600 x 500 or something sprite.


For whatever reason Unity fucks up the sprite in animation and makes it look like some 12x12 blurry thumbnail. The sprites in unity after being sliced up look fine and sharp and full size. But when I put them on an object in animator and make an animation it's like a thumbnail and looks like total shit. This really bummed me out since I put so much effort in.

I guess I'll be spending another day troubleshooting this and if I can fix it, I'll spend another day doing the last little music and effects bits I wanted and then I guess I'll share it with y'all. Really was hoping to be done today after like 60 hours crunching over the last 4 days on this.

remy

  • The abominable Hoeman
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #131 on: April 04, 2022, 03:14:35 AM »
60 hours crunching over 4 days is indeed an authentic game dev experience

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #132 on: April 04, 2022, 03:43:17 AM »
FIXED IT. There's a bit on sprite compression where it's on normal compression and I changed it to best quality. Problem was the sprite was too large because I made it too awesome :(

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #133 on: April 04, 2022, 03:51:24 AM »
Oh wow, changing max size really, really changes it up. Like night and day. Gonna go back through all my sprites. Stupid low file size compression fucking everything up. Looks sharp now.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #134 on: April 04, 2022, 04:47:22 AM »
So the game's in a pretty good place. I mean it's still just a 5 min mediocre first indie game that absolutely does not feel like it shows 100-200 hours of dev time. But then again like 75% of that was learning, learning, learning. Every day I learned like a dozen things that will apply to any future projects.

Hell, today when I was trying to animate the final boss I started breaking it down modularly and drawing and animating each part of it separate and then layering it together. Even just doing simple small animations with layers so you can transform and rotate certain parts without other parts is really helpful.

I wrote up a checklist of all the items left that I'd like to do. Definitely less pressure now that the game is feature complete and working and turned in. Basically can just enjoy polishing it up a little bit more and adding a few things and then will call it good. Definitely calling it good this week so I can move on and start watching some new classes and learning new things.

Will link it later in another day or two.

GreatSageEqualOfHeaven

  • Dumbass Monkey
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #135 on: April 04, 2022, 12:58:49 PM »
But, when the object dies, if I have a death animation it's not scaled :|  I think this is because the gamemanger script has it setup where the object and its death animation are separate because you put for each object "death effect" where you drag a prefab which is the death animation & sound effect for that thing. Not sure if there's a quick solution to this other than to go back to the animation program and resize the animation loop at the scale you're going to have the sprite in game so the animation matches on death.

Hey, rememeber when you were messing with transform.localscale earlier?
after you spawn it, use transform.localscale to resize it to the new scale!

FIXED IT. There's a bit on sprite compression where it's on normal compression and I changed it to best quality. Problem was the sprite was too large because I made it too awesome :(

You also want to set texture filtering (FILTER MODE) to POINT rather than bilnear / trilinear if its pixel art, so it renders 'as is' rather than trying to smooth it with a lowlevel blur

Will link it later in another day or two.

Do a WebGL build and stick it up on Itch.io!

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #136 on: April 04, 2022, 01:42:09 PM »
Yeah, been using point and webgl builds. Also fixed matching up the death animation size last night :)

So tired today. Crunch is hard. Goal for next game is better planning and less crunch. Gonna need a few days for my body to recover from this.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #137 on: April 04, 2022, 03:47:56 PM »
My project got a couple of peer reviews and passed yay!

Some nice comments too.

I did lose a couple points because of no screenshots. I have screenshots on my itchi.io page but yeah looking on view page they don't show. Turns out you have to edit the theme and set sidebar for screenshots or they don't show. Good to know. Just like the Unity extreme compression I have no idea why these are the default settings for things.
« Last Edit: April 04, 2022, 03:54:02 PM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #138 on: April 04, 2022, 08:56:42 PM »
Doing some clever more efficient code stuff in my clean up but there's one thing that conceptually I'm not sure how to do and I think it has to do with my animator.

Basically one thing I didn't like was when you killed the final boss and the death animation started the other enemies on the map (which are invincible bullet spawners) would keep spawning bullets that could kill you while the final boss death animation was playing.

So to solve this I created a new scene and set the idle animation of the boss to the death animation and destroyed the object with a set destroy timer once the animation finished.

Now once the last hit registers it instantly changes to the new scene where the boss is in the same place but the other enemies are gone and then the final boss animation plays and then it transitions to the ending.

This is better, but the transitions are still a bit jarring. Like suddenly the other enemies just vanish and I feel like there should be a short pause upon the final shot landing on the boss before the very short death animation starts and ends. This would require two coding concepts:

#1 - A script on each enemy to search the scene at every update and when the boss uhhh changes sub-state to running death animation to then start running their own death animations? This is actually a bit complicated because it requires not just getting objects and setting them true/false but changing settings within their component scripts. Maybe there's a simpler way to do this?

I mean I could just have the enemies search the scene and when boss is setActive(false) to run their death effect animations but they'd still be shooting bullets while the boss death animation is playing.

*edit* - Ok, interestingly if I put the other enemies as children of the boss they disappear on final boss final hit and the boss death animation plays out. This is good. But I wish I could have the other enemies play their death animations and not just vanish.

#2 - To have a pause before the death animation starts. I feel like I need to learn the animator controller and how to add states and transition between them. I have taking/watched zero classes on the animation controller and all I know is how to make a controller and give it one animation I make and that's it.

A work around is for me to go back and edit the animation to just add a bunch of sitting still frames for a second first and then go into the animation. That way I can play a sound effect on death ARGHGHHH and pause sits for a second, hopefully the other enemies on screen die in #1 above and then the boss plays out the death animation.


In the end this is super nitpicking, but improving transitions and stuff is the kind of polish that goes a long way! Hell, on that note when the final boss appears it would be nice to lean how to do a transition effect so it like wavy lines fizzles into existence. Right now the scene loads and there's an empty space and then it just POPS into existence and starts spewing bullets instantly. For other bosses I have them come down from off-screen but this boss should start in the middle of the screen so either it's there the second the scene loads and instantly firing bullets (I'd need to mess with the timer to pause this) or it pops into existence a few seconds later which I'm ok with and is how it is currently. Just would be nice to learn how to make an effect for bringing it into the scene.
« Last Edit: April 04, 2022, 09:01:29 PM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #139 on: April 04, 2022, 09:05:32 PM »
Just brainstorming but a potential slightly complicated way of doing #1 could be having a script on the non-boss enemies that checks boss HP each update and when boss HP == 0 they run their death effect.

Now that goes back to the thing I don't know how to do which is one object checking a variable in another object's script though.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #140 on: April 04, 2022, 09:15:23 PM »
Well I figured out the life UI thing pretty quick. And yeah I just stuck it under the health script where currentLives are stored. Added public Text bit and stuck it on the UI and there you go.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #141 on: April 04, 2022, 10:54:02 PM »
Ok, got some small cool stuff in. Added a retry button that reloads stages skipping cutscenes and figured out how to make an easy mode version of the final boss stage. Actually pretty easy making multiple difficulty stage variations since you can adjust all kinds of stuff quick (lives, invincibility time, enemy health, enemies on-screen). Will use this knowledge in the future to make multiple difficulty levels for future projects if it makes sense.

As someone that hates dying and sitting through shit again, getting that retry button in was pretty important before I started sharing the project  :lol
That's sort of the best thing about game making is you can make sure to address all the little stuff that pisses you off in games.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #142 on: April 05, 2022, 02:02:23 AM »
Spent part of tonight redoing my skull enemy. The old animation was just testing some shadowing and the animation is lacking in fun. Ideally I want things in my game to be fun. So I gave my mohawk skull an MGS style death.

Old:




New:





This really isn't anything much to do with my game, I'm just enjoying being able to animate things for the first time in my life as someone with no hand drawing talent.
« Last Edit: April 05, 2022, 02:06:32 AM by Bebpo »

daemon

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #143 on: April 05, 2022, 08:54:37 AM »
Which software are you using for spritework?

I recommend Aseprite.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #144 on: April 05, 2022, 01:16:52 PM »
Had a friend test out the game and had some good ideas. One was adding lifebars for bosses to tell you are making progress. I'll look up a guide on that, having something visual besides a number that changes per hit is something I haven't coded yet.

Which software are you using for spritework?

I recommend Aseprite.

Yeah, I'm using Aseprite. It's great! Lots of really good tools. Though I still can't figure out how to paste  a group of animation frames after copying them. I ctrl+c on a group and ctrl drag them to the end of the bar and it only pastes like..two random frames of the batch. So I'm manually copying and pasting and moving one frame at a time. At some point I should go through a tutorial.

Uncle

  • Have You Ever
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #145 on: April 05, 2022, 02:25:47 PM »
again there are myriad ways to do anything, but an easy one is if you have a simple object that is "textured" with just one color, like green for a life bar, and have its width set to a calculation based on 100% of the boss's health, and simply reduce its width as life goes down (revealing a UI element behind it that is red to show how much of the bar has depleted)
Uncle

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #146 on: April 05, 2022, 02:59:01 PM »
again there are myriad ways to do anything, but an easy one is if you have a simple object that is "textured" with just one color, like green for a life bar, and have its width set to a calculation based on 100% of the boss's health, and simply reduce its width as life goes down (revealing a UI element behind it that is red to show how much of the bar has depleted)

Thanks, that's great. My one concern is I don't want an ugly lifebar messing up the visual space, so really depends on how much I can get it to look alright. Otherwise I'll skip lifebars.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #147 on: April 05, 2022, 06:35:04 PM »
Couple of things:

1. I'm definitely at that point where the thing is pretty much done but I keep going "Well I can make this better" or come up with a new idea and go "aha, I'm gonna spend hours doing this" and sometimes I do it and it makes it worse and I throw it all away, and basically I keep tinkering with the thing and it never actually gets released.

I'm very aware that this is my first baby's first game test game and it's not supposed to be perfect, hell it's not even supposed to be good and if I stick with this I have a very long road ahead of learning and many more projects and I need to move on and start the next class.

So I'm gonna just finish a few more bits (nothing too intensive) and get this out by tomorrow.


Now
2. For a small thing, at lunch I tried putting my enemy movement script on a canvas UI text to have it move off the screen and a new canvas UI text moves up from off screen to replace it. The going down off-screen is fine, but going up is fucked because my movement script is incrementing based off the transform.position of the object in the game, whereas the canvas UI transform position of the object is relative to the local window size canvas. What works on my screen suddenly does not work on the WEBGL embedded version. Not only that but it crashes the WebGL version whoops.

Is there a way to modify my script to make the movement increments like canvasUI.gameobject.transform.y instead of transform.y to move it up or down on the canvas based on its position relative to the canvas (the text is a child of the canvas)?

*edit* google search makes it seem like I should be using rectTransform instead of transform. I'll see it that fixes it. Localscale might fix it too...
« Last Edit: April 05, 2022, 06:40:46 PM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #148 on: April 05, 2022, 07:09:33 PM »


How do I get that -24 number? I want to set an (if > -24) move upwards.

I'm trying RectTransform and this code just gives me the RectTransform is 0.0, 0.0 no matter where the text object starts on screen and I can only manipulate it relative to that.

Code: [Select]
  void Update()
    {
        RectTransform RT = GetComponent<RectTransform>();

        Debug.Log("RTpositiony = " + RT.position.y);
    }

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #149 on: April 05, 2022, 07:44:32 PM »
Unity manual says localScale should be the position relative to the parent. And Localposition is relative to screen pixels.

When I use:

Debug.Log("RT " + transform.localPosition.y );

it gives me -235 because the parent is like -211 or something. So in the inspector it says -24. I can't figure out how to get the parents transform.localPosition so I can just do:

Debug.Log("RT " + transform.parent.localPosition.y - transform.localPosition.y ); to get -24?

When I use localScale it gives me 1,1,1 which is still nothing like -24.

I'm very confused.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #150 on: April 05, 2022, 08:18:42 PM »
finally found it on the example using the unity manual.

m_RectTransform = GetComponent<RectTransform>();
Debug.Log("RT " + m_RectTransform.anchoredPosition);

This gives me, -78, -24.4 in the debug window.

Now just need to figure out how to grab the Y and manipulate it.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #151 on: April 05, 2022, 08:36:58 PM »
Got it maybe working, using the traditional transform.position movement but using that m_RectTransform.anchoredPosition to find the point at which to stop moving the text. Will need to test it on the embedded version to see if it works on a different screen size.

Code: [Select]

public class Test_MoveSpecial2 : MonoBehaviour
{
    public float EnemyMoveSpeed = 1.0f;
    public bool GoingUp = false;
    public float DestinationY = 0;
    RectTransform m_RectTransform;

    private void Start()
    {
        m_RectTransform = GetComponent<RectTransform>();
     
    }

    void Update()
    {
        Debug.Log("RT " + m_RectTransform.anchoredPosition.y);
        if (GoingUp == true && m_RectTransform.anchoredPosition.y <= DestinationY)
        {
           

        transform.position = new Vector2(transform.position.x, transform.position.y + (1 * EnemyMoveSpeed * Time.deltaTime));
        }
        if (GoingUp == false && m_RectTransform.anchoredPosition.y >= DestinationY)
        {


            transform.position = new Vector2(transform.position.x, transform.position.y + (-1 * EnemyMoveSpeed * Time.deltaTime));
        }
    }

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #152 on: April 06, 2022, 12:29:17 AM »
Assuming nothing breaks when I finally build it, game will be released in approximately 30-60 mins!

*edit* had crashes with the WebGL version; compiling what I hoped is the fixed version now. I have issues throughout the whole thing with UI text and getting the right size & position. Need to learn how to get this right for localScale. So best way to play it is in the windowed version, fullscreen is fine but a few spots have kind of small text.

*edit* This time when I tested out the WebGL build (and building these things takes like 10 mins each time) got all the way to the end credits and crashed on loading them.

Basically all my crashes are from all my fucking with the UI text trying to make it move around and change because sometimes it won't be there in the next scene and stuff is scripted to put things in it and I get nullpointer exceptions.

Some of my if/else statements keep failing and I end up in else even though there is no reason why I should be? And I don't 100% know how to use null, like an example of code (not literal code) is

if scene5, put text in textgoherespot + timer; else put other text in textgohere spot.

But sometimes that spot disappears and it gives me a null crash. I tried "if textgoherespot = null" do nothing" but it wouldn't let me use null with a string?

I ended up getting around this by using tags and telling it only to do those things in scene where there is an object with the "player" tag and then untagged the player in scenes that was going to be an issue.
« Last Edit: April 06, 2022, 02:54:17 AM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #153 on: April 06, 2022, 03:03:54 AM »
https://dkclassdesign.itch.io/the-task

Ok, here it is, I did a run through from start to finish and it worked.

But then I tested dying on the final boss and retrying on easy mode and it got stuck in the ending. So uh, don't do that. I already toned down the final boss and gave 6 lives, I think it's pretty impossible to lose tbh on normal.

*edit* actually did it again and easy mode works through the credits. It has something to do with if you play the game out of order some variables get screwed up and the game progression scene loading can hang. Like pretty sure the cause was because I beat it and then loaded a level and went to the ending again.
« Last Edit: April 06, 2022, 03:14:53 AM by Bebpo »

daemon

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #154 on: April 06, 2022, 05:40:18 AM »
(Image removed from quote.)

How do I get that -24 number? I want to set an (if > -24) move upwards.

I'm trying RectTransform and this code just gives me the RectTransform is 0.0, 0.0 no matter where the text object starts on screen and I can only manipulate it relative to that.

Code: [Select]
  void Update()
    {
        RectTransform RT = GetComponent<RectTransform>();

        Debug.Log("RTpositiony = " + RT.position.y);
    }

Just letting you know, never put things like GetComponent on Update, as it will keep doing a fairly expensive instruction. make the RT get declared on start or awake.

Alternatively, if for some reason you can't do it on start or awake (doubtful scenario, but things can happen), do something like an if (RT==null){RT=Getcomponentblabla}. That way it will only run through the first time, and an if condition would be quite inexpensive, processing wise.

Also check this graph cause it's really useful

https://docs.unity3d.com/Manual/ExecutionOrder.html

Uncle

  • Have You Ever
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #155 on: April 06, 2022, 08:40:15 AM »
screenshot doesn't illustrate this that well but you can shoot right through this specific set of walls for some reason



I know it doesn't really matter just wanted to point it out, they look like they're individual objects so maybe those 4 don't have some property set that every other wall does?
Uncle

GreatSageEqualOfHeaven

  • Dumbass Monkey
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #156 on: April 06, 2022, 01:44:44 PM »
You have a lot of nice little touches in your game that beginners usually don't have - were they part of the course, or did you add them?
Things like 'leading' the camera with your crosshair rather than the camera following the player, and having particle onhit effects on bullet collisions

#1 - A script on each enemy to search the scene at every update and when the boss uhhh changes sub-state to running death animation to then start running their own death animations? This is actually a bit complicated because it requires not just getting objects and setting them true/false but changing settings within their component scripts. Maybe there's a simpler way to do this?

You'd do this in a similar way that your object pool script worked; if those enemies are non killable before the boss (as I think they are having played it...?) you could do something like
Code: [Select]
public gameobject explosionPrefab; // or a dummy object that plays their death anim then deletes
public gameobject[] minions; // the [] means this is an ARRAY, or basically a list of all the types of gameobject you add here

void BossSpawnCodeBlock() // or whatever
{
     for (int i = 0; i<minions.length; i++) // this will cycle though each member of the Array and run the below code on each one
     {
          instantiate (explosionPrefab, minions[i].transform.position, minions[i].rotation);
          Destroy(minions[i]);
     }
}

which will delete all the objects you've added to the array, and play a one shot explosion / death anim where they were.

If those enemies ARE killable, this won;t work though, as it will break the array, like you did earlier with the bullet pooling by deleting rather than disbaling and repurposing.
You CAN do pretty much the same thing with a LIST though, as long as when you kill a minion you remove it from the list so when it does the FOR loop its only cycling through things that exist

In the end this is super nitpicking, but improving transitions and stuff is the kind of polish that goes a long way! Hell, on that note when the final boss appears it would be nice to lean how to do a transition effect so it like wavy lines fizzles into existence. Right now the scene loads and there's an empty space and then it just POPS into existence and starts spewing bullets instantly. For other bosses I have them come down from off-screen but this boss should start in the middle of the screen so either it's there the second the scene loads and instantly firing bullets (I'd need to mess with the timer to pause this) or it pops into existence a few seconds later which I'm ok with and is how it is currently. Just would be nice to learn how to make an effect for bringing it into the scene.

So what I'd suggest for this rather than making a bespoke animation for it appearing (the 'right' way to do this) would be that you can set the gameobjects material renderer to solid black (and maybe add some transparency) and then fade it in from black ("shadow", again, maybe with some trasparency) to solid coloured / fully opaque. when its material has fully changed to its 'real' colour, you can then allow it to start taking damage - you might wanna kill the player too if they didn't take the hint about the giant fucking shadow monster below them fading into existence right before combat phase starts.

You could also help sell this with some particle animations with 'negative' velocity, so it looks like particles are 'assembling' at the sprite outline to 'create' it (normal particle velocity would have particles moving away from their spawn point, not towards it, and make the spawn object type the sprite edges)

Is there a way to modify my script to make the movement increments like canvasUI.gameobject.transform.y instead of transform.y to move it up or down on the canvas based on its position relative to the canvas (the text is a child of the canvas)?

I'd generally recommend if you wanna do cool UI movements, get yourself a tweening solution and just use that, but in this case you can probably do what you want to do by going to your canvas properties and changing it from ScreenSpace - Overlay to WorldSpace; this will - as it might suggest - make the Canvas option appear in the actual playable gamespace, at the gamespace coords, and take all the same kinds of values any other gameobject in worldspace would

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #157 on: April 06, 2022, 09:30:49 PM »
Ok, done with work.

screenshot doesn't illustrate this that well but you can shoot right through this specific set of walls for some reason

(Image removed from quote.)

I know it doesn't really matter just wanted to point it out, they look like they're individual objects so maybe those 4 don't have some property set that every other wall does?

Yeah, so level 1's collision is a mess. If I was releasing it to the general public I'd completely redo stage 1, but I left it as is because y'all know this was my first game and stage 1 -> 2 -> 3 learning progression is something you can see since I made the stages in order.

When I did stage 1, I grabbed a wall texture asset from an asset pack I had off a bundle and cut and pasted a square of it into a texture file. Then I made a square object and give it a 2d rigid body square collider and then put the texture on. Then I placed one square title and it was really small, so I placed a couple by hand (didn't think to use transform numbers to line them up or vertex snapping key) and then copy & pasted the group when there were 3-4 at a time and then made a prefab of 3-4 wall tiles and just used dozens of them to build the walls.

This was a terrible, first game design room idea. The bullets are really small and there are seams between certain sets and it's all fucked up.

If I redid the level I would make just make rectangle blank shapes with the Unity editor for the walls and use vertex snapping and the transform to make sure they're all lined up and then I'd throw the wall texture on and tell it to tile the texture.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #158 on: April 06, 2022, 09:46:12 PM »
You have a lot of nice little touches in your game that beginners usually don't have - were they part of the course, or did you add them?
Things like 'leading' the camera with your crosshair rather than the camera following the player, and having particle onhit effects on bullet collisions

Thanks, but everything you mentioned came with the base game assets  :lol

Here's an example of someone else's that they did in the class. Their stage 1 is kind of the template we were given and they did a good job making a few levels of it adding more complexity in the level design, challenge and remixing the provided music. The template used particles for enemy bullets but I hated that and didn't want to learn particles at this point to make them better so I switched them to textured bullet objects in mine.

https://grabriel-roby-73.itch.io/2d-shooter

https://crewdipie-playz.itch.io/starship-wars

You can see from these that like the base movement, shooting, camera controls and UI menus are basically the same. Also the win jingle I use in mine is from the assets. I think outside the win jingle all the music is 100% original stuff I made. SFX are mostly template explosions and shots but I did the thump thump thump SFX for the talking scenes.

Quote
#1 - A script on each enemy to search the scene at every update and when the boss uhhh changes sub-state to running death animation to then start running their own death animations? This is actually a bit complicated because it requires not just getting objects and setting them true/false but changing settings within their component scripts. Maybe there's a simpler way to do this?

You'd do this in a similar way that your object pool script worked; if those enemies are non killable before the boss (as I think they are having played it...?) you could do something like
Code: [Select]
public gameobject explosionPrefab; // or a dummy object that plays their death anim then deletes
public gameobject[] minions; // the [] means this is an ARRAY, or basically a list of all the types of gameobject you add here

void BossSpawnCodeBlock() // or whatever
{
     for (int i = 0; i<minions.length; i++) // this will cycle though each member of the Array and run the below code on each one
     {
          instantiate (explosionPrefab, minions[i].transform.position, minions[i].rotation);
          Destroy(minions[i]);
     }
}

which will delete all the objects you've added to the array, and play a one shot explosion / death anim where they were.

If those enemies ARE killable, this won;t work though, as it will break the array, like you did earlier with the bullet pooling by deleting rather than disbaling and repurposing.
You CAN do pretty much the same thing with a LIST though, as long as when you kill a minion you remove it from the list so when it does the FOR loop its only cycling through things that exist


Thanks, that makes sense. The tentacles on the final boss are non-killable yeah.

Quote
In the end this is super nitpicking, but improving transitions and stuff is the kind of polish that goes a long way! Hell, on that note when the final boss appears it would be nice to lean how to do a transition effect so it like wavy lines fizzles into existence. Right now the scene loads and there's an empty space and then it just POPS into existence and starts spewing bullets instantly. For other bosses I have them come down from off-screen but this boss should start in the middle of the screen so either it's there the second the scene loads and instantly firing bullets (I'd need to mess with the timer to pause this) or it pops into existence a few seconds later which I'm ok with and is how it is currently. Just would be nice to learn how to make an effect for bringing it into the scene.

So what I'd suggest for this rather than making a bespoke animation for it appearing (the 'right' way to do this) would be that you can set the gameobjects material renderer to solid black (and maybe add some transparency) and then fade it in from black ("shadow", again, maybe with some trasparency) to solid coloured / fully opaque. when its material has fully changed to its 'real' colour, you can then allow it to start taking damage - you might wanna kill the player too if they didn't take the hint about the giant fucking shadow monster below them fading into existence right before combat phase starts.

You could also help sell this with some particle animations with 'negative' velocity, so it looks like particles are 'assembling' at the sprite outline to 'create' it (normal particle velocity would have particles moving away from their spawn point, not towards it, and make the spawn object type the sprite edges)

Very cool stuff. It's like what Uncle posted about the lifebars changing width. I guess since I haven't done it yet, I just don't know the coding words to tell things like colour and opacity to change in a script. Just need to look that up and learn that.

This weekend when I start on my next game project, first thing I'm going to do is test these effects in a fresh new game (lifebars, enemies phasing into existence, start learning to use particles) and if I get familiar with them in my new game I can go back and spend a few hours incorporating them back into this game.

Quote
Is there a way to modify my script to make the movement increments like canvasUI.gameobject.transform.y instead of transform.y to move it up or down on the canvas based on its position relative to the canvas (the text is a child of the canvas)?

I'd generally recommend if you wanna do cool UI movements, get yourself a tweening solution and just use that, but in this case you can probably do what you want to do by going to your canvas properties and changing it from ScreenSpace - Overlay to WorldSpace; this will - as it might suggest - make the Canvas option appear in the actual playable gamespace, at the gamespace coords, and take all the same kinds of values any other gameobject in worldspace would

Wow, this would have made my life so much easier.

I spent 4-5 fucking hours yesterday all trying to get the score to drop down and the red fear UI text to move up to its place. Even when I got it working like it does, the scale is fucked and if you fullscreen the game it takes like 3-4x the amount of time for the red UI text to get to its spot than if you play it windowed because there are more pixels to traverse to get up there. Originally that scene was shorter and would scene change before the red text got in place in fullscreen so I ended up lengthening it so now in windowed it just sits there for a few seconds doing nothing before the scene change.

Dealing with stuff, especially movement, in the game space is something I'm getting really comfortable at scripting to manipulate quickly, but dealing with UI stuff movement is a nightmare for me at this point so if changing the canvas to worldspace makes the UI text stuff no different from any other object on the screen that would be extremely helpful and timesaving.

Like I don't really get why you can make a square/circle/whatever on the game screen and move and manipulate it around  but you can't just make a blank gameobject and put TEXT on it and have TEXT appear on screen that you can move around the same. Seems stupid to me. I get it does that because text needs to resize based on the window size, but like so do the pixel enemies you have? They're bigger in fullscreen than in windowed? Everything resizes according to window size, so why can't I just move text blocks around :(

Since I like having a lot of text/dialogue in my stuff this is something that will keep coming up.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #159 on: April 06, 2022, 10:43:06 PM »
So now that y'all played it, and I'm proud of lots of little bits in it, here's my post-mortem on things specifically that I'd like to fix if I made a Championship Edition remake later on when I have more experience:


Title Screen:
-Sucks, but until I learn how to draw larger art my choices are to go do some photography and edit the photos into something I can use in a title screen/game over screen, learn some vector art skills, or commission artists for a few art pieces I can use for game over/win/title, etc....one of the very few benefits of starting getting into this at 40 instead of as a teen/college kid, is I got some $$ so I don't mind putting a couple hundred bucks into stuff here and there to improve the game.

Intro text:
-Fine

Stage 1:
-As mentioned the collision is a disaster
-The level scale isn't great. Player needs to be smaller or moveable area needs to be bigger. Too tight. Flames/Bats/Player need consistency in sizing (a little hard when original pixel art is all at differing sizes, I should try next game to make all sprites the same pixel size to be more consistent)
-The background tile looks horrible parallax scrolling kind of effect in windowed, looks ok fullscreen. Just need a different background.
-The art up top is awful and super low-res blurry. I tried making a "room" initially with like a wall and a fireplace at the top but it doesn't match with top-down for the rest. Should just ditch it and have wall tiles only and a better wooden floor background.


-If I made a public release remake, I'd make multiple stages in this style of increasingly larger and more complex mazes with more traps than just a flame that goes back and forth. Probably like 3-5 stages and this would be "world 1"

Stage 1->2 transition text:

-THE MOUSE CURSOR HAUNTS THE REST OF THE GAME even though no scenes have mouse aiming after the first scene!! If you start the build after any scene past the first scene there is no cursor in any scene. This upset me greatly and I could not figure out what was causing it or how to turn it off.

Stage 2:
-Is alright, make the 2d planets/rocks and stuff a bit smaller and less blown up pixelated. Have more waves of enemies with a few different enemy types (the skulls actually have like 3 different enemy types that do different types of attacks but I just used the same sprite on all of them).

-I had trouble making this scrolling stage work in terms of enemies either die too quickly or if they have more life by the time you kill one you're behind on the next ones that are scrolling in your face and it gets overwhelming. I think maybe I need to slow down the scroll movement speed for the enemies and spread them further apart and give them more life.

-For the eye boss, I'd try to fill in the sprite with a bit more detail so it's not just an 16x16 sprite blown up so large. I'd also give it a lifebar.


-Like stage 1, if I did a public release I'd make 3-5 stages of different enemies and obstacles to dodge layouts and make it "world 2". I could have it like you pass by 2d earth at the start and as you go through the 3-5 stages you pass by 2d versions of each planet in order they exist in distance from earth so it feels like each stage you're getting further and further away from earth and towards the end of the solar system. For the final stage of it can have like a black hole you go into and then come out of and fight the "EYE OF THE UNIVERSE" boss in darkness in there.


Stage 2->3 transition
-Fine, I kind of want to make my own spookier sound effect for when the eyes open.

Stage 3 intro
-Fix the UI text replacement so it's the same speed both windowed and full-screen
-Would like to make spooky scary music for 10 seconds building to a crescendo at scene change

Stage part 1
-In general with all my scene transitioning I have a bit of a hiccup in the music transitions that I need to work out. I tried putting the new music upon entering a stage on its own timer so it can wait a second or two or three before starting the stage music to transition more smoothly. Worked ok, but still room for improvement.

-Generally I like this stage! Was fun to make. The 3d planet dropping looks pretty ugly, but I spent like 3 hours getting those 3d planets to work and react to 2d bullets and the ship and didn't want to cut them. Also certain planets play a sound when they are falling on you but others don't. But they all have THE SAME AUDIO SOURCE with the same values and it makes no sense. Like the giant sun should sound REALLY LOUD and scary but it has like no sound at all... also stage could use more of a few seconds pause between dropping black holes and then dropping 3d planets. Was just too lazy to retime the motion speed of everything to make it better at that point.

-Speaking of sound I hate that Unity's audio source only has sound volume at 1 or below for audio. Lots of times my audio is too low at 1 and I don't know damn anything about how to throw that audio quickly into another program to increase volume and bring it back. And adjusting all the other audio in the level lower to compensate is too much work. I see this issue in a lot of games/programs. If volume slide is going to start at 1, then it better be able to go to 1.5 or 2. Otherwise end up dropping everything else to try to compensate and it's annoying.

-Stage 3 part 1 -> 2 BEAM SCENE transition
-this was the last stage I made yesterday, had been wanting to put it in and was fun getting it working, scripting in the movement system to change movement based on an internal timer so you go from locked movement to free roam movement at the last second after being told you can move. Also put a timer on the health script for the giant bullet to explode at a certain time so you didn't have to sit and wait for it to slowly leave the screen after dodging it.

-The "here, have more life" dialogue is supposed to be directly under the lives but the scaling fucks it up on Itch in both window & fullscreen. The centered stuff was less of an issue, but could not get this in place.



-Also I think it's bad at communicating to people that they can move at the last second. It just says I'll help you move and players probably expect something to happen before than can move. I should put a timer ding sound effect maybe turn on a particle effect around the player at that moment to indicate they are now free to move and dodge the giant bullet.

-So because I put the stage transition on a timer, if you die and the game over screen pops up if you sit for a few seconds it'll still transition to the next scene. Whoops. I need to put an && gameOver != SetActive(true) in on that timer to avoid this.

-Also would like to do a scary music here that builds up to the moment the giant bullet is gonna hit.

-Oh, so I didn't have an easily available giant beam/bomb thing to drop and I couldn't use a planet because in the earlier stage planets were all killable and not impending doom scary enough, so I just super-larged a bullet. This is...ok, but not great. But even more so my explosion animation I created for it, while looking fine at smaller sizes looks pretty awful that big lol, would redo the explosion and maybe replace the giant pink bullet with something else.

Stage 3 - mid-stage


-I like this stage a lot. Originally I didn't have the boss in the background and it was just on generic space. The boss in the background does make it too busy, but I think it conveys a good insanity effect of fighting giant space tentacles while a giant cosmic being's twirly eyes are spinning around in the background. This might actually be my favorite stage in the final version. Even the bullet patterns are set up in a way that it's fun weaving in between waves to get shots in. Tentacles need about 2x the health though and maybe health bars if I'm giving health bars to stuff in stage 2 in a later version.

-Death animation for tentacles isn't terrible, but it looks a little less pixely than I'd like (mostly used spray instead of pencil to spray red blood as I shrunk down the tentacle)

Stage 3 - final boss

-Feels like a scene is missing. I think I did a good job on the boss consistency until this point. It's unknown, then  eyes, then you start to see the tentacles come down and sit in place for a stage, then the body/face comes down and sits for the previous fight...but now the boss pops in and it's room sized and you can move around it? I feel like I need a scene where the boss shrinks down or the player ship due to the magic friend gets bigger. I couldn't think of a scene I liked to do this (also haven't tried scaling things during game through scripts), but if I remade the game I'd add this scene in.

-The final boss needs a transition in, but what GreatSage suggested would probably cover this.

-I'm happy with the bullet patterns. They used to be a little tighter and harder to weave between, but even after dozens of times I'd still game over at times so I think this is a game middleground. I can no-hit weaving through the patterns at this point usually. I think if the boss had about 1.5x HP and if you only had 3 lives instead of 6 it would be a really well-balanced boss fight. As is, it's a bit easy but pretty fun and I'm happy that I made a fun boss with some challenge and reward.

-I also like that I got to make the CAVE style pink bullets I wanted. I took them off a non-pink asset I had from a sprite pack that was just a single frame still and I re-colored it by hand pixel by pixel into a shades of pink version and made a 4 frame spinning animation and they look pretty good in game! Also I got the SUPER SLOWDOWN I wanted at one point when instead of using circle collider on the bullets I use polygonal and it make the complex colliders with a ton of vertexes and then with all the bullets being fired on screen it brought the game down to a crawl :D Now I know if I want intentional slowdown just throw lots of vertexes on a 2d collider for bullets.

-Oh, and speaking of assets, the non-original sprites the game were the 2d planets, the 3d planet textures, the 2d asteroids in stage 2 and meteors and black holes in stage 3 part 1, the space background, stage 1 background and the stage 1 wall tiles and top area texture. I think all the rest is my own work, the flames came in an asset pack BUT I'm gonna take credit for them because they came as a 2-frame animation that looked so shit I had to use them with animation turned off so I spent some time and hand animated my own animation frames and now the flames look good so imma take credit for that one.

-Finally, if I did a remake, for this fight I'd change it so you'd dodge bullets for like 10 seconds then the bullet script would stop, then the boss would throw out a Zelda LTTP energy ball that you'd shoot back and the hit animation would be 1-2 tentacles die and are no longer on the boss so you know you're doing damage and making progress (no lifebar for the boss). Then 10 seconds of bullets with 1st tentacle shooter added on, then another energy ball fight, then repeat with 2nd tentacle shooter, etc... If I don't end up using the 3d planets in Stage 3 - first phase, I think it'd be fun if the energy balls were actually the boss throwing planets at you one planet at a time and you shoot them back into the boss and a tentacle explodes. Final one could be the sun and the boss burns up or something.

Final Boss death scene
-I hate it. It's fast and choppy and small and is lacking any sound effects. I'd really like to redo this proper but animating that boss was such a long endeavor because it's a big multi-part sprite with a lot of moving pieces, that smoothing it out would take a while and getting the right SFX too. If I did a remake for a public release I would 100% replace this scene with something more consistent looking.

-Also I think I did it wrong with making the animation in animator combining the eye guy and boss as one flat animation. Would have been better to have a gameobject of the flying eye boss that comes in then have some particle effects beam out from its eyes and then have a separate death animation that looks solid for the boss and the move the flying eye boss off screen. But this is all just a learning experience.

Ending credits:
-Actually this was the final scene I made last night. I was gonna make an additional song and my musician buddy was supposed to make me a short 60 second song, but he didn't get around to it and I was sick of the game and wanted it done so I just used stage 2 music which actually worked fine.

-Making the credit scene was a lot of fun. I like the idea of having the enemies pop in and be jolly as credits appear.

-Still has the text size mis-match between windowed and fullscreen. I mean this is a big fucking difference:






I think that's most of my thoughts on the process. Was fun! Learned a lot! Have some basic background now for my next game which unfortunately is a 2d platformer and I don't have a lot of interest or interesting ideas for a platformer as it's not one of my favorite genres. But as I take the class and learn what I can do (including learning how to appropriately do tilemaps) I'm sure ideas will pop into my head.

Also if I did do the remake of this one and added in the additional world 1 stages and world 2 stages while doing the few cleanups on world 3 I'd imagine the game length would go from like 5 mins -> 20-30 mins which would be a good size to release on Itch to the public.







« Last Edit: April 06, 2022, 10:48:40 PM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #160 on: April 07, 2022, 04:48:38 PM »
I've been buying like every one of these assets bundles since I started making my game. It's actually overwhelming because I have all these zip files with various sprites and music loops and sfx and tiles. I need to like organize them all into something so I can use them as placeholders or edit them to use in stuff.

https://www.humblebundle.com/software/grand-game-dev-toolbox-software

And like this one comes with a sprite lighting software which I didn't even think about for sprites. I think that's something to save for 10 games down the road to start learning normal maps and lighting and stuff.

One thing that hopefully I'll learn in this 2d platformer class is a lot of these world/town/dungeon tilesets are just like one PNG file with a bunch of blocks and I'm not sure what the correct way to use them is? When I made my walls in stage 1 of my game I just cut and pasted from MS Paint a square from the giant PNG and saved it as a new png and that's my texture. Is there a way you're supposed to auto-slice up these single image tilemap things to get a bunch of different usable tiles?

Also with music I think I'm gonna have to pony up the dough and move on from the free Bosca Ceoil to Abelton Live sooner or later. The biggest frustration I have with Bosca Ceoil for making music is that there is no way to export bars that you make. So if I'm working on a song and I come up with a clever little melody but it doesn't work in the current song, best I can do is screenshot it and try to recreate it each time in future songs to have on my selectable bar list for those songs.

Ideally I'd like a program where there is a single database of every bar I've ever created that continually grows and when I make songs I can just pull them into the song and see if they work for the current track. Apparently this kind of program is called Ableton Live or FL Studio. It's just kind of bogus for game development that these are so expensive when like Asesprite and a lot of other tools are like $20-30 affordable.

The other issue Bosca Ceoil has is there is no undo button which sucks when you're messing around with notes and you fuck up a note and can't remember where it was. You also can't copy & paste within a bar itself which isn't as big of deal.
« Last Edit: April 07, 2022, 04:54:12 PM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #161 on: April 07, 2022, 05:10:06 PM »
Actually this music bundle on humble I picked up for $25 includes Mixcraft which apparently is sorta comparable to the $400-$500 Abeltons/FL Studio type stuff (but probably not as good). Will try it on the weekend and maybe it'll be enough of what I need for now.

Uncle

  • Have You Ever
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #162 on: April 07, 2022, 08:35:04 PM »
I saw that and thought about posting it here!

honestly I pirated fruityloops 20 years ago and that version is probably still as usable as the day I stole it  :doge

a while back I loaded up an old backup hard drive and my virus scanner found an ancient virus buried in a zip of VST plugins that I'm sure I downloaded from kazaa  :lol
Uncle

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #163 on: April 07, 2022, 09:31:29 PM »
a while back I loaded up an old backup hard drive and my virus scanner found an ancient virus buried in a zip of VST plugins that I'm sure I downloaded from kazaa  :lol

 :lol

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #164 on: April 08, 2022, 01:22:48 AM »
I started on the next class and now that I actually have an idea of what things are in Unity, the initial overview for what topics the class covers was pretty good. It's starting with Tilemaps which is perfect for something I need to learn next, including animating tilemaps and tiles, and then goes into spritework which may cover what I already learned in the aesprite stuff, but then it goes to learning how to use the animator to make multiple animation states and transition between them which would be really helpful for me since for my first game every animation had to be the on-awake/idle animation for the object since I didn't know how to use the animator  :lol

I think they might've also mentioned something about particles. I wanna learn those so I can start my game with some particles surrounding the main character to practice those and I'll give him a lifebar to practice that too.

GreatSageEqualOfHeaven

  • Dumbass Monkey
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #165 on: April 08, 2022, 06:44:29 AM »
I think that's most of my thoughts on the process. Was fun! Learned a lot! Have some basic background now for my next game which unfortunately is a 2d platformer and I don't have a lot of interest or interesting ideas for a platformer as it's not one of my favorite genres. But as I take the class and learn what I can do (including learning how to appropriately do tilemaps) I'm sure ideas will pop into my head.

If they teach you a good kinematic side scrolling platformer character controller, that's a really solid base for a fucking ton of old skool game genres; turn the 'gravity' off and you got side scrolling beat em ups and even top down zelda style movement, keep the 'gravity' on, and you can do all kinds of gameplay mechanics ranging from pseudo point and click adventure through super meat boy platforming through cuphead style run and guns

One thing that hopefully I'll learn in this 2d platformer class is a lot of these world/town/dungeon tilesets are just like one PNG file with a bunch of blocks and I'm not sure what the correct way to use them is? When I made my walls in stage 1 of my game I just cut and pasted from MS Paint a square from the giant PNG and saved it as a new png and that's my texture. Is there a way you're supposed to auto-slice up these single image tilemap things to get a bunch of different usable tiles?

yea, in unity set it as 'multiple' on import - if you know the per-tile resolution you might wanna set that at the same time


then open up the sprite editor, and select out your individual sprites; if they've created a tileset to a specific format / size, you can just manually enter the numbers

this tileets 32x32 tiles with no padding, so nice and easy to import
e: actually, I think I dun fucked up and this is actually a 16x16 tileset - oh well, you get the gist

Load up the uhhhhh I think its called 2D tilemap package from unitys package manager, and you can then paint these in as solid blocks, or you can use something like Tiled to map build then import

I'll be honest, I don't think that Humble pack is that good for the price, but if you feel you need to asset-load, you do you :trumps

Ideally I'd like a program where there is a single database of every bar I've ever created that continually grows and when I make songs I can just pull them into the song and see if they work for the current track. Apparently this kind of program is called Ableton Live or FL Studio. It's just kind of bogus for game development that these are so expensive when like Asesprite and a lot of other tools are like $20-30 affordable.

If you can live with a little open source jank;
https://lmms.io/
« Last Edit: April 08, 2022, 06:57:00 AM by GreatSageEqualOfHeaven »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #166 on: April 08, 2022, 12:31:04 PM »
Oh shoot, I didn't think about slicing tile maps like that. I use slicing for the sprite sheets I make in aseprite but they are horizontal strips you slice by count. Didn't think about slicing a full image. Will be very useful I'm sure.

Yeah, I saw lmms recommended elsewhere. Will check that and Mixcraft out on the weekend. Would like to start my new project by making the title theme song, lead character sprite & animation and title screen first this weekend.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #167 on: April 08, 2022, 12:55:56 PM »
Also, in terms of these asset bundles I'm grabbing, I'm mostly getting them for SFX because searching for free SFX I can use legally is time-consuming and I haven't tried to make my own SFX with my phone recorder yet, so having a large list of stuff I can quickly browse through on my HDD to fit sounds is very, very helpful.

Also 2d background tilemaps too, because while I have fun making character/enemy/object sprites, making background tilemaps seems more like work than fun to me and they are generally generic enough that using some legal asset from a bundle isn't something that'll stick out to players whereas if your enemies look like they are from another game or generic asset pack it will.

Uncle

  • Have You Ever
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #168 on: April 08, 2022, 01:23:47 PM »
yeah it's fun to collect bundles and have piles of stuff to look through, but I was also thinking this current humble bundle isn't really top tier, they've had better ones

I prefer the ones that are all assets to throwing in some software or unity plugins with a really niche usage
Uncle

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #169 on: April 08, 2022, 02:39:55 PM »
Yeah, these software programs that need their own installers and keys and aren't on steam are stuff that's just gonna sit uninstalled unless I need a specific use for them.

Like I'll install Mixcraft to try it out, but like the Sprite Illuminator software is something I don't need to deal with yet. That Pixelmash software I looked up and it seems like it's an ok companion piece to Aesprite in that you can realtime transform bits like scaling the size through dragging, but reviews also say it's pretty buggy and crash prone and not great.

The Sprite Illimunator reviews are pretty decent, people say it's pretty comparable to Sprite Dlight for that kind of normal mapping stuff.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #170 on: April 08, 2022, 02:42:55 PM »
Also my favorite thing about this current bundle is it has a bit of Japanese assets. Like one of the SFX/VFX sets



How else you gonna find your vaccuum slash and aeolian slash sounds quickly?  :lol

tiesto

  • ルカルカ★ナイトフィーバー
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #171 on: April 08, 2022, 03:00:31 PM »
For someone who writes software using C#, VB.NET, and Javascript (accounting/business software), how easy is Unity to pick up and learn?
Any good tutorials to create a simple 16-bit style turn based RPG?

I'm feeling a bit of a creative streak and want to get out an RPG but not sure if I should go the RPG Maker or the Unity route. I feel Unity may be a bit more flexible, especially in the case of a battle system, but RPG Maker would enable me to get off the ground MUCH quicker (I made some RPG Maker 2000 game back in 2002 based on my college friends and it was the talk of my dorm for a good hot minute).
^_^

Tasty

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #172 on: April 08, 2022, 03:01:41 PM »
You should go the GB Studio route. :D



Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #173 on: April 08, 2022, 03:19:17 PM »
For someone who writes software using C#, VB.NET, and Javascript (accounting/business software), how easy is Unity to pick up and learn?
Any good tutorials to create a simple 16-bit style turn based RPG?

I'm feeling a bit of a creative streak and want to get out an RPG but not sure if I should go the RPG Maker or the Unity route. I feel Unity may be a bit more flexible, especially in the case of a battle system, but RPG Maker would enable me to get off the ground MUCH quicker (I made some RPG Maker 2000 game back in 2002 based on my college friends and it was the talk of my dorm for a good hot minute).

No idea. This is definitely a question I have for future genre.

I eventually wanna try making a 2d rpg and not sure if there's advantages in making it in Unity over something like Rpgmaker. Like I would imagine the advantages are being able to do more non-standard things through code scripting, but the disadvantages are probably more time/effort required for standardized things like making towns, world maps, turn based battles, items, equipment, etc...

Whereas if you're doing a 3d rpg or isometric 3d rpg like Infinity Engine stuff Unity would be better I would think.

I also want to make a tactics isometric FFT kind of game, not sure if Rpgmaker can do that stuff. I want to do like a modern setting SMT/FF15 tactic game with cars and stuff since I think Makai Kingdom is the only tactics game I can think of that's had vehicles.

Like another genre I want to take a crack at is Visual Novels and it really seems like a VN engine would make much more sense than making a VN in Unity since all you need for VNs is a way to display background, text and play music and maybe have some choice branching. Whereas doing it in Unity as scenes and text gameobjects for 1,000 lines of dialogue or something seems like it'd be tedious?


The genres I want to try to take a stab at are:

1. Shmup - stabbed

2. 2d platformer - next class project

3. 3d fps - I think this is a bad idea (I really enjoyed making levels for FPS as a kid and think I would still enjoy making levels/campaigns for FPS like Prodeus, but that's because doing that uses a strong core already of good FPS gameplay, making my own FPS gameplay is stupid because it will never be as good as Quake/Doom/Prodeus/Half-life/whatever and if I wanted to make an FPS it would be better to make a total conversion mod in one of those), but it's class project after

4. 3d Platformer - final class project, gonna be lolz but will be fun to learn to work with 3d in an open non-FPS space.

5. Rhythm/Music Game

6. Horror game

7. VN

8. 2d rpg

9. 3d rpg

10. Sports-ish game, like a mecha baseball game or something. I saw on the indiegame website I read someone made a bowling combat game and that seemed like a great concept.

11. Sim game like Game Dev story kind of stuff. I have a concept already for Video Game Reviewer Sim based on real stories I have from days as a game journalist, but I need a lot more game dev experience to do what I wanna do here.


Genre I never plan on attempting:

1. Fighting games - hahahahahahahaha, no, I love fighting games, but the FGC and high-level fighting game intricacy scares me.

2. Puzzle games - I am way too dumb to make good puzzles. At most I will put simple fun puzzles in my other games.

3. RTS games - I can't even win a starcraft map vs the ai

4. Strategy 4x games - Too brainy for me.

5. Racing games - Ehh, I like racing games (arcade & sim) a lot but I know jack shit about car physics so I don't think I'd attempt even a kart racer.

6. Flight games - Same thing.


Maybe genre:

1. MP games - Not an MP gamer but do enjoy a good MP game with friends here and there, if I ever had a good concept maybe I'd try.

2. Board/Card game - Probably not, don't have enough irl experience with them since I didn't play Magic growing up. But I do like Snk v Capcom Card Fighters, so idk maybe someday

3. VR - Would be fun since I like VR, but this would be years down the line when much more experienced to even attempt something without making you throw up.

« Last Edit: April 08, 2022, 03:23:47 PM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #174 on: April 08, 2022, 03:36:14 PM »
Oh and I want to do a PnC Adventure Game and it falls into the same question of 2d rpgs and VNs of whether it makes any sense to do a 2d PnC Adventure game in Unity vs just using Adventure Game Studio?

I messed around with AGS a bit like 10 years ago but never made anything with it. A lot of my favorite PnC Adventure games are all made in AGS though so it seems perfectly capable.


Also for 2d games in general like 2d rpgs or whatnot, I googled what some of the more well-known games were made in like Undertale or Hotline Miami and a lot were made in GameMaker Studio and googling a bit, there seems to be a pretty heated debate online as to whether there's any point in making 2d games in Unity vs making them in GMS2 or even RPGMaker. I'm coming across a lot of reddit thread posts of people saying Unity is kind of mediocre for 2d stuff and should mostly be used for 3d projects?

The good news is that all these threads I'm reading seem to say if you learn Unity and C#, you can learn GML and GMS in like a week and transfer over for 2d projects to there if you want.

The advantages people seem to say about GameMaker Studio vs Unity is that you can do stuff quicker, and it has a better interface, so you can get it running and prototype your game fast and see what works and that it's easier to match things up consistently because it uses pixels instead of units. Disadvantages is that GML is less versatile for larger projects. Also GMS isn't good for projects with multiple people working on it, whereas Unity is.
« Last Edit: April 08, 2022, 03:43:04 PM by Bebpo »

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #175 on: April 08, 2022, 04:05:58 PM »
This is interesting researching what indie games are using.

Apparently an alternative to the old golden days of Adventure Game Studio, is making an Adventure game in Unity using Adventure Creator which was made by an AGS heavy user that tried to bring AGS to Unity and improve on its functionality.

https://assetstore.unity.com/packages/tools/game-toolkits/adventure-creator-11896#reviews



Some impressive games in that trailer.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #176 on: April 08, 2022, 04:14:11 PM »
Going further, looking at the toolkits available for purchase on the Unity store that are 5 star reviewed with hundreds of reviews or won awards, it sure looks like there's some really helpful stuff for certain genre.

For 3d rpgs:
https://assetstore.unity.com/packages/tools/game-toolkits/rpg-builder-177657

I really like the idea of an engine that you can pay money to buy parts already made by other people and save you time. As an adult I have money more than I have time. So this stuff is right up my alley when I actually start working on bigger than intro prototype concepts.

I wonder if there's a good 2d rpg toolkit that makes Unity more similar to Rpgmaker. Will search around.

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #177 on: April 08, 2022, 04:34:20 PM »
https://assetstore.unity.com/packages/2d/environments/2d-isometric-tile-starter-pack-27944

Good start for FFT/TO Tactics maps

https://assetstore.unity.com/packages/templates/systems/corgi-engine-2d-2-5d-platformer-26617

Has good reviews for 2d platforming controls


But searching through the store it doesn't seem like there's any good tools for 2d rpgs. ORK Framework seems mostly 3d focused but can do 2d turn-based:

https://assetstore.unity.com/packages/tools/game-toolkits/rpg-editor-ork-framework-3-209685

Uncle

  • Have You Ever
  • Senior Member
Re: Do any of you code for your jobs?
« Reply #178 on: April 08, 2022, 05:58:27 PM »
I think modern RPG Makers like MV are capable of being contorted into doing anything you like in the realm of 2D, they are just intended for RPGs, but people have made all sorts of games using RPG Maker engines

it is really important to be able to "fail faster," get things up and running and working as a prototype, being able to refine it sooner, or learn early on whether it's just not working out as a concept



but it looks like the next upcoming RPG Maker is called Unite and is literally intended to run within Unity  :whoo
Uncle

Bebpo

  • Senior Member
Re: Do any of you code for your jobs?
« Reply #179 on: April 08, 2022, 07:06:50 PM »
but it looks like the next upcoming RPG Maker is called Unite and is literally intended to run within Unity  :whoo

Nice. Solves the issue then.

Also sounds similar to Adventure Creator where it's basically an implementation of AGS in Unity so you get best of both.


By the time I get around to trying to make a 2d jrpg this will probably be out and maybe will end up going with it.