Bay 12 Games Forum

Finally... => Creative Projects => Topic started by: delphonso on September 16, 2021, 12:41:34 am

Title: Can delphonso make a commercial game?
Post by: delphonso on September 16, 2021, 12:41:34 am
First project (https://delphonso.itch.io/capumon) is done! Capumon!

Second project (https://delphonso.itch.io/sewer-kings) is done! Sewer Kings!

Gamejam project (https://delphonso.itch.io/sleeper-wildjam-50) is done! Sleeper!

Come here (https://delphonso.itch.io/delph) to see whatever I'm working on now!
-=-=-=-=-=-

Nearly...three years ago, I posted in life advice talking about wanting to make games and where to "start" and how to make progress. I got some good advice and some useless advice, and I ignored all of it and did things my own way. Namely, wasted time  B)

Now, things are a bit better. In a cloud of depression, I worked through Harvard's CS50 course which did a lot to better lay out convention and how to think programmatically. It had the benefit of being 'easy' because I was familiar with all the actual code work, and instead focused on how to be a good programmer.

Oh hoh - by no means am I a good programmer now, but I'm on the path, maybe? Anyway, games.

I wanna make a game.

I have, technically. Several times, even more technically. There's the progress of the last year or so. But I want to make a game I'm proud of. Well, more proud of - and proud to show people and maybe people will enjoy that game and that's pretty nice.

So, how to make a game? Well, I've been working with Godot for a while and I really like it. It is also conveniently ported to Linux and runs well (except GLES3, but that's my own fault for having old and weak computers). So I'll be working in Godot to make the following two projects. For those who don't know, Godot has its own scripting language which is basically just Python. I haven't started on either project, beyond the pre-planning stages. Join me, friends, in making a game.

Project A:
2D, Pokemon-battler, proof of concept
I read about the original concept for Pokemon - it was called Kapusu-mon (Capsule Monsters) and was more about gachapon machines and getting lucky to find a "good" pokemon. I like this less dressed-up Skinner box. I also think about Pokemon combat and how it is...well, boring.

So the concept is the following:
'mon are gathered by putting money into a gachipon machine.
'mon have 3 attacks: Pure damage, damage w/ status effect, pure status effect.
'mon have an ability that effects the whole team, even when not in play (this is a card game thing)

Project goal:
Make a single room where the player can walk around and battle at least two enemy trainers.
Include 6 'mon with unique attacks and abilities.
Design this to be extensible. If it works for 6, it should work for 600.


Project B:
3D, magic system, stepping stone
Morrowind is my favorite game. Among the many things to love about it, the magic is what sticks with me. I want to make a game where you are some sort of battle mage in an arena, and participate in fights. Before the fight, you craft your spells by effectively slotting in qualities. I'm thinking something like the classic lightning bolt would be "line, shock" or fireball being "ballistic, fire, explosion". This one is much less thought out, but is something I really want to work on. I also think it is necessary to be in 3D, which is totally new to me.

Project goal:
Make a fixed-camera tavern and include a dialogue system.
Make a 3rd (or first? or both?) person arena battle scene.
Design 1 enemy fight, at least.
Have a menu with spellcrafting.
Design the magic system to be extensible.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 16, 2021, 05:02:09 am
I like the sound of both of them, but from the sound of it project A sounds like it'll be easier to do especially for your first time making a game.
Title: Re: Can delphonso make a game?
Post by: delphonso on September 16, 2021, 05:48:00 am
Yeah, both are intented projects. I'll work on both, probably in parallel, but the 2D thing should be easy to put together and shuffle off. Art is the slowest part, if the code is simple enough.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 17, 2021, 04:19:10 am
Are you intending to sell this once finished or will it be free?
Title: Re: Can delphonso make a game?
Post by: delphonso on September 17, 2021, 05:20:06 am
I think everything I make will be free. I have lofty dreams of a full game, and even then, probably free. Toady is a great example - I would just want people to play it and if it is good, they'll play it a lot and that's great.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 18, 2021, 04:01:57 am
I'm sure it'll be fun no matter how it turns out, also is it gonna be a PC or App game?
Title: Re: Can delphonso make a game?
Post by: delphonso on September 19, 2021, 07:49:43 am
PC presumably, Godot has some options for porting, but I've never touched android development.

I had set up a raspberry pi to run Godot and work on these projects, knowing that it would be a bit slow due to the weak CPU, but instead I'm getting some graphical trouble while running the "game". Might be an issue with XFCE, so I'm installing a different flavor of Manjaro now, we'll see what happens. Worst case scenario I'll switch back to my laptop.

That said, I worked a bit on Capumon tonight, I'll post a screenshot later - nothing visually interesting, just buttons linked to code. I'm working on the battle structure first, as I think that will be the most complex as far as code goes.

Edit:

Works on KDE Plasma, it seems.
So here's the basics of what I got done (really not much time to work on this so far.)

(https://i.postimg.cc/FY7H9r1T/charmander.png) (https://postimg.cc/FY7H9r1T)
It's beautiful.

So, what are you looking at? Obviously, not a finished product. In previous projects, I found myself spending hours making assets for stuff I didn't even really know how to get working, so this time, I'm trying to get it working before any art makes it in. It'd be boring to show you guys just buttons and code, so I added in a little spice.

Spoiler: Tall boy, code example (click to show/hide)

The code itself is pretty simple - these are all place-holders that I will work to replace. Anything in "quotations" needs to be a variable or taking from a singleton (basically a part of the game that has all the important bits like names, attacks, health, etc.) Anyway, the player chooses an attack by pressing a button, the button is process by an Attack function, which will also switch the turn to the other player (computer). Later, this will also need to handle animations. I would like to use this function for both the computer and the player - but as you see right now, it is hard coded to Agumon Charmander.


(https://i.postimg.cc/zy6Xvsg8/itstwerking.png) (https://postimg.cc/zy6Xvsg8)

Godot has a little terminal at the bottom, so I can see that there's no mistakes in this code so far - or at least, not terrible ones where the buttons are doing the wrong things. The text on the buttons can be modified by code - so the terminal text will match the button text when it starts pulling from whereever I put all that data.



It seems these screenshots are...tiny. Sorry about that - I have no idea why - maybe something with postimg? They look fine on the site, but when I put image tags around them, they get super small?
Title: Re: Can delphonso make a game?
Post by: delphonso on September 20, 2021, 02:09:55 am
Cleaning up the code to be more efficient and future-proofed.

(https://imgpile.com/images/NjhnoS.jpg)

I've begun commenting my code, which is something I need to remind myself to do - and also makes it clearer for the reader, hopefully.
Along with the 'mon's names, I also grab their sprites from the game's files. This is stored in a variable so that I can use it in the code and in the future, can just change it up here when I make new sprites and probably don't want them named "pika" and "char".

I then create a dictionary which is basically an array right now - but in the future, it'll contain damage types and amounts, presumably. I want to move this off to a singleton in the future, but for now, it's good.

After that, I put the sprites (not the images themselves, but the sprite object on the screen) in variables so I can modify them when you choose a new mon. I also get the buttons so that their descriptions can match the attack dictionary. Which you see happen in the ready() function.

I also set the sprites to have the images they should (and already) have. This is putting the same image on the same space, so not really doing anything of note. This will be useful when mons are changing.

(https://imgpile.com/images/Njh4xC.jpg)

The main body of the code gets narrowed down, thanks to the dictionary. The attack now grabs the active mon and finds the matching attack in the dictionary and prints it in a simple sentence - you can see that here:

(https://imgpile.com/images/Njh1Z8.jpg)

And just for fun, you can see that Fire Blast also has the code playerActiveSprite,texture = foeActPic to show how these can easily be swapped out. Notice that the left pikachu maintains the other stuff that I did to the sprite - such as flip horizontally.

(https://imgpile.com/images/Njdyno.jpg)


I moved to imgpile for image hosting, which seems to work better. This wasn't much work, again - just sort of doing what I already know and am confident in. Soon I'll start doing harder stuff like working with singletons.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 20, 2021, 03:04:31 am
Dang man your way further along than I thought you'd be, I figured you were still in the planning stages, so do you do this kind of thing for a job or something?
Title: Re: Can delphonso make a game?
Post by: delphonso on September 20, 2021, 05:23:55 am
I'm currently a kindergarten teacher, so the whole monster battling part is part of my day-to-day. But no, I only "finished" one game as part of a gamejam. I'd be interested in a career in coding, but for now it is a hobby and I hope to keep it that way for a while, as I'm enjoying this. Decided to spend a bit more time fleshing it out so here's a bit more:

(https://imgpile.com/images/NjYJta.jpg)

Let's give Pikachu some attacks. A quick and dirty dictionary should do the trick. Again, these are just words associated with numbers - Ideally I could set up some sort of XML file (or the bare code equivalent) so that it'd be easy to manually adjust or add these critters. Might work on that next.

(https://imgpile.com/images/NjYYZh.jpg)

I now pass who is attacking into the attack() function, under the name "aggressor". The attack function doesn't look good because I would also need to pass the attack dictionary, and I want to find a better way of sending both down there.

When the turn switches, the enemy chooses a number between 0 and 3(inclusive of 0 but exclusive of 3, don't ask me why because I don't know) and chooses an attack based on that. Extremely basic AI in a go!

(https://imgpile.com/images/NjYMnG.jpg)

With some very simple code, I detach the battle scene from the main scene - this means I can trigger the battle scene however I want - probably through dialogue. The battle scene is preloaded, and then called as an instance whenever I want it to. I just need to hide the rest of the scene with queue_free or the button is right in the middle of the fight still. Eventually, the "main" scene will have nothing visible, and just sort of be a theatre for the rest of the game to pass through. Right now, it has a button and the battle scene is connected to that button:

(https://imgpile.com/images/NjYsdE.jpg)


Pressing this button opens up the fight we've seen. And looking at the terminal, we can see the basics of a combat game coming together!


(https://imgpile.com/images/NjYPoX.jpg)
Title: Re: Can delphonso make a game?
Post by: delphonso on September 20, 2021, 09:59:30 pm
The long weekend is about to end, so I decided to get some progress done before probably taking a few days break.
I contacted a friend (who I worked on the gamejam game with) and asked them about singletons. A brief discussion later, and I had a good enough grasp to implement one.

First, I get a new empty script and call it "global", then tell Godot this is a singleton. A singleton, as my friend describes it, is a bit of code that is outside the rest of the game, but all parts of the game can contact. So, let's test it out by putting in a string and calling that somewhere else. Right now the singleton only has this: var exclaim = "oh baby!"
(https://imgpile.com/images/NjvCiu.jpg)

I change the turnswitch function to no longer say "Now it's the other guy's turn." instead it just calls exclaim from global (or, "oh baby!")

(https://imgpile.com/images/Njv9Ui.jpg)

And it works!

(https://imgpile.com/images/Njvxx4.jpg)


So let's do more with this.
First, I fill out the singleton with a dictionary. A dictionary operates with "keys". Previously the keys were just 0,1,2 - but now they're more specific. This allows me to get names from every mon without needing to write them more than once (just in the singleton). Also notice that every type of mon now has a unique descriptor "monDic001", for example. I'll end up tweaking these later, but I filled in some generic (maybe useful) features for later.

(https://imgpile.com/images/NjvtnM.jpg)

(https://imgpile.com/images/NjvDkk.jpg)

I'm not very happy with how the effects, statuses, and teameffects look/work. This will definitely need to be changed in the future. For now, it's just a placeholder. With the dictionaries done, I can replace them on the main battlescene.

Since the dictionary also has the character's names, I can pull those from the singleton as well, instead of explicitly putting it in the battlescene code. This still needs to be improved so that it reads the player's team and the enemy's team, rather than just choosing these two mons only. I also grab the attack names from the dictionaries. I realize now, I can also put their sprite art in the dictionaries, to make that easier in the future as well.

Now that attacks aren't keyed by a number, my random integer between 0 and 3 is useless. I add the attack keys to an array, then send that to the enemy's attack in turnswitch(). This array will be useful for confusion effects too, as long as all the dictionaries use the same keys.
Spoiler: battlescene code (click to show/hide)

The end result looks the same but is much better, programmatically.
(https://imgpile.com/images/Njvfir.jpg)
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 21, 2021, 03:49:58 am
This thing is already pretty cool looking, do you plan of having mod support or are you gonna keep everything hard coded?
Title: Re: Can delphonso make a game?
Post by: Quaksna on September 21, 2021, 06:08:32 am
Can delphonso make a game? He sure can, this looks very promising!
Title: Re: Can delphonso make a game?
Post by: delphonso on September 21, 2021, 06:32:56 am
This thing is already pretty cool looking, do you plan of having mod support or are you gonna keep everything hard coded?

This is an interesting question. I think this capumon thing is going to be just a proof of concept and I'll release the raw godot files with it, in case anyone is interested to snoop around. Mod-ability is tough, as it would take me learning more about how to export games with Godot (specifically exporting a game with a few "raw" files that can be edited [off the top of my head, a xml table where people can add their own 'mons]). I might actually look into this for this proof of concept - as it is something I really want to learn.

Making it modable to like...make areas/buildings....I have no clue how that would work - honestly. Probably a huge undertaking.

Can delphonso make a game? He sure can, this looks very promising!

Thanks, Quaksna - I'll be sure to add an axe-wielding frog into the types of mons, when I get to it.
Title: Re: Can delphonso make a game?
Post by: delphonso on September 22, 2021, 12:14:10 am
Here's a post-week recap, basically.

I look at my hands, covered in monster blood and chunks of code...
What have I done?

Work began on Capumon (working title, I guess). I opted to focus on code and mechanical structure instead of art and design. This seems to be paying off, as I can feel improvements in the game already, and it is helping me better conceptualize how the game should look.

The game now has a very basic combat tracker (just repeating which move you use) and primitive AI (enemies randomly choose from their available moves). Mons are stored in dictionaries which contain their list of attributes. I could make this smaller with an array, but it would also make it less friendly for other people to mess around with, so I'll leave them in dictionaries. The game pretty efficiently stores that data and calls it when needed in the combat scene.

Code:
The code, so far, I am very happy with. It is tidy and decently complex. It is also completely and thoroughly understood by me, which is nice (normally there's at least one thing that works and I don't really know why). I want to clean it up more before moving onto the next part. That would include adding the art asset path to the dictionary and making my variable names more standard.
actMon and foeActMon drive me up the fucking wall. I could also do the thing more explicitly where variables_like_this are one type, and variablesLikeThis are another. Not to mention variableslikethis...

The next steps in coding will be:
Swapping active mons,
More robust AI,
Implementing the basics of attack/health/damage etc.
Begin implementing statuses

After the battle scene is done, we can start to have a main character, movement, an environment to explore, and the gachamachine.

Design:
I think I have a pretty good idea how to implement everything. The hardest part will be adding modifiers to attacks (such as statuses or accuracy damage). This will take some doing, and also balance needs to be considered. I don't think this game is making any great leaps in gamedev - no earth shattering new mechanics, but that's alright. It's just a little project, after all.

Art?
Maybe someday?
Kids around here are all about Ultraman - whose monster designs I'm a big fan of, and Ultraman was also a big gachapon thing. I might try to chibi-up some of the monsters from Ultraman/Gamera/old Godzilla and see what I can create. Otherwise, I can always go more Pokemon-ey and draw a cat with leaves for ears. Or Digimon-ey and draw a cat with jean shorts and a glock.

Actually the last one sounds pretty good. For now, expect more shitty google-searched jpegs.

UI design will be a challenge. It is slow, hard work and also requires some study on my part to get it to work well in Godot. Another challenge!

-=-=-=-=-=-=-

There's an upcoming holiday - which means an extra day of work on the weekend, but then a week off. I'll also start up Spookyfort, then, so time on this project is likely to diminish, especially as what I'll be doing will be getting more and more difficult. Might get some time to work on it after work, but that's strongly determined by whether my daughter falls asleep easily or not.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 22, 2021, 02:51:51 am
I might try to chibi-up some of the monsters from Ultraman/Gamera/old Godzilla and see what I can create. Otherwise, I can always go more Pokemon-ey and draw a cat with leaves for ears. Or Digimon-ey and draw a cat with jean shorts and a glock.
Why not all three at the same time?

For now, expect more shitty google-searched jpegs.
Yay!
Title: Re: Can delphonso make a game?
Post by: delphonso on September 22, 2021, 06:57:59 am
Why not all three at the same time?

Spoiler: you did this. (click to show/hide)
Title: Re: Can delphonso make a game?
Post by: Quaksna on September 22, 2021, 07:48:55 am
Why not all three at the same time?

Spoiler: you did this. (click to show/hide)

You know, this actually really looks like something kids would be crazy for, go for it  :P
Title: Re: Can delphonso make a game?
Post by: Hwongfish on September 22, 2021, 09:54:11 am
Oh yeah!!! I remember you! 8) 8)
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 23, 2021, 01:37:31 am
Why not all three at the same time?

Spoiler: you did this. (click to show/hide)

You know, this actually really looks like something kids would be crazy for, go for it  :P
I'm pretty sure I've actually seen something like that in the toy aisle, also yay I've inspired an art!
Title: Re: Can delphonso make a game?
Post by: delphonso on September 23, 2021, 07:45:04 am
I decided to add the art path directly to the dictionary. This is actually thanks to one (newly appointed Queen) King Zultan who mentioned mods. I decided to go this route and to keep as much in the dictionary as possible so that it may be possible to mod this in the future. All I'll need to do is pull the data from a xml file or something instead of straight from the code - which is certainly possible, but completely out of my depths right now. The benefit being that a modder only needs to supply a sprite and a few words and their new mon can be in the game! Anywho

(https://imgpile.com/images/U4oelS.jpg)

Since this dictionary is now updated to include the mon's art path...

(https://imgpile.com/images/U4opXj.jpg)

Oh yeah, baby. That feels good.

You might also notice that "statuses[2]" thing. Well I decided to put the statuses in an array instead of as horrible variables on their own. Here's the status array now:

(https://imgpile.com/images/U4ojQ8.jpg)

This will need a bit of tweaking of course, and I'm still unsure about how to handle team effects... For now, I commented out what I had before just in case I decide to revert this decision. We'll see when I start implementing statuses.

(https://imgpile.com/images/U4oSpo.jpg)

I decided to clean up the battlescene code even more. There's always room to make it tighter. I had a realization at work yesterday:

By setting both of these to pass the dictionary, rather than the mon's name when calculating attack...

(https://imgpile.com/images/U4o3yL.jpg)
...
(https://imgpile.com/images/U4ovO1.jpg)

The attack function now smoothly works with either enemies or your own mons! Thanks to the keywords of the dictionary, this will work with any mon who attacks. It also prints the power that mon has - which we will use to calculate damage in the future. I can/will have to do more with this in the future, and the playerturn bool is going to be very important for allocating damage to the right mon. Anyway, the function is much cleaner and I also got to delete two unnecessary variables - which is great!

(https://imgpile.com/images/U4ogPP.jpg)

You'll notice a new function called statuscheck(). This is one of two new functions I added - both of which just print stuff, but will be filled out with you know...actual stuff that they do. Team effects will be checked at the beginning of the fight and only once, as it shouldn't change throughout the fight.

(https://imgpile.com/images/U4oabC.jpg)

Team effects are maybe the only "unique" thing about this game - though it is stolen straight from tabletop card games like MTG and Pokemon. Every 'mon is going to have a blanket bonus to the whole team. Right now these will be things like "double damage on crits" and "triple crit chance" or "higher damage from all allies" - this encourages deckbuilding (read: changing up the party) and also makes even shitty mons from a gacha maybe pretty useful.

Anyway, let's run the program and see if everything is working!

(https://imgpile.com/images/U4oEGx.jpg)
I love you charmander, you're my favorite yugioh card.

-=-=-=-=-

Oh yeah!!! I remember you! 8) 8)

Hope you enjoy reading along, Hwong.
Title: Re: Can delphonso make a game?
Post by: delphonso on September 24, 2021, 12:23:02 am
It's time...

(https://imgpile.com/images/Un1Uuc.jpg)
(https://imgpile.com/images/Un1IRr.jpg)

I set a few numbers in the singleton that will eventually be useful. Right now they're just there, and not used by anything. I'll need to do more research to work this out, but I want to store the number of mons in the singleton, call it in the battle scene, and also find out /which/ mons they are from the singleton. A bit complex for me, right now.

(https://imgpile.com/images/Un15AW.jpg)

If we're going to have more mons, we're going to need more space. Let's assume the player has 3 mons (which will be the current maximum party size). I add a couple buttons to the graphical display.

(https://imgpile.com/images/Un1ufR.jpg)

Unfortunately I don't have any automation for bringing the right mons to the fight, so I have to put them explicitly in the code. I do clean up the code a bit more from here on. You'll notice the images (myActPic and foeActMonPic, I think) are gone. Instead I just choose to directly load it from the dictionary path. Probably using more memory than necessary, but makes changing between them a bit easier.

(https://imgpile.com/images/Un1dVL.jpg)

We also grab the two new buttons, which will hold our party members!

(https://imgpile.com/images/Un17Bg.jpg)

In the ready() function - which triggers as soon as the scene starts - I cut out most of it and put in a new function called updatescene().
(https://imgpile.com/images/Un1wJN.jpg)

(https://imgpile.com/images/Un1hEx.jpg)

updatescene() looks pretty familiar. It's just making sure everyone is in the right place and that the moves have the right titles. The benched mons will have their name and their art visible (well...ideally). Now that the scene has everyone in the right place, let's work on moving them around.

(https://imgpile.com/images/Un14Vh.jpg)

The new function swaps the active and benched mon you selected. I probably over-engineered this a bit, because I think gdscript(python) can handle just swapping them. Some languages need you to have a third intermediary to hold the data while swapping. This function isn't great because it is explicitly for the player only. We'll see if I need to change this when we work on enemy AI, which might be next. Swapping takes a turn, so the enemy gets a free move if you change mons.

(https://imgpile.com/images/Un1RjP.jpg)


Spoiler: It's time to duel! (click to show/hide)
Title: Re: Can delphonso make a game?
Post by: Quaksna on September 24, 2021, 02:12:23 am
Pocketsand sounds exactly like the move Zultan would have  :P
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 24, 2021, 04:50:05 am
Shh, don't give away my secret move.

Also it's pretty cool that I'm in a game, hopefully I won't get murdered super fast.
Title: Re: Can delphonso make a game?
Post by: delphonso on September 24, 2021, 11:18:44 pm
Shh, don't give away my secret move.

Well anyway this update is almost entirely about pocketsand.

-=-=-=-

Look, I know what you're thinking, "delphonso, why are you using a dictionary when all you're doing is putting singular info in. You should clearly just be using an array. All the stuff about modding is also totally false and could be done with arrays." I get it. I know you're all thinking that all the time, and trust me - so was I.

(https://imgpile.com/images/UnA8sM.jpg)

Until I shoved an array in that bad boy.
These arrays are more similar to Pokemon attacks. They contain the name, then the damage, then a status indicator, and finally accuracy. Hopefully that's enough for a simple battling game. This comes with the downside of making it more difficult to make mons - because you need to specify each move directly and explicitly. Perhaps a better way to do this would be to store all the moves somewhere as arrays, and bring them over by name.

This did present a challenge, and get ready for some technobabble while I explain it. Previously the moves were only a key and name: "attHi" : "Flamethrower" now, however, the moves are arrays: "attHi" : ["Flamethrower", 50, 0, 95]
For the naming of the buttons, I simply used the key "attHi" to get the string "Flamethrower". However, now that key leads to an array. The button doesn't know what to do with all the brackets, numbers and commas, so it throws an error. So how to grab the first position in an array with the key? Googling this was a fucking nightmare, and it wasn't until I talked through it with a friend that I figured it out. In GDScript (basically, Python), dictionaries can be called by their keys in two ways:
You can call by string - so mondictionary["attHi"] will give you whatever is at the key.
Or you can call by attribute (technical term...I forget) - it looks like this: mondictionary.attHi

This second form is necessary to work with arrays, because the code doesn't know what you mean by mondictionary["attHi"[somenumber]], but it does understand mondictionary.attHi[somenumber]. What I'm doing there is taking the 0th position from the array. Arrays are counted in the way that nerds count - starting at 0. So the array's 0th position is the attack's name like "Flamethrower"! Easy peasy!

(https://imgpile.com/images/UnAzwk.jpg)

The new attack function is once again a mess. I set the whole attack array into a variable because "type" contains a key that is a string, so the second method earlier discussed won't work. We'll also need to pull a lot of info from the array to check miss chance, etc in the future. Right now, I check if the move has a status effect (as in, is not 0 in the status position), and print a short sentence about it.

(https://imgpile.com/images/UnAVW4.jpg)

The enemy now has slight variation on their attacks - if they have a status effect, they prioritize doing damage.

(https://imgpile.com/images/UnAH12.jpg)

And here's the final product - still not great, but making progress. I'd like to start working on...you know really making the game instead of just printing stuff. That'll need health, mons getting knocked out, and so on.

(https://imgpile.com/images/UnAoKG.jpg)
Title: Re: Can delphonso make a game?
Post by: Laterigrade on September 25, 2021, 12:47:23 am
this is super cool, delphonso
you just get more and more cool in my eyes, dude; starting smallhands, which was a super good idea, being a kindergarten teacher, and now this
keep on keeping on!
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 25, 2021, 04:23:59 am
Truly a man of many talents!
Title: Re: Can delphonso make a game?
Post by: delphonso on September 25, 2021, 04:58:24 am
My talents include:
-having a job
-playing a video game
-making monsters with jean shorts and pistols.
Title: Re: Can delphonso make a game?
Post by: Quaksna on September 25, 2021, 06:42:46 am
My talents include:
-having a job
-playing a video game
-making monsters with jean shorts and pistols.

You have no idea how much would I like to have any of those  :P You're a man of great power, and your pocket sand simulator will shake the very foundations of the universe, you'll see.

Or just make the kids happy. That's probably more of a sensible goal anyway I guess
Title: Re: Can delphonso make a game?
Post by: DwarfUli on September 25, 2021, 06:44:20 pm

I *love* Ultraman, reminds me of going to Kaiju Big Battels in NYC 20 years ago. Your game looks cool, keep at it. If you are a kindergarten teacher you must have the patience of a 1000 Buddhas and programming should be up your alley  :D
Title: Re: Can delphonso make a game?
Post by: delphonso on September 25, 2021, 07:31:39 pm
The pal I did a gamejam with and who I keep turning to for advice once said something like "DF is very similar to coding. You're setting up self-contained systems (i.e., a cloth industry) and continually look for places to make efficiencies sharper. Those little systems all turn into something much bigger - your entire fort. That's basically what coding is too, little systems and a greater structure."

I'm not surprised there are a good few coders on the forums - I think there is a similar mentality between coding and making a complex fortress. I get a similar rush as well. When I implemented dictionaries and cleaned up the attack function - it was like creating a mist generator in a fort. Very similar rewarding feeling.

Busy next couple of days - I may bring the little computer to work to futz around with the code during lunch break, though.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 26, 2021, 05:07:48 am
Busy next couple of days - I may bring the little computer to work to futz around with the code during lunch break, though.
For some reason when i read this I pictured you carrying a tinny desktop computer in your pocket, then you in a corner of a lunch room hunched over staring at this tiny computer.
Title: Re: Can delphonso make a game?
Post by: delphonso on September 27, 2021, 12:10:52 am
For some reason when i read this I pictured you carrying a tinny desktop computer in your pocket, then you in a corner of a lunch room hunched over staring at this tiny computer.

You're not half wrong.

(https://imgpile.com/images/UIVmwc.jpg)

In order to make progress on the attack function - I need the game to be a bit more complex. Let's add some HP and the ability to miss.

(https://imgpile.com/images/UIVfvg.jpg)

This is how you add a new key and data to a dictionary. "hp" is the mons' maximum HP, so it will be set to current in the ready function - ie, whenever a battle starts. The copy of the dictionary we use will not effect the global dictionary (because we're not telling it to, yet) - so every battle every mon will be back to full-health.

And oh...what's that?
(https://imgpile.com/images/UIVczR.jpg)
Is that yet another argument for the attack function? You bet, bud. Now, we pass a target for the attack. This once again generalizes the attack function so it can be used by both the player and the enemy without unnecessary if statements.

And shit...while I'm at it. Just...do that. [check footnote below]

(https://imgpile.com/images/UIVV1P.jpg)

Okay, now we have a status counter - recall 0 is already "no status" by our convention.
Alright...so now we have that, let's get rid of the foestatus bool and just check if it is higher than 0.

(https://imgpile.com/images/UIVz0W.jpg)

And now we're ready for a better attack function. I removed some of the prints because it was getting hard to read. Now we learn the target's health every turn, and the damage from the attack is subtracted if they hit. If it's a miss, nothing happens. Hits just roll a d100 (remember randi()%100 is 0-99, so we add 1 to make it 1-100) and compare it to the move's accuracy. Statuses are now also much cleaner.

(https://imgpile.com/images/UIVrsN.jpg)

So let's see the whole combat thing in action.

(https://imgpile.com/images/UIXdMP.jpg)

We start with Charmonder and switch to Quaxe, who takes a hit immediately.
Quaxe misses and Major Chongus goes in for the kill. Of course, there is no fail condition, so the match continues.

Oh God, Quaxe. What are you doing?

(https://imgpile.com/images/UIXbIW.jpg)

Please! Please! He's already dead!

(https://imgpile.com/images/UIXhA1.jpg)


[footnote:]
I don't know why I decided to do it this way. I'll just add a status to the global dictionary and subtract from HP - there is no reason to do this terrible manual input so many times. Since we have a copy of the global dictionary, it won't effect the real one unless we want it to.


BIG EDIT:

I realized that posting about this is actually teaching me very good habits about coding and incremental movement. I decided to just try and go for it with statuses. I wrote two new functions and expanded the attack function considerably - I was half in a rush because lunch break was almost over, and didn't stop to double check my work. In the end, the functions "work", but somewhere along the line the two mons end up sharing health (honestly still no idea how this happens) and always have the same amount.

This is entirely because I tried to do a bunch of steps and didn't pause to test any of them - now I have no clue where my mistake was, and trying to read over it to find it is much slower than avoiding the mistake in the first place. I honestly might just scrap all of it and start the status thing over - as a lesson for myself.

EDIT, THE LESSER:

I managed to revert the changes and get back to where this update ended. I also added an additional conditional - if a mon has a status effect already, they won't get a new one.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 27, 2021, 04:35:45 am
What kind of computer is that, it's so small it seems like it couldn't hold all the parts.

Please! Please! He's already dead!

(https://imgpile.com/images/UIXhA1.jpg)
There's something incredibly beautiful about this.
Title: Re: Can delphonso make a game?
Post by: Quaksna on September 27, 2021, 06:49:08 am
Getting intense DF mod testing vibes from this, the last post was awesome  :D Yeah it's fun getting these ridiculous scenarios, while perhaps undesirable, can't say they ain't a pleasant reward after work!

Also Zultan, this incredibly beautiful face was with us since dawn of time! Don't remember the exact origins, but it must've been present in the ancient frog comics...

I should probably update my avatar shouldn't I  :P
Title: Re: Can delphonso make a game?
Post by: NJW2000 on September 27, 2021, 06:49:42 am
PTW. This is an interesting read.
Title: Re: Can delphonso make a game?
Post by: delphonso on September 27, 2021, 07:58:10 am
What kind of computer is that, it's so small it seems like it couldn't hold all the parts.

Raspberry Pi 4. I was surprised to see Godot could run on it on Manjaro and is relatively up to date. Excellent place to work, as it only has that and a gamecube emulator on it - so there's not much distraction. I use a second Raspberry Pi as my work computer in the school - which has the benefit of being able to be unplugged and carried home in a pocket/backpack. Since their OS is just a microSD - I can switch between them with only that, too - which is cool, but also nerve-wracking since they're pretty easy to drop or lose...

Getting intense DF mod testing vibes from this.
Then you're gonna love this update...

I should probably update my avatar shouldn't I  :P
I'm pretty sure Zultan and I have never changed avatars. Join the club ;D

PTW. This is an interesting read.
Thanks, glad you're enjoying it!

-=-=-=-=-=-
I had a bit of time and rather than lie in bed and watch youtube, I decided to play my favorite game Capumon! But oh shoot. This isn't really a game. I mean - there's no win state or lose state. With no stakes...I mean - what's the point?

So let's add a win/lose state.

Here's the remade attack function - it is just about the same. A d100 is rolled and compared to your attacks accuracy. A miss is a miss and a hit is a hit. The only difference is that a move with a status effect checks if the enemy already has a status effect. If so, only the damage of the move applies.
(https://imgpile.com/images/Uun2kC.jpg)

We now add in a checker if the target's hp is 0.
(https://imgpile.com/images/UunoNj.jpg)
If it is the player's turn, we get a message that we won, and combat is completed by a new function. If, however, the enemy has multiple mons, they switch to their next mon. For testing, I set foemon to 1 and only battled Major Chongus. Everything looks right, so let's get to the fail state.

(https://imgpile.com/images/UunqYo.jpg)
It is a very similar function, but again is decided by the playerturn being false. I'm not sure how I want to handle switching player mons just yet. It would be easy enough to just hide all the attack buttons, and then bring them back if the player's mon still has health. Otherwise I might rotate them and force the 2nd position mon onto the field (for simplicity and also strategy).

Our new function simply kills the battlescene, and should bring us back to the main screen (that big button that says "it's time to duel!")
(https://imgpile.com/images/UunFrw.jpg)
This will be where we put whatever we want to carry over. So like - winning money, or retaining mon's health. That sort of thing.

Feeling cocky - let's get into combat. But let's make it a real fight. I set foemons to 2 and give them a copy of the strongest mon: Nezultan.


Spoiler: Round 2 (click to show/hide)

Spoiler: Round 3 (click to show/hide)

Title: Re: Can delphonso make a game?
Post by: spinnylights on September 27, 2021, 09:24:14 am
The world can always use more monster-battling games!! It's always seemed a little strange to me that the idea hasn't gotten that much exercise even though it has some very popular representatives—aside from Pokémon I also think of the Megami Tensei series as well as Quintet's old game Robotrek (maybe that one's not so popular but whatever :P). Anyway I feel like it can make for a much more fun combat system than one with a few party members that level in a linear fashion or w/e. I've never tried designing a system like that myself, though—it seems kind of challenging to balance once it gets large (maybe that's why these sorts of games aren't done so widely? or maybe not). I suppose you'll find out some interesting information about this if you keep going!

Reading over your posts I had the urge to give a bit of coding advice…feel free to take it or leave it, it's all kind of "rule of thumb"-type stuff. I wrote it all in a sort of weird trance like some sort of fixed action pattern a squirrel would follow or something…if nothing else maybe it's fun in a sort of "animal TV" kind of way.

Morrowind is my favorite game. Among the many things to love about it, the magic is what sticks with me.

I love it too, especially alchemy—there's nothing like quaffing 50 speed potions or w/e and leaping wildly over the hills and dales of Vvardenfell like a glider on a pogo stick. Sometimes I daydream about a fantasy setting where wizards act like player character magic users in Morrowind; a shopkeep recounts a sad tale where they gave their entire inventory away for free to someone they fell in love with at first sight only to realize a moment after they'd left that they were just supernaturally charismatic temporarily, everyone flees when they see someone in expensive robes running down towards them in a straight diagonal line from high in the clouds, etc.

(https://imgpile.com/images/UIXdMP.jpg)

(https://imgpile.com/images/UIXhA1.jpg)

Awww he's so good I love him!! I guess he's from the days of yore somehow? He's really cutely murderous.

What kind of computer is that, it's so small it seems like it couldn't hold all the parts.

Raspberry Pi 4. I was surprised to see Godot could run on it on Manjaro and is relatively up to date.

Really cool!! The case is super-stylish too. I didn't know a Raspberry Pi was so viable as a workstation.
Title: Re: Can delphonso make a game?
Post by: delphonso on September 27, 2021, 09:10:10 pm
The world can always use more monster-battling games!!

I played a lot of Harobots on the Wonderswan - which was somewhere between digimon and pokemon in the core concepts. Definitely recommended - it was probably fan translated by now.
As for design of this - I'm trying to bring in more TCG elements (such as the Pokemon card game) which isn't particularly unique with how very popular deckbuilders have been lately.

Thanks for the tech advice. I'll read through it as much as I understand - and check the documentation if there's anything I find particularly useful.

Really cool!! The case is super-stylish too. I didn't know a Raspberry Pi was so viable as a workstation.

You sacrifice GLES3 to get the lack of distractions, and easy of moving it around. I doubt there will be a noticeable difference using the weaker engine in a small, 2D game such as  this. When I start working in 3D, I may need to find another solution. Unfortunately the GLES3 engine also frequently crashes my laptop - but this may just be an issue with the particular Ubuntu distro I have. Either way - I do recommend a Raspberry Pi as a workstation. The Libreoffice suite is enough to do most jobs.
Title: Re: Can delphonso make a game?
Post by: King Zultan on September 28, 2021, 04:15:32 am
I should probably update my avatar shouldn't I  :P
I'm pretty sure Zultan and I have never changed avatars. Join the club ;D
It did change once when tinypic died, but then found a new host and was back to being the rat king. I probably won't ever change it as it took forever to figure out what I wanted to use in the first place.


the strongest mon: Nezultan.
As it should be.
Title: Re: Can delphonso make a game?
Post by: spinnylights on October 01, 2021, 07:30:53 am
The world can always use more monster-battling games!!

I played a lot of Harobots on the Wonderswan - which was somewhere between digimon and pokemon in the core concepts. Definitely recommended - it was probably fan translated by now.

Awww it sounds fun! I can probably read the Japanese well enough to make it through I think—I'm playing Rune Worth for the MSX2 off-and-on in my free time right now and enjoying that quite a bit so far, and if anything I've been rather taken with the writing in particular with its cute moments of floridness etc. I wish I could read faster though ;^^ maybe someday…I recently managed to follow a poem by Yosano Akiko and that was really thrilling for me and encouraging. Anyway anyway

As for design of this - I'm trying to bring in more TCG elements (such as the Pokemon card game) which isn't particularly unique with how very popular deckbuilders have been lately.

Oh interesting! I haven't actually played many games like that, although I did play the Pokémon card game a little when I was a kid. That seems like it could be really fun though.

Really cool!! The case is super-stylish too. I didn't know a Raspberry Pi was so viable as a workstation.

You sacrifice GLES3 to get the lack of distractions, and easy of moving it around. I doubt there will be a noticeable difference using the weaker engine in a small, 2D game such as  this. When I start working in 3D, I may need to find another solution. Unfortunately the GLES3 engine also frequently crashes my laptop - but this may just be an issue with the particular Ubuntu distro I have. Either way - I do recommend a Raspberry Pi as a workstation. The Libreoffice suite is enough to do most jobs.

Ah interesting. The GPU can be made to do OpenGL ES 3.2 apparently (https://www.raspberrypi.org/blog/vc4-and-v3d-opengl-drivers-for-raspberry-pi-an-update/) but the driver docs don't make mention of GLES3 support (https://docs.mesa3d.org/drivers/vc4.html#opengl-support) so maybe it's still immature. There's hope! You could always try a rolling-release distro like Arch or Gentoo in another partition if you wanted to see if the super-recent drivers work better.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 02, 2021, 06:08:02 am
Feeling a bit uninspired about Spookyfort, so I took a break with my favorite game that doesn't work: Capumon.

I promptly forgot the lesson from last time and instituted a large function for statuses that didn't work - again. Frustrated, I took a walk with my daughter and then came back and actually did the thing.

The most recent broken thing was when the enemy switched mons. I massaged it to now explicitly work with only 2 enemy mons - not great, but it'll do. I may need a custom function for enemy switching, as this is function still only works for the player, and then does a shit job with a single else conditional.

(https://imgpile.com/images/U5i2Wb.jpg)

Next I began a daisy chain of functions. By chaining these functions together, it's much easier for me to figure out where they're going wrong. So here's how an attack goes:

(https://imgpile.com/images/U5iL13.jpg)

Which leads to a status check:

(https://imgpile.com/images/U5iOKl.jpg)

Which checks if the combat is over:

(https://imgpile.com/images/U5iVzo.jpg)

Which then switches turns. Unless combat is over - then it just kills the scene.

Not pictured is me moving the HP check from the attack function to the statuscheck function - that way it can check if combat ends on status effect damage, too.

This all works, now - and the game is playable in so far as combat works except one big issue.

God Damn Zultan.

(https://imgpile.com/images/U5iX3C.jpg)

Mon003 is Nezultan. I was under the impression that when I called from a singleton into a variable, it would make a copy. That is not the case. To prove it, I added this to the combat end function:

(https://imgpile.com/images/U5iqs8.jpg)

And finally, I switched to Nezultan and spammed Triple Fang. You can see that the dictionary for Nezultan has -80 hp and status 4. The global dictionary (that's monDic003) also has the same.

(https://imgpile.com/images/U5ik2w.jpg)

This means that the enemy Nezultan will always have the same health as our Nezultan! And mirror matches are a must! We gotta fix it!
This is, I believe, an easy fix - there are commands in godot to specifically not do this, but it illustrates well one of spinnylights' warnings - that singletons are real easy to fuck yourself up with.

Anyway, I'll fix that all up next and then finish off statuses to maybe call combat "working enough".
I'm eager to start working on other parts of this - such as handling different trainer types or something along those lines. Or heck - maybe a main character?
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 03, 2021, 01:35:55 am
God Damn Zultan.
I didn't do it I swear!


So what do you think your gonna make the main character look like?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 03, 2021, 02:23:05 am
When I started this I was planning to go 2d, with a generic gameboy/pokemon-esque vibe, but there is really no reason to beside "I already know how to do that". Rather than try to appeal to nostalgia, I want to try something different.

I've been considering to just make a small 3D space and make the main character only first person. This will be a bit of a challenge, but should be feasable'.

The combat will likely remain 2d, and kind of static, but I'd like some visual elements to be shared between 3d real world and 2d battle scene. We'll see. I hope to start working on that soon.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 03, 2021, 08:28:42 am
Oh boy... So some good news and some bad news. Let's do the good news first.

(https://imgpile.com/images/URDWpN.jpg)

By hiding the attack buttons when a mon is knocked out - I can force the player to switch mons. This is good and feels more like a real game.

Then, I make the buttons re-appear every time the scene is updated (i.e., when you select a new mon!)

(https://imgpile.com/images/URDFTW.jpg)

Since it is the simple hide and show, technically the show here is useless - but it is just like the active mon picture reload - a convenience on my part at the cost of some inefficiency.

(https://imgpile.com/images/URD0Xc.jpg)

Mons also now have a chance to recover every round.

And finally, I added a enemy-specific switch function. It works well enough - and I added an additional mon to the enemy team - the bloody and violent Quaxe.

(https://imgpile.com/images/URDkDg.jpg)

In additional good news - I implemented all statuses. The code is quite long and messy, so I'll show it next time, as it will certainly get cut up because of the bad news...

The bad news.

THE BAD NEWS.

Spoiler: the bad news (click to show/hide)

I only pressed two attacks and this happened. This is really bad. Somewhere in my daisy-chain of functions, things are getting called multiple times. I ironed out /some/ of this, but it still occasionally happens and PART of the problem is this:

(https://imgpile.com/images/URDLyR.jpg)

This motherfucker doesn't work.
I was under the impression that /this/ is the way to pull data from a singleton(global) and store it in a variable separately. (So our Nezultan and the foe Nezultan don't share the same health)

I'm mistaken. I guess it's time to read up more on singletons...
Title: Re: Can delphonso make a game?
Post by: delphonso on October 03, 2021, 11:07:41 pm
I'm the smartest person on earth.

(https://imgpile.com/images/URle1S.jpg)

A friend suggested this was an issue with references. When assigning a variable, such as this dictionary - you're not making a copy of the dictionary in that variable. You're putting the directions to the dictionary in that variable. They suggested declaring the type of variable first, then assigning the dictionary. So I set them all as dictionaries onready, then added the global.dictionary in the ready() function.

This did not work (it might work, if I explicitly set the variable to be dictionaries instead of implicitly doing it like I did with var blahblah = {}.) Anyway - I did some reading on dictionaries (instead of singletons) and found a dictionary-only method. The glorious "duplicate()". I couldn't ask for anything more perfect for this. That said, I'd still like to understand singletons better, anyway. Also this duplicate function seems to suggest this is not how singletons are supposed to be used.

That's right. I'm sort of a coding bad-boy  8)

(https://imgpile.com/images/URl63x.jpg)

I put those back up at the top as a reminder to automate them more when I have more than 1 enemy type.

Hmm...

(https://imgpile.com/images/URl3zL.jpg)

This...shouldn't be here.

(https://imgpile.com/images/URlSso.jpg)

Because it's already here. I need to actually dig through this code and make sure there aren't a lot of leftovers like this (of which, there are probably many.) Okay, with that sorted, combat should be...better! Let's test it out!

(https://imgpile.com/images/URly2b.jpg)

Spoiler: Serious Capumon Combat (click to show/hide)

Anyway, we're in good shape, overall! Some clean up and bug squashing and I can call it "done enough" and work on something else!
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 04, 2021, 02:25:10 am
What are you gonna be doing when you finish fixing stuff?
Title: Re: Can delphonso make a game?
Post by: Starver on October 04, 2021, 03:50:39 am
I had set up a raspberry pi to run Godot and work on these projects, knowing that it would be a bit slow due to the weak CPU,
...very late to this thread (interesting, though, and I've skimmed the progress beyond the above post, but will now reread and track with more interest), but on the above snippet: If you design upon a computer that is more powerful than the Milliard Gargantubrain at Maximegalon then you might be making something a little too exclusive. I'm not saying a Pi is an ideal basis to start with, but where it is underpowered (though not undercapable) it might refine you into developing something that works well enough on it and most other platforms you could port it to, be not going for the 'lazy' "Oh, I've got a terrabyte of RAM and Petaflops of processor and who cares if the code needs to reside across three whole Google serverfarms... because it looks so good!" approach.


You could get bogged down in detail on how to optimise sometving, but then you can get bogged down in adding more cruft and unnecessary greebling if you're actually unrestrained in your ambitions by awkward calculation-lags or rendering delays. So treat this (even beyond the Pi) as an opportunity, not a problem.

(Not that I'm brilliant at getting the balance right. I still tend to work with what I happen to have in front of me when the first splash of inspiration comes through, when a proper project plan would get me on the right bit of kit from the start, rather than reluctantly change environment/codebase and redo what I'm doing when I find I'm long overdue a change of platform. ;) )

That said, carry on carrying on: consider this a PTW with a rather long opinionated ramble incidentally attached that is probably no help to you at this point!
Title: Re: Can delphonso make a game?
Post by: delphonso on October 04, 2021, 05:53:09 am
What are you gonna be doing when you finish fixing stuff?

I think the world-scene should arrive next. Visually, that'll be more interesting for you, programmatically more challenging for me, and helpful when considering what else will be necessary (such as art)

Snip

Glad to have you, Starver - verbose as always  ;D

I generally agree, as you might imagine, as the owner of an exceptionally weak laptop. The issue being - Manjaro XFCE on the Pi was running slow enough as to have input lag in the editor. Obviously, that's not going to fly. However Manjaro KDE Plasma works great.

I've made mention a few times about the lack of efficiency I'm putting in. As the project is small, it is unlikely to ever matter, but I do like to point it out as a reminder to myself - memory is a precious resource, which not everyone has a lot of.

I'll see if I can put the terminal printing somewhere on the battle screen, if so, I can pack this and let you guys play it, too!
Title: Re: Can delphonso make a game?
Post by: eerr on October 04, 2021, 10:36:07 am
What did you learn about singletons?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 04, 2021, 07:51:16 pm
Here's a link  (https://delphonso.itch.io/capumon)to a playable (that word is really stretching it) version of the game! Enjoy!

(you can play in browser, or download it. I also threw the godot files there for anyone interested in perusing the code.)


What did you learn about singletons?

That I need to learn more about them.  ;)

Singletons in godot are basically nodes which are present in every scene.
The primary usage of them is for things that change but persist between scenes - such as all of a character's information (health, gold, what have you).
They also work well as a scene-transition manager.

Mostly, the things I want to do require using classes, which I need to learn a bit more about before implementing them. That may not happen in capumon, but should in wizardy prototype.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 05, 2021, 01:03:16 am
I'll put together a new 3D scene and change the dueling button from instantly starting the battlescene to instead...go to the gameshop!

(https://imgpile.com/images/UREYCb.jpg)

And now the gameshop scene is made:

(https://imgpile.com/images/URExIo.jpg)

Welcome to the Matrix.

I haven't talked much about the world editor as I think it's a bit hard to convey all the information that it portrays. I toss a few objects in the world - a plane mesh that is the floor, a cube to give some relative space, and a tall cylinder that'll be our player.

It looks like this

(https://imgpile.com/images/UREJe8.jpg)

And the node editor contains all the objects - looking like this:

(https://imgpile.com/images/UREM2S.jpg)

All the 3D objects require some tweaking - mostly the player, which is rotated (the capsule shape is naturally laying down) and also stretched a bit. I add a collision body directly underneath it, and put the mesh (the visible part) and the collision (invisible wireframe) into a Kinematic Body node. A Kinematic Body has some built-in functions we can use, but we'll get to that later. The floor and cube have no collision - they're just there visually. There is no gravity active.

So, to the code. I watched a single tutorial on 3D games - it was long but quite good. By Tutemic on Youtube. The following code is roughly taken straight from there, but tweaked slightly.

(https://imgpile.com/images/UREDcx.jpg)

First, we grab the mouse - as you would in any FPS. Then we wait for any input. If the input is a mouse moving, then we rotate in accordance with the mouse.
The look angle is clamped on the X axis (which rotates to look up and down). This merely stops the player from doing constant backflips. I know. I patched out the best part.
The rotation is multiplied by 0.3 as sensitivity adjustment. Without that, the camera moves at a sickening fast speed.

Now, we can look around, but as the mouse is captured, it's impossible to close the window (without tabbing out or something).
I - from memory - try to add to the function the option to release the mouse.

(https://imgpile.com/images/UREGWj.jpg)

This um...doesn't work as intended.

(https://imgpile.com/images/UREi83.jpg)

Well - it sort of does! It throws an error which freezes the game and frees the mouse. Hey - that sounds like it works to me. It also has the feature of working with any key! Not just m! Wow!

Anyway, we can look around in 3D!

(https://imgpile.com/images/UREKMC.jpg)

(https://imgpile.com/images/UREs6l.jpg)
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 05, 2021, 01:52:53 am
The game seems to be taking shape faster than I thought it would, what are you planning on making the game shop look like?
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 05, 2021, 02:15:53 am
Everybody gangsta till delphonso makes it so Quaxe can helmsplit in 3D

For real tho, seconding Zultan 'ere, dis is some fast yet steady progress.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 05, 2021, 03:28:58 am
I'm on vacation, lads. Also I don't have friends.

The gameshop will be anywhere between a perfectly cubical blue space to a lovingly detailed recreating of the card and game shop I went to as a kid. I haven't ever made 3d assets before. So we'll see...

Combat will remain 2D, as I know I can make all the assets for it in less than a few hours.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 05, 2021, 11:23:48 pm
Bonus: Little warm up (https://www.beepbox.co/player/#song=8n31s5k4l00e0ft1qm0a7g0fj07i0r1o3210T1v1L4ud5q3d2f8y1z1C0c2A1FeBfV1Q021ePf34fE0261T1v1L4ub0q1d2f7y3z1C0c0A0F0B9V9Q0000Pe850E0141T1v1L4u90q1d4f7y3z1C0c2A9F3B5V8Q5428P9975E0019T4v1L4uf0q1z6666ji8k8k3jSBKSJJAArriiiiii07JCABrzrrrrrrr00YrkqHrsrrrrjr005zrAqzrjzrrqr1jRjrqGGrrzsrsA099ijrABJJJIAzrrtirqrqjqixzsrAjrqjiqaqqysttAJqjikikrizrHtBJJAzArzrIsRCITKSS099ijrAJS____Qg99habbCAYrDzh00b4x8i4x8i4x804i8h8z4zhh4h4x8i4x8i004y8y8y8y8p24bFEYa1wb8aW2GGGGGG8Uqz9At5tdd97njjj0kR4o5dBV0hQIQvtU9wqCohQOX5tvubrrnkb1iaq_3GFwqrnqfnnXfpaFILNZWPoLl2YPhiaPh-PO1mpu95O1qhqieMzKHL5Naswmj5Apa35JwUm35HuR_jE_yXbZeNtmMX5dvMCn25wiCEld7RACbwtlALEldHYFH-qXkQvdh7jAwkQpF7mptdpuCL4rHapg2QmCGEzw6pg1eDNtjpEM01d6kbPc102QyQ2QSl00) in making music, as I haven't for a while - hoping to nail down an aesthetic for the game, art and sound. This...will not be the aesthetic.

So, let's make the character move around in 3D space. Should be pretty easy. First, lets consider what we need.

This is a small scene - no need to jump or even move up and down at all.
There will only be one room - so no need to transition between scenes (only to the battle scene and then to return)
Let's fix that mouse-locking thing while we're at it. Also, might as well enable battling through some button.

First, we go to the _physics_process(delta) function. The physics process is constantly running (it counts ticks in delta, but we won't need the use it [delta is useful for gravity, as you want stuff to move downwards every tick in the physics engine]).

(https://imgpile.com/images/UbR1vh.jpg)

We grab two vector3s. A Vector3 is a set of coordinates and a velocity, I believe. Now, this could be done with 1 Vector, but I found using two makes it a lot simpler for the programmer, though may be more work for the computer.  We designate them to be "zero", which is the same as (0, 0, 0) on the x, y, and z axis. I only designate an x and z vector. It is entirely possible that I could have used a Vector2 (only x and y) for this, but I don't really know how and don't want to find out.

(https://imgpile.com/images/Ub5eo2.jpg)

This looks a bit odd, but it's rather simple, as the game engine makes handling movements rather easy.

Whenever Input (which is anything from a microphone to a mouse to a keyboard) is the ui_up button, we move forward. ui_up is a predetermined control set by Godot. We can change it, and will change this to be WASD controls. ui_up is the up arrow. When up is pressed, we grab the transformation that has happened to the player (the entire player rotates to follow the camera, so it is pointing forward.) We set that as the basis of our z value and send it to the Vector. That number, I believe, is a pure 1 or 0. We do the same for x and then add them together, giving us a new vector somewhere between (1, 0, 1) and (-1, 0, -1), as Y is never changed. That's good enough for movement!

(https://imgpile.com/images/Ub5ax4.jpg)

Quite simply, you just tell godot to move with that info and it does. Super easy. The move_and_slide means we won't stop if we hit an object, we'll just slide off of it as much as possible. We also normalized() the vector so that we don't do the morrowind thing where if you run at a 45 degree angle, you move at twice the speed (again, taking out the best parts...). The character moves pretty slow, so I multiply the speed by a new variable - speed.

(https://imgpile.com/images/UbRnrX.jpg)

Just for fun I set this to 400 the first time and when I tapped forward, I instant transmissioned so far away I couldn't see the cube any more.
I included a signal called battle. Signals are useful for communicating to parent nodes. Player is a node in the gameshop scene, so to communicate directly with the gameshop scene, we send a signal up the ladder.
The gameshop scene looks like this:

(https://imgpile.com/images/UbR4da.jpg)

Which is what the main scene looked like before.

(https://imgpile.com/images/Ub5jZG.jpg)

We emit that signal by pressing enter, for now. We also can press escape to free the mouse.

I added the ability to free the mouse and kill the player "free" the player when the battle scene opens because if I don't...

(https://imgpile.com/images/Ub5ZnM.jpg)

Things get silly.

(https://imgpile.com/images/Ub5Eiu.jpg)

Speaking of silly, this is an issue I have. My screenshot tool is in the taskbar - which means I end up looking at the floor when I go to try to get a screenshot... I set a new hotkey to open it up so I don't get this issue.

And here's a tour of the game shop!

(https://imgpile.com/images/Ub5vgF.jpg)
(https://imgpile.com/images/Ub56Ui.jpg)
(https://imgpile.com/images/Ub5grw.jpg)


I added collision to the cube to show that it is handled entirely by move_and_slide. Nifty and easy!

(https://imgpile.com/images/Ub5pkk.jpg)






Title: Re: Can delphonso make a game?
Post by: delphonso on October 06, 2021, 03:31:34 am
I felt very motivated by my progress lately, so I decided to do the part that is less fun - clean up code.
Not a lot to report. I renamed a variable or two. Deleted some unnecessary code, or moved it around. Cleaned up some comments, too.

Commiting to this dictionary structure, I added a rarity key to it as well, which we will use for the gacha machine. My current plan is to roll a die with some modification to give a higher weight to higher numbers. Rarity 1 mons will be rare, less than 15% to get that category, and rarity 5 mons will be really common, around 40% chance to get one of that category. Haven't worked out the math yet, so we'll see.

(https://imgpile.com/images/UbY6VL.jpg)

As the game currently goes, the 3D scene is only walking around and then pressing Enter. After that, you have one combat and it ends on a gray screen. I tied the battlescene back to the gameshop. This should work, right?

(https://imgpile.com/images/UbYSRj.jpg)

It works perfectly for the first combat! Let's go again! And again! And again!

Hmm...

(https://imgpile.com/images/UbY3D1.jpg)

Well that's not right.

-=-=-=-=-=-=-

Is there such a thing as weekly reports? Not really, but this is a natural breaking point for me because I'm about to go back to work.

Quaxe looks on with murder in its eyes:
What have I done?

(https://imgpile.com/images/UIXhA1.jpg)
Combat system - working and complete enough.

So this last stint was a lot of rookie mistakes and over-eager coding. I learned a lot about better practices and problem solving. I also noticed how easily I got discouraged. If I weren't posting about this, I would have given up by now - I bet.
I'm glad I got it working. It also taught me to at least occasionally back up my code. I should honestly write something in python to automate it, as I don't have stuff like github to do it for me (unreliable through the great wall)

I'm still shocked I was able to spit out a simple demo (https://delphonso.itch.io/capumon). Within such a short period. I have put a lot of theoretical knowledge down to code, I think if I took on a new game jam, I could do quite well within a short time limit.

Combat still needs the main gimmick: team effects. This'll be tough, I think, because it will require a restructure of the attack function...again.

I also want to move the trainer parties to an array of mons instead of just shuffling them between 3 variables each.

(https://imgpile.com/images/UIXhA1.jpg)
3D game-world - working and ready to extend.

We see the benefit of Godot where I can make a 3D space and movement in that space in like...15 minutes. I'm looking forward to putting together the actual area. However...

(https://imgpile.com/images/UIXhA1.jpg)
Art assets and music - terrifying to commit to.

I'm not excited about making assets. I don't really know what I want the game to look like, still. Also I have no idea how to make 3D assets. Blender, I guess? Well...Time to learn.

I'll probably whip up some monster designs and sprites. I think that'll be easy and maybe I can extrapolate an art design direction from that.

-=-=-=-=-=-=-=-

Join us in the void
(https://imgpile.com/images/UbYQAW.jpg)
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 06, 2021, 03:54:38 am
I'll probably whip up some monster designs and sprites. I think that'll be easy and maybe I can extrapolate an art design direction from that.
But what about the beautiful creature art you have right now, or that gamera with the jorts and a handgun?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 06, 2021, 09:26:14 am
New aesthetic found:

Spoiler (click to show/hide)
Title: Re: Can delphonso make a game?
Post by: delphonso on October 06, 2021, 08:47:32 pm
So, for a bit now I've been thinking about this sort of...virtual space neon vibe. It's hard to put into words, but I did a shitty quick drawing in the intended style. Far more Digimon than pokemon, but surely its own thing. I have no idea how it would translate to 3D - and would require shaders to make it happen, which is something I'm not practiced in at all. We'll see.

(https://imgpile.com/images/Ubyith.jpg)

Brief music interlude - trying to capture the same sense. (https://www.beepbox.co/player/#song=8n31s5k4l00e03t1Am0a7g0fj07i0r1o3210T1v0L4ua9q1d3fay0z1C0c2A0F0B2V8Q2010Pf770E0211T1v1L4ue9q3d7f5y1zaC0c0A4F0BaV5Q0500Pf5a0E0bc1T3v1L4uaeq1d2f8y2z9C0Sp99f9c9Vppbaa9gT3v1L4uf6q1d5f7y2z6C1SLXtHrrsksrzrrrrb0h400000000h4g000000014h0000000001400000000p21CFBOEmMmAzAV4FjhZ6aCnKAzL8QR_eQ0FJvBCRZeASLZ10aps8m15H5yiUldHWaqfYOZ25E5JAa05du19B4ie0Fd6gK8WGyeIFIE8M0)

Finally I added walls to the gameshop and we can see how badly textures are needed. Meshes in Godot need .res/.tres for texturing. I'm still lost on this, so I'll download some free assets and see what I can get to work to see if I understand the whole thing. Progress effectively on hold as I learn more and get back to work.

(https://imgpile.com/images/UbyY4X.jpg)
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 08, 2021, 12:39:49 am
(I could have sworn I posted this here yesterday but apparently not as I've had to recreate it and post it again.)

New aesthetic found:

Spoiler (click to show/hide)
That certainly is a direction you could take the art...


So, for a bit now I've been thinking about this sort of...virtual space neon vibe.
Like Tron or something?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 08, 2021, 12:53:32 am
Like Tron, yeah. Specifically copping the style of this music video (https://m.youtube.com/watch?v=f--QTXpb0QI). If I can figure out the jumbled letters too, I'd do that.

I've been on a big...retrofuturist kick lately, and something about that style matches see-through N64 controllers and lines on CRTs.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 08, 2021, 02:54:23 am
Which era are you aiming for with your retrofuturistic style?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 08, 2021, 04:00:12 am
I've always been very fond of "vector" graphics - such as the arcade game Tempest. That vector has taken on another meaning, but the black backgrounds and sharp white lights really resonates with me.

As it is merely a preference, and doesn't really have anything to do with fighting monsters...it may not stick around for long. I still need to figure out what to do with the 3D space, as I think trying to implement a Tron aesthetic is...far more than I am willing to commit to this project. We might just end up with free assets all around and a few hand-drawn sprites for the mons. Potentially not ever neon-ized.

As it stands, Krita does not work on Manjaro on the Raspberry Pi. Likewise, Blender is limited to version 2.7 (from 2019...) Blender is the more important of the two, as I can learn how to use Inkscape for 2D art. The outdated version of Blender will be more trouble than its worth to make a small 3D space. Free assets are plentiful and nice - just not custom made for you. Perhaps I can learn enough to edit other people's free assets, though - which might be enough for Project B.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 08, 2021, 04:31:52 am
Free assets are the best kind.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 09, 2021, 01:23:29 am
So, today, the skies opened up and dumped gallons upon gallons of water on the city. Classes were cancelled because there was a lot of flooding on the roads. Classes for teachers...were somehow not cancelled. I prepare pretty far in advanced for my classes, so after tying up some loose ends, I've had half a work day dedicated to this project, and honestly might update again later today.

A bit embarrassed about working with 3D assets when I'm supposed to be working, I worked entirely on code - which no one will ask me about because it's just visual white noise.

Behold: Combat basically complete.

(https://imgpile.com/images/Uh5iYi.jpg)

In the global singleton, I add a player and enemy array - this will need to be touched by other things later (like who you are talking to, and whatever I figure out for "deckbuilding")
You'll notice a few new mons - I added an additional 4, bringing us up to 8 total. Likely the final number.

(https://imgpile.com/images/Uh5DGS.jpg)

We bring these in at the beginning of the round. I believe duplicate() would also work here, which might be necessary depending on how the menu goes.

(https://imgpile.com/images/Uh5YNF.jpg)

Then grab the size of the array and store it in some variables that previously were specifically set. I spent an hour trying to just adjust the size of the array (with remove, resize, erase, etc...) and couldn't get anything to work in a way I liked and that didn't throw up issues/actual crashes.

The worst part of this is that the enemy STILL has a set order of enemies (always going 1, 2 and 3). This infuriates me, but at a certain point, it's not worth the effort. Abandoning it for now might make it click somewhere in my mind later. I do want to get it to work, because currently ko'ed mons continue to contribute their team effects.

(https://imgpile.com/images/Uh5Mml.jpg)

Well anyway. Let's look at the attack function.
There's a little left-over mess from me trying to use arrays more and dictionaries less. But, overall, we have a lot of new variables.

(https://imgpile.com/images/Uh5f4k.jpg)

Because I implemented team effects. And boy, did I implement them poorly! But who cares! It works!

(https://imgpile.com/images/Uh5C4C.jpg)

And this calls from the lengthened list of team effects which is stored in the singleton, but also in the mon dics.

(https://imgpile.com/images/Uh5GH8.jpg)

Oh, and finally, to avoid the horrible bug where the battlescene would persist into the 3D world despite specifically destroying itself, now the game just counts down from 2 and then closes.

(https://imgpile.com/images/Uh5tSb.jpg)

So let's see combat!

(https://imgpile.com/images/Uh5hOo.jpg)

Most text has been moved to the in-window text box. Clearly...it's not easy to read and gets big bricks on info pretty regularly. I'll clean this up.

(https://imgpile.com/images/Uh5Jgw.jpg)

(https://imgpile.com/images/Uh5Kb3.jpg)

The team effects all pop up and some messages about status, damage, and crits is visible. Not very clear, but functional enough, I think.


Although we won, it threw this in the terminal right at the end. This means the enemy is trying to change again when it should admit defeat and be done. I'll squash this pretty quick, I think.
(https://imgpile.com/images/Uh5sku.jpg)
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 09, 2021, 02:15:51 am
A cactus appears!

I also like how you have the monster being defeated, like you killed it instead of the pokemon way of them fainting.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 09, 2021, 04:26:33 am
Cactus is a curse - guarantees a hit, but stops all crits. Absolute nerf.

I think if your mon dies, it still says "monname is fucking dead".

As there are a lot of medieval assets for free, but the battlescene will likely be made by me – we might end up with a futuristic gachapon being dropped into a medieval tavern.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 10, 2021, 02:52:49 am
Now all I can imagine is medieval peasants having a drunken fight where they start throwing Pokemon at each other.
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 10, 2021, 05:04:19 am
Now all I can imagine is medieval peasants having a drunken fight where they start throwing Pokemon at each other.

Reminds me of Snorri's Sturlusson's Edda, u know, the collection of various Norse myths, as well as some ancient Norse ballads, it all really gave the impression of a bunch of vikings getting drunk and talking shit, it's a ride I can tell you.

With Pokemon tossing would've been even better.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 11, 2021, 12:38:15 am
Now all I can imagine is medieval peasants having a drunken fight where they start throwing Pokemon at each other.

This is all I want out of that damn franchise.

Reminds me of Snorri's Sturlusson's Edda, u know, the collection of various Norse myths, as well as some ancient Norse ballads, it all really gave the impression of a bunch of vikings getting drunk and talking shit, it's a ride I can tell you.

With Pokemon tossing would've been even better.

Why not both? "I swear I keep hearing a man's voice, but what stands in front of me is a child! A welp!" *lights entire tavern on fire with a charmonder*

-=-=-=-=-=-=-

Oh, kindergarten lunch-breaks... You're outrageously long, but honestly the driving force behind this entire project.

(https://imgpile.com/images/U9WvCb.jpg)

I made the enemy trainers switch mons randomly, using a child's logic: they literally flip a coin and go with that one. Only if both have some amount of health. I will, whenever I update the enemy trainer's battle-logic, also include an option for them to change mons rather than always attack.

Because, it is now very beneficial to keep a mon alive and out of the fight:

(https://imgpile.com/images/U9WWIo.jpg)

KOed mons no longer contribute their team-effects when KOed. Simple logic there.

Over in the player-controls, we've added a bit of complexity.

(https://imgpile.com/images/U9WF2S.jpg)

Pressing E starts combat, but it also passes an argument: trainer. This is set when you get close to the only threat in the room: the cube. I made a team for the cube, and it passes that team up the chain to the gameshop. Then, the gameshop starts combat against the trainer - who overwrites the now blank "enemyteam":

(https://imgpile.com/images/U9WOcx.jpg)
(I accidentally deleted the line: get_parent().add_child(battlescene). This caused much confusion as I tried to figure out where I went wrong...)

And since the enemy team is Null (just completely blank, not even a dictionary) until you're by the cube, this was added to the battlescene:

(https://imgpile.com/images/U9WL5L.jpg)

Upon writing this I realize it would be better to just check if the team is null in the gameshop - before combat is even initiated.


-=-=-=-=-
You wake up in a pale blue room - no ceiling or doors are visible. Ahead of you, you see a cube.

(https://imgpile.com/images/U9WXeN.jpg)

>> Examine cube.
>> Walk toward the cube.

You fumble as you walk, your controls seem to have been fucked by moving the player position in the 3D scene your limbs feel unfamiliar. You approach the cube and examine it. It is a meter on all sides, perfectly blank and without features.

(https://imgpile.com/images/U9Wq8P.jpg)

>> Touch the cube.
>> Lick the cube.

As you lean down to lick the cube, you rest your hand on its smooth surfaces. It quivers then attacks!

(https://imgpile.com/images/U9W66l.jpg)

>> Panic!
>> Begin crying
>> Show no mercy

You immediately begin sweating and crying. The cube does not respond. You shit your pants, but realize that there is only one way out of this featureless room - you will need to kill the cube to climb out of the room.

(https://imgpile.com/images/U9WkWj.jpg)
(I found a highlight tool in my screenshotter - very nice. You can see team effects only applying for the living members of the team.)

Pretty good progress overall, I think. Two major additions are still needed before I can call this whole thing "done as done will be" - a menu for managing mons, and the 3D space with a gachapon machine. Combat, however, is mechanically complete.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 11, 2021, 04:33:42 am
One day soon all the children will be obsessing over this game!
Title: Re: Can delphonso make a game?
Post by: delphonso on October 12, 2021, 12:52:06 am
Quick end-ties to get the game playable again. I'll try to pack it up and upload it in a bit so anyone can play, if they want.

(https://imgpile.com/images/UCHJXx.jpg)

As of now, the game effectively just crashes when you win or lose - it's not a crash, but it returns to main, which is a blank scene, and therefore blocks any interaction with the game. The above is effectively taken straight from Godot's documentation to implement a scene manager in the global singleton. The deferred load (don't worry, I fixed the typo now) merely means that the engine waits until everything is finished on that scene before freeing it - this helps prevent crashes or other issues (such as ending the scene before it updates the singleton).

I didn't take an screenshots, but previously I had moved the player to point the camera toward the cube (original just facing a wall) - I did something wrong and only rotated part of the player, which meant the way I did controls (checking the "transform" of the camera) wasn't working correctly, and was off by 135 degrees. Fixed now.

(https://imgpile.com/images/UCHGJW.jpg)

Consider the Cube - a puddingstone-bound codex:

The cube is perfect. It has a slightly larger cube surrounding it. When you approach the cube, the game passes the trainer info up the chain (to be added onto a dialogue system later).

(https://imgpile.com/images/UCHMDL.jpg)

Previously I passed this back up to the gameshop, but there's no reason to, really. Instead, it's handled when you press "E"

(https://imgpile.com/images/UCHxy1.jpg)
(I actually set inv to be a few buttons. I think it is currently E and I, but may also include the spacebar.)
(I also made an edit to this - the game needs the path to the scene change - res://battlescene.tscn is correct - this would throw an error otherwise)

blankteam is 100% blank, so if enemyteam is "filled" with blankteam, it'll be considered "false" by the engine. So if global.enemyteam is just checking if there is ANYTHING inside enemyteam. trainer is called at the beginning of this script - it is also blank, so the only way that global.enemyteam will return true, is if you're near a cube.

How to improve upon the cube?

(https://imgpile.com/images/UCHtLP.jpg)

Ah. Perfection.

I played around with Labels - which unfortunately, being 2D, are always just on top of the screen - which could be useful for a HUD - how much gold/health you have, etc.
Sprite3D, however, let's you drop a 2D sprite into 3D space. I put the cactus there just for testing. I also set it to "billboard" which does the old Doom thing where the sprite always faces you. You can also just leave it and it'll align to the grid and stay there.

(https://imgpile.com/images/UCHD7N.jpg)

I add a little code that makes the sprite only appear when within combat range. The cube has adopted an aggressive posture!

Huh? What's this?
(https://imgpile.com/images/UCHPEj.jpg)
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 12, 2021, 02:51:26 am
A second cube has appeared, how curious.

I add a little code that makes the sprite only appear when within combat range. The cube has adopted an aggressive posture!
It should make that sound the guards in MGS make when they see you.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 12, 2021, 07:57:44 am
New playable version available to play in your browser!

HERE (https://delphonso.itch.io/capumon)


(I forgot to re-copy the teams every combat, so...well just reload the page after you win, because your damage will roll over. I'll fix this in like 10 minutes.
Okay actually this is defying all logic. No clue how this has come up again, despite using duplicate - it really shouldn't. I literally already fixed this bug. How is this happening?)
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 12, 2021, 08:51:44 am
New playable version available to play in your browser!

HERE (https://delphonso.itch.io/capumon)


(I forgot to re-copy the teams every combat, so...well just reload the page after you win, because your damage will roll over. I'll fix this in like 10 minutes.
Okay actually this is defying all logic. No clue how this has come up again, despite using duplicate - it really shouldn't. I literally already fixed this bug. How is this happening?)

IT'S REAL?!!!
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 13, 2021, 02:37:43 am
I am filled with SADNESS as I can't get it to work on my computer!
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 02:51:58 am
Really? Even in web format?
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 13, 2021, 02:57:24 am
For me it worked fine. Got wrecked by a cactus but still, gets you to appreciate the thing even more, when you can get your hands on it.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 13, 2021, 03:03:42 am
Might be because I haven't updated my Firefox in quite awhile because newer versions are awful.

Or it might be because my computer is 32bit, I have no idea why it doesn't like me.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 03:20:01 am
Try another browser, otherwise, later today I can upload a 32bit windows version for download.

Actually hang on
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 03:28:06 am
A 32bit version is available for download. I realized I had uploaded the project folder, so I was able to import it on my other computer and recompile it. Let me know if it doesn't work - I can't test it myself. You'll need the .pck and .exe in the same folder.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 13, 2021, 03:44:42 am
Internet explore didn't even try to load it.

I was able to download it and it worked so I guess I'll just do that from now on, also is the room supposed to be all black?
But after feeling around for a bit I was able to find the cube and start a fight, the pictures appearing above them helped with this.


I was also killed by the cactus.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 04:04:10 am
Cactus need nerf confirmed.

Hmm...The all black is not intended... Quaksa did you have that happen? Godot has a host of export settings that I do not understand, so it.could be some toggle that needs toggling.
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 13, 2021, 04:10:27 am
Cactus need nerf confirmed.

Hmm...The all black is not intended... Quaksa did you have that happen? Godot has a host of export settings that I do not understand, so it.could be some toggle that needs toggling.

I played it on web and it ran fine, everything looked exactly like you were posting 'ere.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 13, 2021, 04:22:04 am
Dang seems like the game doesn't like me very much.

Hopefully I'm not being to much of a pain in the ass with all my problems.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 04:31:05 am
No worries. I'll ask some other devs if they had similar issues. Capumon is just a little thing, but if I made something I really cared deeply about, I'd want it to be widely accessible.
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 13, 2021, 04:50:08 am
Nezultan uses pocket sands on his crap browsers and a cactus, 2021, colorized

(https://i.imgur.com/ixS1OFU.jpg?1)
Title: Re: Can delphonso make a game?
Post by: Starver on October 13, 2021, 05:03:40 am
(Visiting the link, it says it isn't designed for my device - Android, with very latest FF/Chr browser versions - but <something something> collection to run elsewhere, or try anyway (which I didn't, but will when I have time). Paraphrasing badly, from my visit a couple of hours ago. I'm away from all Windowses for the moment, even trusty-old 32bit, so was not in a rush.)


All-black sounds like completely null texturing being applied[1], which means it isn't even finding "that subtle shade of blue" and applying it. Though as I'm not entirely sure how Godot does this, I'm going by my use (and abuse) of renderers such as Blender, which I think was mentioned and may therefore be a library component. Either that or a completely invalid viewport upon the scene (like the undefined main screen). The reasons for either could be complex or just the failure to download one single package of resource data. Knowing more about what does/does not render (even outside the workshop scene) would be my next question, probably.

Was going to have a look myself, but haven't yet (as per introductory paragraph) and I'm just guessing about how 'scenes' are handled and swapped in/out, so not sure I'm saying anything useful. But when has that ever stopped me before?  :P


[1] Can't produce meaningful specular shading/etc, because any such transform of RGB(0,0,0) still produces RGB(0,0,0). Though if that 'sun' I see in the screenshot is defined as a spotlight-entity, you'd expect to see that (as baseline RGB(255,255,255) in direct/diffuse view) even against a #000 sky.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 06:01:14 am
Nezultan uses pocket sands on his crap browsers and a cactus, 2021, colorized

History will never forget.

@Starver, I'd guess so too, as the pictures showed up (an explicitly included resource). The sun is merely an editor object, though I am considering adding a lightsource myself and asking Zultan to test that. Will likely be a non-issue since everything SHOULD be textured.
Title: Re: Can delphonso make a game?
Post by: mightymushroom on October 13, 2021, 07:25:57 am
-- I tried the web version (via MS Edge) and had difficulty moving in the room: I could only figure out how to change position by heading sideways with left and right arrow keys, sliding along the walls and eventually get close enough to a cube for the cactus to appear. No forward or backward for me. Missing keybinds? Missing instructions for dense people?

-- I recommend more colors for the lobby objects (walls, floor, cubes) so that they differentiate a little better.

-- In a similar vein, the combat log scrolls instantaneously, making it hard to read and follow the action. Not helped by the fact that it seems more lines appear per button press than fit in the display area. Perhaps there should be a distinctive marker in the log (e.g: "**Round 1 begins! GO!!**) to help orient the eyes.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 07:32:24 am
Were you using WASD or only arrow keys (I believe I bound both)?

Yeah, the log sucks. It is rich text so I can add a lot, such as bolding and colors. Definitely want that for technical info like the team effects, and emphasis on crits/deaths. There will also be at least a half second delay between steps, I think.
Title: Re: Can delphonso make a game?
Post by: mightymushroom on October 13, 2021, 07:44:13 am
Okay, somehow in all my trying things I forgot about WASD. :-[ Loaded again and that works.
However neither arrow keys nor numpad were letting me move except sideways.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 13, 2021, 09:00:03 pm
Okay, somehow in all my trying things I forgot about WASD. :-[ Loaded again and that works.
However neither arrow keys nor numpad were letting me move except sideways.

Ah, I know why. Without even looking at the code last night I remembered when I put in controls, I used key detection - and left and right arrows correctly read as "left arrow" "right arrow", however up and down read as "key 0" and "key 1" or something like that. Probably a symptom of keyboard set-up on Manjaro, or because I'm using a Chinese keyboard. I shrugged it off as "I'll fix it later."

Surprise, I didn't.
Title: Re: Can delphonso make a game?
Post by: Cathar on October 14, 2021, 03:24:02 am
If you ever need art for your project and my skill is within the range you need, don't hesitate to drop me a message. Else I'll be following your project closely
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 14, 2021, 03:53:16 am
I could use the arrow keys on my computer. The game having no ceiling was the only way I could tell I was able to move around.

Should we say what out OS is? Mine is a 32bit Windows 7.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 14, 2021, 04:22:42 am
Mine is a 32bit Windows 7.

How?

If you ever need art for your project and my skill is within the range you need, don't hesitate to drop me a message. Else I'll be following your project closely

Thank you very much for the offer, Cathar!
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 14, 2021, 04:26:25 am
Capumon with full might of Cathar behind?!! Can you imagine the sheer POWAH
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 15, 2021, 12:54:03 am
Nezultan uses pocket sands on his crap browsers and a cactus, 2021, colorized
History will never forget.
The world will never forget, I'll make sure of it!

Capumon with full might of Cathar behind?!! Can you imagine the sheer POWAH
It would be a thing of beauty, all those samurai making little monsters fight for their amusement. 

Mine is a 32bit Windows 7.
How?
What do you mean?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 15, 2021, 12:55:04 am
Alright, let's just...quickly blast away some of those bugs. Bug squashing is satisfying but also tedious. I find it interesting, as I still don't know a TON about how like...code works. So I tend to learn a lot along the way.

For instance, the enemy and player teams were duplicate()ed when the battlescene started. This, for some reason, didn't do what I wanted - as in - the player and enemy mons would retain their health between combats. What was happening here was that duplicate was duplicating the array. And ONLY the array - not the contents. So, to fix this, we have to iterate over the enemy and player teams, specifically duplicating their mons' stats from the singleton's stats.

(https://imgpile.com/images/UG0mV8.jpg)

Squashed.

Controls are easy too: This keyboard is different than the last one I used. You can see the old input there above "up". I decided to leave those alternative binds in there - in case it's a common thing.

(https://imgpile.com/images/UG08R3.jpg)
(big, click to biggerer)

Going off what mightymushroom mentioned, the log needs an upgrade. I've been meaning to do this for a bit and think it'll be pretty easy. So let's do it.

First, new function:

(https://imgpile.com/images/UG0qJi.jpg)

Godot's RichTextLabel (what we use for the log) support BBCode! That's the same as this forum! And heck, I'm always on this forum.

For example:

(https://imgpile.com/images/UG0lCS.jpg)

All I did here was send the last lines of combat between turns to this function - they pass everything they print into "text" which we then can surround by bbcode tags.

(https://imgpile.com/images/UG0ouF.jpg)

So now, you see txtout has a few more arguments. text will always be whatever we want to print to the log. For how long will naturally be 0 (so it'll only wait a bit if we ask it to) Likewise, it'll always be black unless we say otherwise.

Then we yield for "time" and move on! Great!

(https://imgpile.com/images/UG0XFw.jpg)
This print chain is quite long, so here's just the end of it - you can see that, because the arguments are pre-set, they're optional.
The result is exactly as expected! (jpegs don't like green, apparently. It looks fine normally.)
(https://imgpile.com/images/UG0cjC.jpg)

Interestingly, Godot won't throw errors if the color isn't recognized by their BBCode handler. For example:

(https://imgpile.com/images/UG0Vfl.jpg)

Will just print:

(https://imgpile.com/images/UG0rEb.jpg)

Except...
Why didn't the new line get started?

So, yield is...picky. Because this print is called twice in a row (for player and enemy health+status) it process the first one, starts the yield, but immediately starts the second one, overwriting the yield. This is exactly not its purpose, and also completely ignores what we're trying to do. I have a simple solution:

(https://imgpile.com/images/UG0sAo.jpg)

Now, because there is more code after the yield, it'll wait and do it, I guess? It's dumb.

I asked in a matrix group for some tips and people suggested checking if the timer has gone out before doing the next line. I'll see how easy it is to put that to code. Either way, what I have to do next is replace every time I print to the log with this function. This is just a bit of work, but something I'll need to be meticulous with to avoid any errors. I'll probably add another argument too for things like bold and size.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 15, 2021, 12:56:19 am
How?
What do you mean?

As a connoisseur of old weak computers, what led you to end up with such an old PC?
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 15, 2021, 01:39:17 am
As a connoisseur of old weak computers, what led you to end up with such an old PC?
Several years ago my the motherboard in my Win7 64bit died so I had to switch to my moms old Win7 32bit laptop and that thing lasted a few years before it's hard drive died and I had to switch again to this older Win7 32bit laptop that was called the craptop, maybe at some point in the future I'll switch back to my 64bit laptop since I managed to fix it.


Also it probably doesn't help that I hate Windows 8 and 10 and refuse to use them.
Title: Re: Can delphonso make a game?
Post by: Dorsidwarf on October 15, 2021, 06:20:19 am
How's your game going
Title: Re: Can delphonso make a game?
Post by: delphonso on October 15, 2021, 07:43:52 am
Also it probably doesn't help that I hate Windows 8 and 10 and refuse to use them.

*a nerdy ghost whispers "linux"*

How's your game going

Overall, I'm quite satisfied. I'm enjoying the process and the forum posts and feedback have really helped keep me focused on the project. That said, I'm starting to get eager to move on to something else, so I would expect this project to really only wrap up what I've promised and not really add anything new. I have a large list of what I still want to include and have been slowly checking them off.

Code-wise, it's a bit dirty, but I think understandable to someone who isn't me. It is leagues ahead of anything else I've written at this point, and I'm confident enough in it to post it online and send it to friends.

So, uh.

Good.  :D
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 15, 2021, 08:09:14 am
I finally won. Just wanted to share  :P

But it really is coming along nicely.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 16, 2021, 03:38:58 am
What kind of this are on this long list of things to add?

*a nerdy ghost whispers "linux"*
But...      I'm afraid...    Also I don't even know which one I would go with.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 16, 2021, 04:13:01 am
It's sort of just an enumerated list of what I've talked about layed out in categories of what needs to be done first.

So like, the E button starting combat was one of those that I finished, but under that is:
 E begins dialogue
- click or enter to begin combat
- allow player to leave dialogue without combat.
- dialogue stored in code?

Other major categories are bringing the 3d models into the gameshop room and managing inventory.

Re: Linux, if you're actually interested, the generic.computer advice thread seems to be the place to ask. Lots of people on here have some experience with many of the distros.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 16, 2021, 04:42:53 am
When you say managing inventory do you mean like healing stuff for the monsters or something else?

Re: Linux, if you're actually interested, the generic.computer advice thread seems to be the place to ask. Lots of people on here have some experience with many of the distros.
Might look into it seriously when I get a new hard drive for that old laptop, still don't know how one would chose a distro as there seem to be hundreds of them.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 18, 2021, 01:25:17 am
When you say managing inventory do you mean like healing stuff for the monsters or something else?

I mean managing your "deck" of monsters. If there's a capsule machine, you'll be getting new mons, and multiples of mons. We'll need to keep track of that, and also maybe a drag-and-drop interface to make the party-lineup? Not sure yet.

Might look into it seriously when I get a new hard drive for that old laptop, still don't know how one would chose a distro as there seem to be hundreds of them.
There are a lot, but there are clear stand-outs in different categories. Overall, I think Debian is the most-used, which means it's the best supported by other software. Under that you have more specific types - like Ubuntu and Mint - then each of those have options in their desktop environments, usually like Xubuntu and Ubuntu Budgie.

You're right - there are a lot. They're also free, though - so you can just spend an afternoon trying out a couple of them to see which jives with you best.

-=-=-=-=-=-

No pictures today, unfortunately. Last Friday there was a power outage, so...didn't get any work done. The weekend was dedicated to Dwarf Fortress, and now it's Monday and I'm grumpy >:{ (Also the internet is out because the school forgot to pay the phone bill.)

Luckily, I had already grabbed some free assets from Kenney (who makes a lot of free assets, a few solidly fun games, and some great paid assets). Importing is not an issue. I built a small 3D environment out of them - 4 walls and a floor. There are 3 humanoid models, but when I import them, they are textureless - clearly all sharing the same shape. So I'll have to figure that part out, but the game should look a lot different next time you guys see it.

Along the aesthetics branch, I tried again to get that yield to work and for the text log to be more readable. I failed and honestly might not be able to implement it. Mostly, that's because of how I structured the code. I'm not using the process at all (like we do during the 3D movement) - and so that process will be very hard to interrupt and pause. It may just end up being let there because the work to fix it will be too much. I've already spent more time on it than I'd care to, and just want to blast through whatever is next.

Anyway - tiny progress made today, nothing of huge note. Hopefully I can start the dialogue section next.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 18, 2021, 02:51:20 am
You said you've picked some assets does that mean you have a theme picked out?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 18, 2021, 02:57:32 am
You said you've picked some assets does that mean you have a theme picked out?

I'm honestly thinking: Alien technology that fell into a medieval tavern.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 18, 2021, 03:43:31 am
I'm excited for the peasants, vikings, or whatever medieval people you chose for this making monsters fight for their entertainment!
Title: Re: Can delphonso make a game?
Post by: delphonso on October 20, 2021, 12:01:22 am
Starting to slow down on progress as I feel frustrated and need to learn a bit more about what I want to do. Must. Push. Self. To. Learn.

Anyway - here's what happened in today's little burst of effort:

The whole yield thing was really disheartening - the basic recommend solution was: restructure completely. That's not happening - so here's my fix.

(https://imgpile.com/images/UMX49W.jpg)

Just plop a yield at the front of every function that prints texts. It actually feels alright. A bit easier to read, for sure. Comes with a fun bug where you can swap out a mon who is about to die before the text is printed and freeze out your own buttons. (Swapping again fixes it, so...eh.)

Anyway, I'm satisfied with this look. So let's make it even fancier.

(https://imgpile.com/images/UMVe2c.jpg)

Here I can plop tags like (http://. There are a few tags that Godot can use (as well as the ones you could make on your own, if you want.)[img]https://imgpile.com/images/UMVjeN.jpg)

These brought back a sense memory of playing Runescape and trying to sell coal.
<scroll> <>< Selling coal certs 600gp <>< <scroll>

Fade will fade out but needs a specified number of letters - easy to just grab the len(gth) of the text.

(https://imgpile.com/images/UMVpWr.jpg)

The end result looks like a fucking travesty in jpeg format.

(https://imgpile.com/images/UMVZIR.jpg)

Hang on, let me get a png.

(https://imgpile.com/images/UMXXAg.png)

and

(https://imgpile.com/images/UMXHjc.png)

Once this battlescene gets remodeled, these colors will change. The wave is animated as is the shake/tremble. You may need to play it to get the effect. It's nothing special.

Finally I made some adjustments to the basic indoor scene. I need to figure out the keyboard shortcuts for the 3D editor, because it takes me ages to move around and adjust items to a fine-degree. Anyway - it's like...more like a game.

(https://imgpile.com/images/UMVaKg.jpg)

Next two steps (either dialogue or inventory) are going to require a bit of learning on my part. That shouldn't be too bad. Tomorrow I have to do some work visa management, so I'll either get no time to work on it, or several extra hours to work on it (depends how fast it is and if I can just go home afterwards)

I wanna get something significant done and post another playable version this weekend. We'll see!
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 20, 2021, 02:14:31 am
Oh man it has a ceiling and a door now, it's like a whole new game!
Title: Re: Can delphonso make a game?
Post by: delphonso on October 26, 2021, 12:26:42 am
Took about a week off to be depressed and play dwarf fortress (also try desperately to keep Spookyfort up and running) Anyway, the rest did me some good because I did the following without any mistakes. NO MISTAKES!

YOU HEAR ME?

(https://imgpile.com/images/Uiyk6R.png)

I separated the keybindings slightly - and have set up an inventory key (I, E, and right click) and an interact key (interact is left click, space, or enter). Now, whenever they're pressed, the game will send to these functions. But what are these functions, you ask -

(https://imgpile.com/images/UiyBcc.png)

Inventory does nothing - just passes as if the button wasn't pressed at all.
Interact will only trigger if you're within battlin' range of a cubeboy. It, in this image, only does what it used to do - go straight to combat. So let's change that.

We need a dialog screen to overlap the 3D scene. Luckily, any 2D object will just get plastered on top of the window. That means if we throw a 2D object up there, and freeze the controls, we have a simple dialog window we can use.

(https://imgpile.com/images/UiyZ6o.png)

This scene is exceptionally simple - which is really all we need. The background is a colored rectangle that is black but at about 80% opaque - meaning it is only slightly transparent (the screenshots are mid-tweaks, as I started at much more transparent and slowly cranked it up.

(https://imgpile.com/images/Uiyq2X.png)

And to freeze it, we actually just check a boolean every button press/mouse movement.



We get a simple version of it here:

(https://imgpile.com/images/UiyL9E.png)

Next, we set up a signal. Signals call upwards in the chain - to lay it out clearly, it looks something like this:

-main (always running)
- - gameshop (child of main)
- - - player (child of gameshop)
- - - Control (dialog scene, child of gameshop)

player has a signal called "talk" that signal is emitted when you're next to a cubeboy and press an interact key. It also passes the trainer information.
gameshop receives the signal "talk" and does this:

(https://imgpile.com/images/UiygIW.png)

It checks which trainer it is and then looks at Control (the dialog scene) and fills in the text for the buttons and label. Nifty neat and easy!
This is very bad code, as everything is very explicit - Control is the generic name for a 2D UI node. So if I want to change it, I'll need to come back and change it in every one of those green texts! Gasp!
(I'm going to do this, don't worry. It bugs me too much to just leave it.)

The first button is an escape option - it'll drop the dialog screen and return you to normal.

(https://imgpile.com/images/UiyFBN.png)

The second button starts combat. This is the same code from the old E button press - and since the global handles all the trainers and stuff, that should work just fine.

(https://imgpile.com/images/Uiy2eh.png)


But! If we just hide the screen, the game is still frozen! You can't move! Now you know what Major Chongus' victims feel like!
Easy peasy:

(https://imgpile.com/images/UiyO8r.png)

This is a new feature I didn't know. Since Control is a separate scene, it's a bit inconvenient to connect a signal back up to the gameshop or main (it is possible, just a few extra lines of code). Instead, instanced scenes (such as this one) will basically emit a signal whenever they're hidden, and since button1 hides the scene, we can use that to tell the gameshop to set the freeze to false within the player. It just works!

Hope that was all clear!

I'm uploading files now for a playable version...I unfortunately need to do it through my phone today, so...bare with me.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 26, 2021, 01:01:22 am
New playable version available to play in your browser! 32-bit Windows version just for Zultan included!

HERE (https://delphonso.itch.io/capumon)


(Had to reupload because I forgot to recapture the mouse after the dialog closes.

No Mistakes.

Also if you spam buttons you will almost certainly break the game during combat.

NO MISTAKES.)
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 26, 2021, 04:30:07 am
It seems to be shaping up to be something really cool. Also it's pretty cool that there's special version just for me.

I'm still not sure why everything is black when I try it thought, maybe it's because my computer doesn't want me to play any cool games.


Is the 32bit version the one labeled capuwin?
Title: Re: Can delphonso make a game?
Post by: delphonso on October 26, 2021, 04:33:59 am
It is indeed 32 bit. I figure no sane person would download this, so it's tailored to you... Or it should be. I have no clue why it's black. Unless it is casting it all in darkness for lack of a light source - but that seems...impossibly unlikely.
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 26, 2021, 04:59:35 am
My only thought on the situation would be to throw a light bulb in a corner and see if it did anything.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 26, 2021, 05:22:47 am
My only thought on the situation would be to throw a light bulb in a corner and see if it did anything.

I'll try it tomorrow and reupload the windows version. Should still be fine in browser for everyone else.
Title: Re: Can delphonso make a game?
Post by: eerr on October 26, 2021, 11:08:32 am
It works in the browser!

There was some rough edges though.

I would prioritize adding sounds over anything else, at least music.


Title: Re: Can delphonso make a game?
Post by: delphonso on October 26, 2021, 07:50:25 pm
There was some rough edges though.

A friend of mine immediately managed to get outside of world. Rough edges is more than generous.

Yeah, it's interesting how connected visuals and audio is. As soon as I started playing in a space that wasn't just blue nothingness forever - I was like "damn, this needs some music." I'll see what I can get up to today. More visa stuff incoming, so likely will miss a few days to that.
Title: Re: Can delphonso make a game?
Post by: delphonso on October 27, 2021, 12:40:47 am
King Zultan - a new version with a light source has been uploaded just for you - let me know if it works. I also messed around with asset settings - so we'll see!

Trying to work on a a tavern theme (https://www.beepbox.co/player/#song=8n31s4k4l00e0ft1Zm0a7g0fj07i0r1o3210T1v1L4ub0q1d2f7y3z1C0c0A0F0B9V9Q0000Pe850E0141T1v1L4u93q1d4f6y2z1C0c2A8F4B0V1Qd007P5aa3E0019T5v1L4u51q1d5f7y1z6C1c0h0H-IHyiih9999998T3v1L4ufaq1d5fay1z7C1SjPrrW9V800ah0a0b0h8P4ich8Och4h4z0h4h8N4h4h4x4h4x014h4h4h4h4p23cFBQxq1qhqqqqo6GAm1HGHerO8IAbhihQkO8JoJBEGqDFcLgJ0J0J2LFOZvA9BWrnVjhUk3psCL-OUaTCGwkQuBjjiCR-i_4XVaGEzFKfXdtd7Pj1Tn4tcLyqDP9OkR_darnZAwkQuB1QCnhjjuptapuxo4mCR-XaWwaqcMzFe3japljisvE8U0mAFIariewmUzG5F8WieAz0)

Here's a god-damn crime scene (https://www.beepbox.co/player/#song=8n31s4k0l00e0ft2hm0a7g0fj07i0r1o3210T1v1L4uc5q1d2fay0z1C0c1A0F0B3V1Q5000Pf800E0111T5v1L4ug6q1d2f7y0ziC1c3h2H0f810000000000T1v1L4u70q1d1f8y2z1C1c0A1F9B2V2Q1030Pdc6cE016bT3v1L4ufaq1d5fay1z7C1SjPrrW9V800ah0a0b0h8P4ich8Och4h4z0h4h8N4h4h4x4h4x014h4h4h4h4p23cFBQxq1qhqqqqo6GAm1HGHerO8IAbhihQkO8JoJBEGqDFcLgJ0J0J2LFOZvA9BWrnVjhUk3psCL-OUaTCGwkQuBjjiCR-i_4XVaGEzFKfXdtd7Pj1Tn4tcLyqDP9OkR_darnZAwkQuB1QCnhjjuptapuxo4mCR-XaWwaqcMzFe3japljisvE8U0mAFIariewmUzG5F8WieAz0) I made by taking the last song, changing it to key of C, upping the tempo and changing the instruments to more sci-fi-y stuff.

Title: Re: Can delphonso make a game?
Post by: King Zultan on October 27, 2021, 03:03:02 am
It's happened I can see what's going on, it's a miracle I now know what's going on! Also the player character seems to be a giant floating pill!
Title: Re: Can delphonso make a game?
Post by: Quaksna on October 27, 2021, 03:30:08 am
Everything checks out, then  :P
Title: Re: Can delphonso make a game?
Post by: delphonso on October 27, 2021, 04:03:23 am
It's happened I can see what's going on, it's a miracle I now know what's going on! Also the player character seems to be a giant floating pill!

This is correct. This entire game is an allegory for Big Pharma.
(glad it worked! Can I get you to test another version for me in the future without a light source? I expect that some of the texture settings is what actually did it.)
Title: Re: Can delphonso make a game?
Post by: King Zultan on October 28, 2021, 03:18:37 am
Huzza I'm an edge case! Hopefully not one that causes to much trouble.

Also I'm ready when you need me for testing stuff.
Does it matter that I could only see where the light was pointing and everything else was pitch black?
Title: Re: Can delphonso make a game?
Post by: eerr on October 29, 2021, 12:45:30 pm
Oh wow, tavern theme really brings back memories.
It reminds me of some old Sim City 2000 music.

The second track seems like something experimental I never heard before.
Title: Re: Can delphonso make a game?
Post by: delphonso on November 07, 2021, 06:23:33 pm
So thing are sort of standby as I juggle a few real-life things. Visa application took longer than usual (increasing standards means you show up with all your documents and they tell you that you need another one out of nowhere), and now I'm on the job hunt to move me and my family out of this town that I hate to a city I love. Just been using my lunch breaks for that - or clearing my mind with some DF.

Hopefully I'll nail down a job soon and then can sort of just relax from there until I need to figure out how to move furniture across the country...

Also I'm ready when you need me for testing stuff.
Does it matter that I could only see where the light was pointing and everything else was pitch black?

Thanks - yeah, that does suggest more weirdness going on with textures. Maybe it's something as simple as capitalization. I'll look into it.
Title: Re: Can delphonso make a game?
Post by: King Zultan on November 08, 2021, 03:53:35 am
Hope the job hunt goes well.
Title: Re: Can delphonso make a game?
Post by: EuchreJack on November 16, 2021, 03:36:36 pm
Well, it is a game.  Apparently without any collision detection, but hey I've never made a game so good job delphonso!
Title: Re: Can delphonso make a game?
Post by: delphonso on December 16, 2021, 12:05:36 am
Oh, bonjour!

My goal is to "finish" this project as much as possible before the end of December - when moving preparations will take the reigns and then, perhaps, just maybe, I'll move on to another coding project.

So over the last month, I learned about the "sport" of CodeGolf (https://code.golf/). The premise of codegolf should be pretty evident if you go to that site. The idea is to solve a problem with as few bites of information as possible (lowest score is best, like golf.) This is exactly the sort of thing I have been looking for every time I tried to learn coding in the past. This is a huge collection of code challenges, most of which require understanding the basics, but many requiring the use of custom functions and such to even complete. I haven't done much besides fiddle with it, but I think I'll take a crack at a challenge every few days or so - or as a "warm up" for jumping back into Godot (using Python, as Godot's language is a slightly modified Python - but will be tough as I don't actually know the real syntax of Python, only the syntax of Godot - which is occasionally different.)

Anyway - the thread!

Hope the job hunt goes well.

Thank you - it did! I found a kindergarten in a city that I like with a decent salary and - AND an apartment with a garden. Goodbye coding, I'm going to grow vegetables now. IN DIRT!

Well, it is a game.  Apparently without any collision detection, but hey I've never made a game so good job delphonso!

So...About that. I made the collision shapes Areas - which is mostly used for...you know - checking if something entered that area. This is convenient for things like pick-ups but is a terrible idea for making walls. I've set them to StaticBody instead - and they work now.

And the project!

First, I went in with the lofty ambitions of codegolfing this project down.

Then I got sort of lost in the weeds for a bit following my chains of button presses and functions.

Then, exasperated, I ate an orange.

Rejuvenated, I came back and decided to fix the bugs that I knew were still present. I added collision to the walls around the tavern - which was easy enough. I then went into the code and disabled all the buttons whenever an attack is selected - then reenabled them whenever the turn switch occurs for the player. This stops the bug where you could press several attacks in a turn, messing up the party numbers and guaranteeing your own loss.

Also I forgot how dumb this game looked what with Knuckles in a hotdog costume and Agumon.

(https://imgpile.com/images/wns1pE.png)
(The normal - preattack menu)

(https://imgpile.com/images/wnsnHh.png)
(the disabled buttons)

The coding part of my brain is pretty rusty, but luckily I put comments in my code before, so at least some of it is understandable/refreshes in my memory. I did have to work backwards through the chain to figure out the best place to re-activate buttons - which seems like a fundamentally bad way to do things.

But alas...Work continues. Just cleaning up code and trying not to break it completely. I don't know if I'll get to the point of adding in the gachapon machine - but we'll see. I'd like to actually work on some of the visuals, still - because that, I think, will quickly spruce it up a bit.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 16, 2021, 12:48:58 am
(https://imgpile.com/images/wnsXk2.png)

A quick mock-up of the combat screen background. Pretty happy with it, overall - but will probably need to make adjustments with the text log. Maybe expand it a bit, or shrink the text box.

I'll also want to adjust the character portraits window - probably adding some bumps to at least show HP.

Also here's new Agumon/Charmonder

(https://imgpile.com/images/wnsVi4.png)

He's perfect.
Title: Re: Can delphonso make a game?
Post by: Quaksna on December 16, 2021, 05:12:15 am
The UI is very stylish. So is the Charmonder, but flip his mouth and u get this  :P

(https://i.imgur.com/YtY2MdL.jpg?1)
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 16, 2021, 11:37:43 am
Soon this game will be so polished we'll go blind when we look at it!
Title: Re: Can delphonso make a game?
Post by: Eschar on December 17, 2021, 04:43:17 pm
PTW.

I like the game (such as it is) and am envious of your steady progress.

EDIT: haha i beat a cubeboy
Title: Re: Can delphonso make a game?
Post by: delphonso on December 20, 2021, 12:52:12 am
The UI is very stylish. So is the Charmonder, but flip his mouth and u get this  :P

(https://imgpile.com/images/wU0T9G.png)

Soon this game will be so polished we'll go blind when we look at it!

The key is - no one can tell you don't have any content if it's too polished to look directly at.

PTW.

I like the game (such as it is) and am envious of your steady progress.

EDIT: haha i beat a cubeboy

Thanks, Eschar. "Steady" is a strange word for one month of solid progress then 2 months of no contribution. I appreciate it all the same.

Behold!

(https://imgpile.com/images/wU01wF.png)

It looks cleaner. Let's just give it a run and see how it feels.

(https://imgpile.com/images/wU0Isi.png)

The buttons are a bit off - a little different in size each, which sucks. The text log is also too far over. The images will also need to be centered.

A quick jump over to global allows me to just change the file path for these sprites in a few seconds. char.jpg is now scor.png

(https://imgpile.com/images/wU0uWu.png)

Well. I probably should have expected something like that. I didn't replace the default sprite, which is still agumon - so didn't notice that they are still flipped. My new sprites are all facing right, so I need to reverse it for the enemy and not for the player (it currently is opposite.)

(https://imgpile.com/images/wU0UKM.png)

And boom! That looks much better. The dark blue has to go - as it's a bit too hard to see. And well...

(https://imgpile.com/images/wU0N1k.png)

Yeah, the current sprites still need to be replaced.

The lord of darkness, especially, look menacing when half the screen turns black.
(https://imgpile.com/images/wU0w24.png)
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 20, 2021, 03:12:29 am
I see sun drop in a bottle has been added, also my image has been replaced with a new one but it only has one head, does that mean if it evolves it will obtain the other two?
Title: Re: Can delphonso make a game?
Post by: delphonso on December 21, 2021, 12:00:55 am
I see sun drop in a bottle has been added, also my image has been replaced with a new one but it only has one head, does that mean if it evolves it will obtain the other two?

More heads is in the sequel.
(I tried to redraw it with more heads, but with my 100x100 pixels, it just is too crowded to clearly pull off. Instead, I gave you a fancy crown. I also made a monstrosity of Quaksna's beautiful artwork...)

To work!

I spent a bit of time finishing off the necessary sprites - if you can call them that. Half of them I like, half I think look bad - but hey - there's only 10 days left in the month, so let's just fucking move on, shall we?

I drop all the sprites into the assets folder and delete the old ones we had lying around from before. Farewell Agumon, fat Pikachu, Knuckles in a hotdog, King Zultan Official, and Quaksna's self-portrait! You'll be much missed!

I go in and change the names of many of the mons, as well as all the art paths, in the global.

(https://imgpile.com/images/wwtfmi.png)

With all that, we should be good to go! Let's test it out!

(https://imgpile.com/images/wwtWYg.png)

Well fuck.

~*~  Welcome to the update about bug-fixing.  ~*~

We got an error about loading the gameshop scene. There are 10 errors logged - let's check them out to figure out the problem.

(https://imgpile.com/images/wwt0UR.png)

These are all normal errors about unused or unformatted resources in the code. That stuff's been there the whole time and is not worth worrying about.

(https://imgpile.com/images/wwtOgr.png)

Below that are the real issues. The game is trying to find the cactus sprite which I deleted. Since I replaced that in the globals, I didn't expect to see any call for it. A quick ctrl+f suggests that there is no such reference in any of my code. That means it must be in the scene somewhere.

(https://imgpile.com/images/wwtLmE.png)

Errors are often hard to understand, but you can see here there's an issue in the C++ (which is what godot is written in, and suggests it's an issue in the editor, not your code) You might be able to parse it's trying to load a resource somewhere in the gameshop scene and can't find it.

(https://imgpile.com/images/wwtAdh.png)

And yes - here's the issue! I was sure that I had connected the sprites which appear in front of the cubeboys to their teams - but apparently I was lazy and just dropped a sprite directly into the editor. Those sprites are gone, and rather than load nothing, the game hung there and produced the error. I want to rework this whole room because I think it's quite bad. For now, let's put some new sprites in there.

(https://imgpile.com/images/wwtqSX.png)

That'll do it.

(https://imgpile.com/images/wwtoHa.png)

This is a motivational poster.
Let's try out combat with our new sprites!

(https://imgpile.com/images/wwtHtG.png)

Oh fuck off!

So here is the same issue:

(https://imgpile.com/images/wwtX42.png)

delphonso you lazy shit, why'd you leave all this work for me to deal with. Easy enough fix - I had put in a placeholder sprite for the battle scene so I could easily apply adjustments scale and horizontal flip to them - unfortunately the placeholders were just deleted. We'll need a new placeholder sprite and preferably one of the correct size.

(https://imgpile.com/images/wwtzYM.png)

Waste not, want not.

And now - everything should work...right?

(https://imgpile.com/images/wwt8k4.png)

Looks good to me!

I go back and apply a few more changes to the global - including some new names and move names.

(https://imgpile.com/images/wwtlgu.png)

The text needs new colors as well - easy enough to fix.

(https://imgpile.com/images/wwtrNk.png)

And from here on out, I only want to make the "gameshop" not look terrible and maybe put together a cheap menu to swap out your mons.
I'll also put some indication of at least name and health near each 'mon in the battlescene.
Title: Re: Can delphonso make a game?
Post by: Quaksna on December 21, 2021, 12:18:45 am
What are you talking about, your sprites are awesome. I died when I saw those cans  :P

Also I like the way you write these updates, very amusing indeed.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 21, 2021, 01:08:34 am
What are you talking about, your sprites are awesome. I died when I saw those cans  :P

Also I like the way you write these updates, very amusing indeed.

There are four people behind me in the office who can see my computer. I often wonder if they look over and just see me making terrible puns over here.
Thanks, there is really some intangible benefit to taking a break from coding/working on this game to typing out what I just did and what I plan to do. It's been fun for me as well.


Progress!

(https://imgpile.com/images/wwMwOM.png)

I made some slight tweaks to the background including two spaces for names. I drop yet another RichTextLabel on each one and enable bbcode. You can see there's some...ugly interpretation of the sprites here - their edges are so rough. I tried reimporting them as pixel art and although they look good in the editor, when in the window during the game they look even more rough... I'll have to figure out the right import settings.

(https://imgpile.com/images/wwMNNu.png)

Let's get back to the code: throw those two labels into variables so we can manipulate them easily.

(https://imgpile.com/images/wwMIlF.png)

I set it up so that they're always centered - though I might change this to left aligned for player and right aligned for foes. Not sure yet. I might also bold them, if it can handle that many tags. Anyway, we send a color to it through the variables myhp and foehp.

(https://imgpile.com/images/wwM1bw.png)

Look.

LOOK -

I KNOW, OKAY?

I know this is a bad conditional. But also - I don't care.

And now, when our 'mons start taking a beating, their HP will reflect it at 66% and 33%:

(https://imgpile.com/images/wwMUPk.png)

I'm going to go back and add one more conditional to put it to grey when you hit zero, because this doesn't really convey that well.

(https://imgpile.com/images/wwMuQi.png)
Title: Re: Can delphonso make a game?
Post by: Starver on December 21, 2021, 02:25:17 am
I know this is a bad conditional. But also - I don't care.
Bearing in mind what I just told you in the PM (that you may not have read yet, in response to a bit in the prior post about progress), you probably don't want my advice on coding.

But:
a) The (appropriate to your script dialect) use of an if (blah > 0.66) { setLime } elsif (blah > 0.33) { setYellow } else { setRed } nesting would look and maybe work nicer, or a case multisplitter maybe, if that exists in your lingo.
b1) Defer it to a function...
myhp = rankHP(player[0].hp , global.playerteam.hp[0])
foehp = rankHP(enemy[0].hp , global.enemyteam.hp[0])

...with the rankHP() doing it how you like, but being agnostic about whose values it is passed.
b2) Or even allow myhp=rankHP("me") to be parsed as an in-function choice (also accepting "enemy", and any other variations you later need) and pick up the relevent values by internal coding (would work with your global.*bstuff, I presume. Not sure if it would have access to player[] and enemy[] as non-globals. Perhaps if it is an explicit childsub (sub entirely defined within the sub you're calling from) whereupon local vars are considered 'global' to anything within).

Whichever way, if it works at all then it would help future-you more than it inconveniences current-you to implement. Trust me.


(Oh look, it's 07:25. I really should get some sleep!)
Title: Re: Can delphonso make a game?
Post by: delphonso on December 21, 2021, 02:37:48 am
Yeah, it is particularly egregious in that if the player is at zero health the program will specifically rewrite myhp from green to yellow to red and finally to gray. I considered a custom function, though it's so small, it didn't seem worth it (and gdscript cannot do lambda functions). At the very least, I'll go back and properly make them elifs.
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 21, 2021, 04:26:31 am
Seeing that you've replaced the enemy characters with Sprite cans means you must have increased the difficulty dramatically as Sprite is one of the signs that the game has been invaded by MLG PRO gamers and that we are all doomed as we are just noobs compared to them and they shall crush us!

(Shit I just remembered that Mountain Dew was MLG not Sprite, damn it oh well I'm not changing this thing.)
Title: Re: Can delphonso make a game?
Post by: delphonso on December 22, 2021, 01:13:14 am
Seeing that you've replaced the enemy characters with Sprite cans means you must have increased the difficulty dramatically as Sprite is one of the signs that the game has been invaded by MLG PRO gamers and that we are all doomed as we are just noobs compared to them and they shall crush us!

(Shit I just remembered that Mountain Dew was MLG not Sprite, damn it oh well I'm not changing this thing.)

New challenger approaches: dorito dust

-=-=-=-=-=-

Whew. Well. My kindergarten lost a kid on a trip, so...anyway capumon.

(https://imgpile.com/images/w5miVo.png)

It's done.

The yellow errors are all gone.

What else can I quickly add to the game before the rest of the kids wake up and realize one of their friends isn't there, but instead, at a school 2 kilometers away? I know! Music!

Ahh, nice relaxing music.

Previously I posted a link (https://www.beepbox.co/player/#song=8n31s5k4l00e03t1Am0a7g0fj07i0r1o3210T1v0L4ua9q1d3fay0z1C0c2A0F0B2V8Q2010Pf770E0211T1v1L4ue9q3d7f5y1zaC0c0A4F0BaV5Q0500Pf5a0E0bc1T3v1L4uaeq1d2f8y2z9C0Sp99f9c9Vppbaa9gT3v1L4uf6q1d5f7y2z6C1SLXtHrrsksrzrrrrb0h400000000h4g000000014h0000000001400000000p21CFBOEmMmAzAV4FjhZ6aCnKAzL8QR_eQ0FJvBCRZeASLZ10aps8m15H5yiUldHWaqfYOZ25E5JAa05du19B4ie0Fd6gK8WGyeIFIE8M0) to this bit of music. Sometime between then and now, I took this track and changed some instruments, slowed it down a bit and made a theme for the bar/gameshop. Then, sped it up a bit and made it sound like 4000 bugs. I have both of those lying in a folder from months ago. I'm not satisfied with the tracks, but they'll do for now.

Godot has three nodes called AudioSteamPlayer, AudioStreamPlayer2D, and AudioStreamPlayer3D. The 2D and 3D version give you music/sound which can be positional, while AudioStreamPlayer itself is just for background music or omni-present noise. I add one to all three scenes that need it: main (the opening scene that I still need to change from just a button), battlescene, and dialog (I could do it on the gameshop, but gameshop is sort of packed with nodes, and its child, dialog, is instanced immediately, so it should be a bit more convenient to use).

I use beepbox to make a shitty song just for the menu as a placeholder and drop it in. You can toggle "Playing" in the editor to make sure it sounds right.

(https://imgpile.com/images/w5zF9E.png)

This also, generally, tells you how it will act in the rest of the game. Loops are a pain in the ass as the engine doesn't automatically loop a track (unless you preconfigure it to when you compile it to a .wav) It also uses the obscure unit "samples" for where to determine loops. I don't know enough about audio to handle that, just like I don't know how to handle 20 children on a field trip without losing one.

At this point I would like to discuss the Godot editor. Running it on Raspberry Pi is clearly possible - however, at a certain point in the project, there's just too many elements for a little Raspberry Pi to handle. The editor keeps getting slower and slower - so bad, in fact, that when trying to import tracks, it took several tries because it couldn't catch double-clicks... If I hadn't already decided to be done at the end of December with this, there'd be a point when I'd need to move it to a different computer. It's just too much to handle.

Audio (either by fault of the overwhelmed editor, the overwhelmed RAM, or Manjaro itself [audio issues are frequently reported, apparently]) is choppy and impossible to tell if it sounds good at all. Sort like listening to it through headphones with a loose connections - popping and cutting in and out. I'll have to move to a laptop to even make a new track and make sure it sounds okay.

Anyway, I add some commands in the code to start and stop playing whenever their scene is loaded and just before it is unloaded. This immediately doesn't work and as soon as you press the button to start the game, you get the bar music and the menu music at the same time - luckily, starting combat breaks all the audioplayers and music stops. Jesus fucking christ. I run into this literally every time I try and add music to a game.

I really should...write down exactly what I do to get it to work...

You know.

Like on a public forum or something so I can look back on it any time.

That'd be a good idea.

(https://imgpile.com/images/w5msEC.png)

The "Playing" checkbox is a real pain in the ass, though - as it also doesn't loop and will maintain its 'position' in the song no matter how many times you toggle it. Here you see the music is playing (option to pause is present), but as it is past the 12 seconds of the song, it just sits there doing nothing. I spent about 10 minutes trying to figure out why it wasn't starting before I realized it was a loop issue. I searched all over for the right options - just like all the teachers searched all over for that missing kid.

I've put all the audio in its right place and will either need to learn what samples are or recompile the music as looping in .wav format. I will actually probably spend some time making new tracks instead because I enjoy doing that, and I don't think these are particularly good anyway.

Work continues!!

-=-=-=-=

(The kid is found and fine, by the way. The whole school went to a primary school we have a connection with to use their stage for practicing New Years performances that the kids are doing. Three classes per bus - I guess someone miscounted heads at some point and...well left without their entire class. The kid must have wandered off into the greater school while his classmates were lining up. Luckily it's right down the road, so it was a quick trip for his teacher to drive over and recover him.)
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 22, 2021, 02:35:08 am
At least they found the kid.

Also what's so bad about all the songs playing all at once?
Title: Re: Can delphonso make a game?
Post by: delphonso on December 23, 2021, 01:09:42 am
At least they found the kid.

Also what's so bad about all the songs playing all at once?

I do know how to fix it, after thinking about it later that afternoon. I think a more skilled musician could write something that would actually make it quite pleasant to add layers of music while entering further and further into a game - that is, however, not me.

Busy day today, so not enough time to work on this. Instead, I'll play a hole of code golf instead.

-=-=-=-=-
Recap and final steps:

Since picking the project back up I fixed the biggest of all bugs: the guaranteed death from pressing too many buttons when combat starts. Potentially, you could still fuck the game up by swapping mons frequently and quickly during combat, but the worst result of that would just be spreading out damage a bit more. It's a free action to switch anyway, so I don't know what huge benefits you could get from that. Collision was also fixed.

All the mon portraits have been replaced. These were low-effort sprites and are just black outlines. If I was making this game more seriously and less rushed, I'd opt for at least 3 colors per mon and a layer of shading. I like the 100x100 size, though - and the general rough pixelated style they ended up being. Higher effort still would be to make slightly larger sprites than the original Digimon toys. I'd also like at least one extra frame of animation - so they can move when they attack. Or a third one for being hit.

Battlescene background is replaced and I now have a color scheme for all menus. This is fine, I'm satisfied with how it turned out. Again, a higher-effort alternative would be to make it out of several transparent elements and have those elements slide into place when combat starts. That'd give it more punch. Most important is the color scheme, as I'll need to toss together a team-management screen soon too, plus the main menu, these should be pretty quick.

Music was...not implemented, but probably will be when I have 10 minutes to work on this again.

Things to do and then be done:
Music (either new tracks or fix the monstrosity I made now)
Gameshop improvement. The cube boys suck and it looks like shit in there. It is also sluggish as all hell to try to edit that scene. This will be a frustrating and slow affair.
Menu beautification
Team management - at this point, I will probably abandon the gachapon machine and just give the player access to as many mons as they want. It'll be too much work otherwise, I think.
Compile for everyone and put it up before New Years.

Wish me luck!
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 23, 2021, 04:32:34 am
What made you decide to finish before the end of the year?

Title: Re: Can delphonso make a game?
Post by: delphonso on December 24, 2021, 01:07:50 am
What made you decide to finish before the end of the year?

Jan 10th I finish my contract here and begin moving my family across the country. I also need to do a visa transfer during that and also visit my wife's family in another province - which means at least 3 flights with a one year old - plus when you update a visa you turn your passport over to the government for a week or two - all during the single-most-traveled holiday on planet Earth in the middle of a pandemic with increasing virulence.

It's gonna be stressful.

I think if I don't finish before then, I'll probably take another month or two off and I don't really want to work on this again at that point. Better to complete it than put it on eternal hiatus or to abandon the project unfinished in any form. At least now it'll be "done" and I can move on to another one when things settle down a bit.

-=-=-=-=-=-=-

Speaking of finishing the project: lets blast some problems!

Music:

(https://imgpile.com/images/wRk8fa.png)

As you can see - a song is loaded and it is set to begin playing. The visualizer at the bottom shows that it is specifically NOT playing.

This is because Manjaro is a real mother fucker sometimes. (I'm overwhelmingly satisfied with my OS, but apparently this is the limits of it.)
Manjaro has audio bugs, as previously mentioned.
Up to this point, I've always experienced those bugs as popping in audio.
APPARENTLY that can also appear in a complete collapse of audio drivers.
Not only does no music play in Godot - no music would play in VLC, web, or anywhere. And it looks completely identical to when there's something wrong with looping music.

A restart fixed it for a time, but eventually it cut out again (terrifying me greatly)
So...

Anyway music is finished.

Here's how it works. Let's take a stroll over to our good friend, the global.

(https://imgpile.com/images/wRklX4.png)

Rather than struggle with passing instructions through the scene tree or asking multiple audioplayers to open and close, this is a much simpler solution.

(https://imgpile.com/images/wRkfDM.png)

When the game starts, the singleton ("global") gives itself an audioplayer and names it "music".
Then we make a custom function named "play()" and give it an argument named path.

(https://imgpile.com/images/wRkmE2.png)

Quite simply, when a scene is loaded, it tells the global to load a song into its stream - which will interrupt the last song and start a new one. Easy-peasy.

(https://imgpile.com/images/wRkzTG.png)

At the beginning of every scene that should have music, I tell the global to load the correct song and play it - and since all the scenes are killed and opened by the global as well, this has no problems so far - works easy as can be.

Music = blasted
(will probably recompose tomorrow and upload the new music and test on a different machine in case there is something wrong that I can't detect because of Manjaro on Pi's music issues.)

The Machine:

I go into the gameshop scene and shuffle the cube boys around a little - add a bar, dead tavern keeper, and a "machine" - which is just an archery tower shrunk down significantly.

I put a light source on top of it to 1 - get the attention of the player and 2 - for Zultan's sake. I decided I wanted the object to blink.

My code looked something like this:

Code: [Select]
func _physics_process(delta):
  var L = true
  var timer = 0
  timer += delta
  print(timer)
  if timer > 10 and L:
      light.hide()
      timer = 0
      L = false
   if timer > 10 and !L:
      light.show()
      timer = 0
      L = true

You may realize the mistake I made.

If not, don't feel bad, because I didn't for at least 10 minutes.

Here's a hint: this is what print(timer) would show:
(https://imgpile.com/images/wRksjk.png)

The reason this didn't work is simple - I declared the variables inside the process - meaning about 60/second, timer was being re-written to 0 and L was being re-written to true. Anyway, moving the variables outside the function makes this work and it's a lot simpler and more reliable than the previous timer method I was using (the whole yield, timer, etc). Although if the whole game was in process, that might be preferable still.

(https://imgpile.com/images/wRkiLu.png)

I tweaked the check value a few times until I was satisfied with its blinkiness - this is also when the audio drivers collapsed again, which was honestly a god-send because the music was driving me nuts.


The Cubeboys:

I gave the cubeboys a new sprite instead of a copy-righted Sprite. Now they have a sort of MMO-style talk icon above them. It's pretty hard to see, because our character feels like they're about 1 meter tall. I'll fix that in a moment.

First, the cubeboys don't have collision, so you can literally walk though them. And although they already look like blocky ghosts - I'd prefer if they didn't behave like it.

The issue behind this is the same as the issue behind the walls - they were set to be Areas instead of StaticBodies. However, in the case of cubeboys - I don't want them to be totally static. They have one layer of collision which passes arguments of their teams to battlescene. Instead, I decided to keep them as an Area, with the large collision for talking, then gave them a staticbody, which has its own collision - so that you can't walk through them.

Here's what it looks like:

(https://imgpile.com/images/wRkYJi.png)

It's possible to do the same with masks and layers, and also to do it with code, but this took like...10 seconds, so for our purposes it's a superior solution.


The Machine - More:

(https://imgpile.com/images/wRkKfl.png)

The machine takes a very similar approach - one layer to block you from walking through them and another that will pass arguments to the dialog screen (to open something like a menu that'll allow you to change up your team. (accidentally cut off the second collision box in that screenshot, but it's under the staticbody).

I also added a bar countertop and made our character about 50% taller. Fun-fact, originally I had tilted the collision box, which is a cylinder. Which allowed our character to walk through the back of the machine a few times and push themselves through the floor. Love that bug.

I connected up the signals and wrote a bit of code - if everything is working, when you press any of the 'talk' buttons near the machine, it will print a message to the terminal. Here's hoping everything is tied up right.

(https://imgpile.com/images/wRkMFw.png)

All that's left is to design an interface to modify your team and to get that communicating to the global - I have a conceptualization of how to do this, so it might be easy enough to just...do it. Wish me luck!

-=-=-=-=-=-

Also, I opened the dialog scene for the first time in ages and forgot that I wrote this there:

(https://imgpile.com/images/wRkPuF.png)

Past delphonso really set a trap for me - christ - fuck you, buddy.
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 24, 2021, 03:53:55 am
Does that mean your gonna add more critters to the game?
Title: Re: Can delphonso make a game?
Post by: delphonso on December 24, 2021, 04:07:11 am
Does that mean your gonna add more critters to the game?

I've been thinking about this - I'll add as many critters as I have time for after finishing the game proper. There's a solid chance I can blast through everything this weekend, and then will have another...christ 10 hours of lunch breaks to draw and add critters.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 25, 2021, 01:11:16 am
Well.

I finished the game.

There's plenty of work to still do on it, but I'd consider it "content complete" (enough to not lose sleep about, at least)
This was surprisingly easy. Let me take you on a walk through the process.

Last night, I drank about a gallon of mulled wine and wrote three songs that I think are quite good. That music will be added to the project in no time at all.

First I had to kill a hell of a bug - no matter where I pressed the spacebar, I'd get that "heck yeah bud" message. As soon as I changed the showdialog function a little, I'd also start dialog anywhere, even if I wasn't next to the cube boys!

I figured out (eventually, after undoing everything I had done) that this was because of that collision thing I did before: this!

(https://imgpile.com/images/wRkYJi.png)

Because dialog is flagged to start WHENEVER any body enters the collision area - and there's already a body inside the collision area, that flag instantly starts on all three targets (the machine and the two cubeboys)

(https://imgpile.com/images/wT0BVg.png)

Masks and layers can be used to fix this - however my first attempt to fix it with masks and layers didn't immediately work, so instead I just added the conditional that the body entering the collision zone must be a KinematicBody (of which, the only example is the player). That solved it right away. Now, when we talk to the machine (and only within a reasonable distance) we see:

(https://imgpile.com/images/wT0WDR.png)

So let's experiment with menu options and see what we can come up with. First we'll need an exit button and we'll also want I dunno...a menubutton? That seems fine.

(https://imgpile.com/images/wT0kjr.png)

Let's chuck a few sprites in there. And while we're at it, we can fill those with the player's team pretty easily.

(https://imgpile.com/images/wT0LJh.png)

So now, when we talk to the machine, we get:

(https://imgpile.com/images/wT0OAE.png)

Noice.

A MenuButton is a drop-down list. However, godot calls dropdowns "pop-ups" for some reason. Using .get_popup(), we can make adjustments to the qualities of the list, such as "add_item" to...add an item to the list.

I whip up a quick loop and here we go!

(https://imgpile.com/images/wT0qBa.png)
(I was reading the manual on this while figuring this out, so eventually I switch to just "add_item" instead of "add_check_item", which adds a checkbox.

(https://imgpile.com/images/wT0AuX.png)

So now we've got all the mons in a list, but no way to grab the mon you select. A brief googling showed me someone else solving this problem, so I just copied their solution, which works beautifully.

When the MenuButton is added to the scene tree, we go to the popup menu inside of it, and connect that menu to a function within the same scene. That function will give us the ID of the selection as an argument - since it is simply 0 to the end of the list, it'll match up exactly to the dictionary of all the mons we have named "mons"

 (https://imgpile.com/images/wT08VM.png)

Here, you see my very bad triplicate coding of basically the same thing.

We send your selection to the _on_id_pressed function:

(https://imgpile.com/images/wT0lAi.png)

That function updates the preview picture, renames the menu to be your selection, and adds the mon to a dummyteam.

When you press exit, that dummy team replaces your current team (I plan to have a "save team" and "abort changes" button instead of just "exit")

(https://imgpile.com/images/wT0mju.png)

This means we can go in and customize our team any way we want!

(https://imgpile.com/images/wT0VE4.png)

Exit commits the team and we're golden!

Let's make...the perfect team.

(https://imgpile.com/images/wT0zCk.png)

They're perfect.

-=-=-=-=-=-=-=-

To do:

Quite a bit of cleaning.
Migrate the project off the Raspberry Pi - honestly there was a quarter-second delay between clicks and actually clicking - keystrokes were lost. It was a fucking nightmare. The project is just too big for the little Pi any more.
Fix whatever the fuck is happening with the visuals - it looks like it's getting blurrier and blurrier.
(This appears to be an issue with my screen, though the sprites still look...weird)
Make art for backgrounds of menu (redesign menu) and machine.
ADD
MORE
MONS!
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 25, 2021, 04:35:21 am
Do you have critters in mind or do you want us to suggest stuff?
Title: Re: Can delphonso make a game?
Post by: delphonso on December 25, 2021, 05:10:28 am
God please suggest stuff.

Remember there are only a few status effects (though I could add more) and attacks have no typing, only damage.
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 25, 2021, 06:10:32 am
What about hipsters that tip their fedoras at you, deer that do...     deer stuff, a pickle, a hobo that stinks of booze, and maybe a zebra.

Also for the most deadly creature you could add the dreaded sponge, you will feel fear when you see that it can absorb water and clean the grime off of hard surfaces!
Title: Re: Can delphonso make a game?
Post by: EuchreJack on December 25, 2021, 12:47:49 pm
Congrats!

You need a Crab and a Knight.
Maybe a Crab Knight.
Title: Re: Can delphonso make a game?
Post by: NJW2000 on December 25, 2021, 01:02:31 pm
I imagine you'll want to go easy on the memes, but how about a carp that can self-buff with Stand Up?
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 26, 2021, 01:52:22 am
I imagine you'll want to go easy on the memes
What is life with out DANK MEMES, I say we need loads of them!
Title: Re: Can delphonso make a game?
Post by: delphonso on December 27, 2021, 03:49:26 am
No screenshots today - I worked right up to the end of the lunch break, and didn't take screens while I was working on it. Also, as I'm doing a lot of visual improvements...I kind of want you guys to be (hopefully pleasantly) surprised by the finished product.

Here's what I did:

Clean Up:

For some brilliant reason, the 'main' scene was never cut from the scene tree and was therefore, taking up memory for no reason. I made sure there was nothing dependent on it, and made it free itself after changing scenes to the tavern. Should make it run a bit smoother - though it's so small, I doubt that'd be a problem for anything besides the smallest PC.

If you died to poison on your turn (not burn, which only triggers at the end of a round - poison is per turn), it's possible to double-die when the enemy hits you on their turn. This counts as two loses and can lead to premature game ending. I added a better conditional that I /think/ should work, but I'm not sure. I might just add a loop that checks if any of your mons have health instead of the countdown that I have been doing. Shouldn't be too hard, but I haven't done it yet.

Backgrounds:

I made a main menu background and a machine background, including a brief description of the game and controls, and a few extra buttons in the team-building menu. If I have time, I'd like to give the player...any information about their mons - but it's hard to figure out where to put it, and how to lay it out.

On the machine menu, we have a "quit" button to abandon all changes, we have an "undo" button that will revert the last change (only one, as that was simple to put together) and a 'save' button to commit the team as your active team.

New Features:

One of the cubeboys now has a randomized team every time (and dialogue to explain that). This will pull from all the mons possible, and doesn't take rarity into account, because rarity has been completely abandoned.

I began adding mons from the ideas dropped here - I think the count will be around 15 at the end. Still need to make sprites that I'm happy with (the deer made me chuckle, but the crab...I just can't get right.)

Issues:

When you exit combat, you're thrown back to the entrance of the shop. Now I could easily ignore this by instancing the battlescene as a child of the gameshop (it'll show up covering the screen), but I'd like to figure out how to make your position persist.

One of the special abilities was never implemented - striketwice, which is supposed to let the lead mon hit twice. Either I'll do something to make this happen or...find a decent replacement.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 27, 2021, 04:18:06 am
If you died to poison on your turn (not burn, which only triggers at the end of a round - poison is per turn), it's possible to double-die when the enemy hits you on their turn. This counts as two loses and can lead to premature game ending. I added a better conditional that I /think/ should work, but I'm not sure. I might just add a loop that checks if any of your mons have health instead of the countdown that I have been doing. Shouldn't be too hard, but I haven't done it yet.
[...]
When you exit combat, you're thrown back to the entrance of the shop. Now I could easily ignore this by instancing the battlescene as a child of the gameshop (it'll show up covering the screen), but I'd like to figure out how to make your position persist.

I've fixed both of these already. I'm surprised at how good I'm getting at this (the code isn't elegant, but the logic is sound and it works. I can work on sharpening those skills in the next project.)
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 27, 2021, 04:27:41 am
Oh shit this game is coming along quickly and pretty quick it will be finished!

Are you gonna start a new game project when this one is finished?
Title: Re: Can delphonso make a game?
Post by: delphonso on December 27, 2021, 04:37:59 am
Yeah, I have a pretty fun idea of what to do next. It will be much more about procedural generation instead of this type of thing - where much of the work was done (foolishly) by hand.
Title: Re: Can delphonso make a game?
Post by: coalboat on December 27, 2021, 09:24:45 pm
Amazing game! Congrats on completing!
Title: Re: Can delphonso make a game?
Post by: delphonso on December 28, 2021, 01:18:22 am
Today's quick additions:

Added a sound effect to the main menu and machine menu buttons - their absence was noticed now that there is background music. This unfortunately means that combat needs something too. Maybe just "bash" sounds and...perhaps I could flicker the images? Might be too much work to squeeze in.

Ran into a VERY weird issue where I can load background music in the global but cannot load sound effects - this is baffling to not only me, but the great Godot community as no one had any idea why it wasn't working.

Sprites are done - as much as they're going to be, at least. That's 14 mons in total with all their attacks and stuff. Completely unbalanced, but hey.

"fixed" striketwice. It was too difficult to work out the logic of a second attack on a turn, so instead, that ability gives a slight increase to damage and accuracy and has been implemented correctly. A bit disappointing, but done at least.

That's all the lose ends that I can see. I'll try to add some more polish, but think I'm pretty much done. Maybe I'll even post it before the end of the year!
Title: Re: Can delphonso make a game?
Post by: coalboat on December 28, 2021, 02:15:01 am
Is there full screen mode? The text appears very small on the itch.io window.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 28, 2021, 02:40:07 am
Haha, no, there isn't - changing the size of the window at all breaks it.

Godot has settings for arranging things like buttons and text boxes, but they are 1. Cumbersome to match with backgrounds and 2. All in-editor. Normally that's fine, but moving anything in the editor at this point takes a frustrating amount of time, or an already meticulous and frustrating process.

That'd actually be a good goal for the end of the month. I'll move totally to working on my laptop and see if I can implement fullscreen in the next couple days.
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 28, 2021, 02:58:18 am
So how will you feel when the game is finished knowing you made a game from start to finish?
Title: Re: Can delphonso make a game?
Post by: coalboat on December 28, 2021, 09:09:52 am
That's indeed an achievement. 99 out of 100 indie projects don't make it to the end.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 28, 2021, 09:08:04 pm
So how will you feel when the game is finished knowing you made a game from start to finish?

As of right now - I feel unsatisfied because it's not all that I had hoped it would be. This is the trade off for finishing it, because it's unlikely any game would fully live up to my expectations. I'm very happy with the programming (flawed that it is), as this is the biggest chunk of code I've ever written that is all working together. I am satisfied that I learned quite a bit about Godot specifically and game design in general. I feel much better equipped for my next project.

The last game I made (with a friend), I was basically in a support role - bug fixing and doing last-minute implementations of stuff while doing all the music and art assets. The core of the game was their work, and parts of it I fundamentally didn't understand (though I would now, I'm sure.) It was also a gamejam - so it was one week of hard work rather than this - which was about an hour a day whenever I worked on it. I can really feel the difference.

That's indeed an achievement. 99 out of 100 indie projects don't make it to the end.

This is quite true. This is also how many of the things I've coded in the past went - half-finished and abandoned (usually at some hurdle like all the ones I overcame so far in this project.)

The overwhelming feeling I have is to just finish this because I want to work on the next idea. Originally, I planned to have multiple projects running concurrently, but I don't know how well I'd be able to manage that...mentally.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 28, 2021, 11:18:25 pm
It's done, baby.

IT'S DONE: HERE (https://delphonso.itch.io/capumon)

It's not good, but also - not entirely bad. It's inoffensive. Play in browser or download! KingZultan, I even added a light object for you!
I am sure I left some bugs unsquashed, but I did my best to iron them all out. You can also resize the screen - but aspect ratio is lost, which I find hilarious.

I'll be back soon with a new game concept...Hopefully one a bit less ambitious, and more easily completed. Like...really completed.

Warning: it takes a while to load in-browser because of the music.
(I already managed to break combat.)
Title: Re: Can delphonso make a game?
Post by: King Zultan on December 29, 2021, 03:30:13 am
I have played the game and it is beautiful and I even managed to beat the other guys team, by having the deer kick the first two to death not really sure why the last guy died as I only had the pickle to the heal up thing.

As of right now - I feel unsatisfied because it's not all that I had hoped it would be.
That always seems to be the case as no matter how polished and finished a game is, your always left with the feeling that it could be better. I know I've had that feeling with several things I've done in the past.
Title: Re: Can delphonso make a better game?
Post by: delphonso on December 30, 2021, 03:18:05 am
I have played the game and it is beautiful

Thank you so much!

Quote
and I even managed to beat the other guys team, by having the deer kick the first two to death not really sure why the last guy died as I only had the pickle to the heal up thing.

Hmm. I might have accidentally given the pickle damage on their healing move or something. Who knows, at this point. The deer is my favorite after the carp - whose sprite, I think, is a masterpiece.

Quote
That always seems to be the case as no matter how polished and finished a game is, your always left with the feeling that it could be better. I know I've had that feeling with several things I've done in the past.

Right - in most of my creative endeavors it takes me a few days to settle into "that was fine - it wasn't as bad as you think". I'm proud of the progress this project made me make, but maybe am not proud of the finished product, as of now. Luckily it's up on itch and I can come back to it in a year or so and see the differences since then.

If I go and play the gamejam project me and a friend made, I can already see the gap in experience. I contacted them about trying another jam sometime - I think we'll both knock it out of the park (they've spent the last few months making a very complex population-migration simulator).

Anyway. New game?
New game:

I had this idea while talking to a friend, and it seems tangible enough for me to make it without a ton of focus over the next two/three months. The game is: just a buncha bugs


Rough sketch of what I want:

(https://imgpile.com/images/whplur.jpg)
(thanks imgpile for watermarking that)

So what the fuck are you looking at?
Well, the "game" will be a play area, a text input box, and a button to commit that text (and a button to randomize the text).
When you type in a six-letter word and press enter, an insect will be created in the play area. You can click on your bug to see some information about them. Bugs will wander around and either fight other bugs or make bug babies.

Okay...so...why?
Mostly, this is a coding exercise for myself. I want to make each six letter word a unique, but consistent moniker. The jeremy on my computer will be the same as the jeremy on your computer. This is quite possible by "hashing" the words (basically encrypting them into numbers).

I want to then take those numbers and create statistics for the bugs.

Those statistics will lead into their physical appearance (number of legs related to speed, antenna related to sensing, color related to whatever, and so on) as well as their behavior (higher fight means more aggressive, higher sensing gives them more range).

Two bugs who mate (haven't figured out the math pattern for that yet, but we'll see) will make a baby bug who is split between their names (jeremy and thomas make jermas or thoemy...let's just hope hitter and baller never mate.) The baby bug will be added to the list of random words you can pull, and it allows the players to find possibly stronger and stronger bugs.

Okay, but seriously why?
All of those qualities require a good amount of automation. The whole game should be algorithmically connected and no specific information should be added or planned by me - except maybe a list of 6-letter words.

Capumon was a lot of my own pen-and-paper additions. I want to make nearly unlimited bugs just from random words!

Also, at the end of the day, it'd be pretty fun to just write stuff like "shutup" "fucker" and "dammit" and those to turn into little bugs who fight each other.

On a final note, I actually think this will be pretty easy to pull off - and will then force myself to make it look quite solid. Animations are something I completely have no experience with, especially applying animations to proc-genned creatures. It'll be interesting!
Title: Re: Can delphonso make a game?
Post by: coalboat on December 30, 2021, 03:26:54 am
This version looks very nice! It looks not bad at all in full screen mode. The music is also adorable. I used to be able to walk the walls and now it's also fixed.

edit: The idea for the new game sounds very interesting. You might make an ant fortress eventually.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on December 30, 2021, 04:10:03 am
Liking the sounds of new game, also I like how I'm used in the example.
Title: Re: Can delphonso make a game?
Post by: delphonso on December 30, 2021, 06:18:42 am
This version looks very nice! It looks not bad at all in full screen mode. The music is also adorable. I used to be able to walk the walls and now it's also fixed.

edit: The idea for the new game sounds very interesting. You might make an ant fortress eventually.

Thanks! I appreciate it!

Liking the sounds of new game, also I like how I'm used in the example.

Shitty is a fine name. Does it run in the family?
Title: Re: Can delphonso make a better game?
Post by: Starver on December 30, 2021, 08:48:17 am
Mostly, this is a coding exercise for myself. I want to make each six letter word a unique, but consistent moniker. The jeremy on my computer will be the same as the jeremy on your computer. This is quite possible by "hashing" the words (basically encrypting them into numbers).
From my own experience in something like this, there are 95 printable characters in ASCII (far more if you support the potentially unlimited higher character sets). Though it looks like you're initially thinking of alphabetic characters only (maybe caseless, unless you want "shitty", "shiTty", "ShItTy", etc to all produce different patterns) so starting at at least 26^6 mappable word->stats combinations. Which is easily mappable to (I presume, from what I can see of your example-stats below the watermark) 20^4 unique stat-states.

In fact, by a factor of 1,930(-ish). So if it's just those four stats of 1..20 you're good with any decent hashing function, which should make "hitter", "hatter", "hutter", "hotter", etc, bounce around the phase-space of qualities (and, considering reversibility, finding the 'word' to get [20,20,20,20] will be a huge amount of trial and error. Yes, there may be ~2000 of them (like "usbiel", "hdappy", "mmmmmm", "random", "weakly", maybe), or perhaps none at all!

(Once you have come up with a basic function, you can quickly run through a wordlist of all 6-letter words (or all unique first 6-letters of all words >=6 letters) to register each of the 'landed on' stat-sets, count them up, ensure a good rough spread before you inadvertently release a game that it's virtually impossible to generate whole territories of values for, due to some mathematical quirk.)

Anyway, you'll be going for more than 4x[1..20], by the sound of it. You'll be shaving off other values for other qualities not already calculated from the [speed,love,fight,sense] values. Sexual compatability, for one. Some value that can be compared for breeding test (I suggest, to allow for the Ring Species (https://en.wikipedia.org/wiki/Ring_species) phenomenon, a value (hidden? or perhaps handily tied to body colour for the player to have insight into it?) such as 0..255 with some quickly deteriorating breedability (two creatures within n can always breed, within 2n have 50% chance, 3n have 25% chance, etc, but disregard any chance well before covering half the range).


Again, whatever you do, you'll be able to quickly run through your own code and auto-test inputs to map the distributions. At the very least do the basic maths (how many 6-character inputs there are, and how many visible+hidden independent stats there are) and make sure the dimensionality is enough to theoretically cover the latter with the former.

As to the function, I have had good results with a 'linear-feedback shift register' method. For you, maybe line up the binary of the 'seed' words (for extended-ASCII you could truncate each character to the 6 or 7 least-significant bits, to get good distribution without having to worry about multibyte characters as input). Add (XOR) a 'salt', and maybe even perform a shuffle of the bits[1]. Then run the LFSR of your choice across the bits at least once (I tend to favour as many iterations as there are bits, just to thoroughly mix up and recombine the original data, though that's overkill... ✓n iterations should be more than enough for an n-bit shifter in most well-chosen cases). Such operations should be highly efficient (and reliable), if done with bitwise operations, and knowing how to use bitwise operations is always a useful thing for a programmer. ;)


Or just hash it and then split the hash-value as needed (https://geohashing.site/geohashing/The_Algorithm), of course. But it's much less fun to just use someone else's work, even/especially if it's computationally proven to be sufficiently 'pseudorandom'.  8)





[1] Might be overkill, but if your pre-testing of inputs comes out with too much 'value bunching/desert' in the output data then a simply altered salt or shuffle, at source, should shake things up enough to give a (probably) less problematic output distribution. You don't even need to understand how it works, just test until it does!
Title: Re: Can delphonso make a better game?
Post by: WealthyRadish on December 30, 2021, 01:17:59 pm
It may be worth thinking about how to balance string-uniqueness against the evolution/genetic aspect.

A hashing algorithm (specifically a cryptographic hash) would be good if you want any slight change of text to result in a radically different bug, but it also means that "children" aren't going to be anything at all like their parents. E.g., "jordan", "jordun", and "jorden" would be nothing alike despite sharing 5 characters.

Contrast that with the other extreme having each individual character's value independently affect certain stats, and it would result in a weird meta where certain strings are always better (but you could also very easily see 'evolution' happen).



An interesting middle-ground may be to hash the two 3-digit halves of the string independently, so that attributes do still get passed down but similar 3-digit strings don't give similar results. The 3-digits could be treated as capable of generating a complete 'genome' of stats, with the final 6-digit result using some sort of average of its two 3-digit copies from its parents (or something more complicated like treating certain bit-patterns as dominant and others as recessive).
Title: Re: Can delphonso make a better game?
Post by: Starver on December 30, 2021, 02:40:54 pm
Yeah, I missed out that bit. Three characters might not be enough to 'contain' a good enough breadth of heritable values. Assuming 256^3 of the whole (base) byte times three that'd be (slightly over) 16 million, but mostly you'd have well-meaning players using [A..Z,a..z,a..z] for the first half, and not all of those 17,576 (already dangerously low compared to 4 [1..20] figures, at 160,000 possibilities) are going to be 'obvious' names. There are (apparently) between 22k and 24k six-letter words, add a few more for 'names' and then if you're recombining into "Jermas" that'll add a few more, but I can't tell you exactly how many these will add to the vanilla dictionary list, or how many of the 17.5k half-name combos will ever exist. Not without running some raw grabs of online usernames, etc.

If averaging heritable traits with the result of the next 3x[a..z] then that'll be removing a lot of potential variation in the phase-space. "JerJer" might be [20,20,0,20], if you don't salt the characters differently and the two Jer-bits both give such a pattern, but "Jeremy" or "Jerked" would likely head closer to [10,10,10,10] depending upon the "emy" or "ked" result.

Maybe this is acceptable, and by including dominant/recessive values (a single extra 'extracted' bit for the hash) you can preserve extremes[1]. But I think it'd be close to the wire. I'd consider 8-characters (in my hypothetical implementation of your game). Or maybe 7, with two lots of three-characters and a 'control' character in the central position (heritable from either parent) that contains 'choices' to resolve whether left(string,3) or right(string,3) dominates in any particular quality, etc.

Sorry, just thinking aloud. This is your project, just showing you pitfalls I've already experienced. It could be your version happens to avoid these, depending upon how exactly you implement it.





[1] Maybe one way to do this is look at Tigon/Liger genetics. A tigon inherots growth-inhibitors from both Tiger and Lion parents (not usually producing dwarfism, just preventing exceptional growth. A liger, on the other hand, inherits growth-based genes but not growth-restriction ones (or it could be an epigenetic effect, derived from the (lack of?) processes in the uteral and pre-uteral environment) so can become much larger than either parent. Implementing this deliberately in a hand-formed 'genetics' of 2x24-bit diploid system is going to be difficult. Having it as a possible emergent property[2] would be better, but run a test to check that it does emerge.

[2] e.g. all values are extracted as [bit,valuebits]. If [bit] is 0, use [valuebits] as an unsigned straight value, normalised from min...max and (your choice, per quality) where this is the second element being thrown away, averaged with the first or overwriting the first element. But if [bit] is 1 then the prior value (first three characters) or 50% mark (if this is the first three characters) is used as a starter and adjusted by the signed-value of [valuebits], normalised to [start..max] if positive or [min..start] if negative.  Adjust to taste. I'm sure you can work out better methods.
Title: Re: Can delphonso make a better game?
Post by: NJW2000 on December 30, 2021, 03:00:12 pm
Well, the game was fun, although I couldn't get crit-focused builds to work as well as damage or health gouges. Thanks for putting our dumb memes into something you put effort into!
Title: Re: Can delphonso make a better game?
Post by: delphonso on December 30, 2021, 06:31:28 pm
But it's much less fun to just use someone else's work, even/especially if it's computationally proven to be sufficiently 'pseudorandom'.  8)

Godot (blessed saint that it is) has a built-in hash function (literally just hash(string)). I'll experiment with it today and see if it results in something useful or something with any problems which need solving.

It may be worth thinking about how to balance string-uniqueness against the evolution/genetic aspect.

I've been mulling this over as well. I'm not sure if I want the offspring to be quite similar or quite different from the parents. It's hard to say. I'll concatenate a few string pieces with the built-in hash and see what we get.

Sorry, just thinking aloud. This is your project, just showing you pitfalls I've already experienced. It could be your version happens to avoid these, depending upon how exactly you implement it.

No worries - thanks to both of you for throwing out some potential problems and solutions to this idea. Even if I run with the hash function to get a prototype running - there's no reason to stick with that forever. Ideally, I can work something out to derive stats regardless of hash-length (perhaps just taking a percentage, or a set number of digits, allowing overlap if necessary).

Actually, I just had the idea of using the hashed strings as seeds for randomization. I'll test if there's some...difference in those seeds (such as on 32bit and 64bit systems {even if so, I should be able to force integer size if that becomes an issue.}) That should allow for changes to the hashing algorithm quite easily.

Well, the game was fun, although I couldn't get crit-focused builds to work as well as damage or health gouges. Thanks for putting our dumb memes into something you put effort into!

I'll double-check the code - it's quite possible I left crit-chance or damage in a state where it wouldn't expound with more mons with abilities which affect that. If that's the case, I'll edit it and re-upload.


Later today, I'll get started on a bare-bones scene. Shouldn't be particularly difficult to just sketch it out in-engine.
Title: Re: Can delphonso make a better game?
Post by: delphonso on December 30, 2021, 10:28:44 pm
It's time.

Let's get down to business:

(https://imgpile.com/images/wC97fl.png)

For this project, I won't make the window so small. I'd also like to properly implement the box containers which allow you to change the size of the UI quite easily (at the cost of some up-front time-investment.)

(https://imgpile.com/images/wC9uR3.png)

You'll notice that everything is blue again - that's because I'm using my laptop to develop this, this time. We'll see if that makes the editor more friendly. My laptop is only slightly stronger than a raspberry pi, unfortunately.

I whip together the main scene I want to have. I title it "ground" and imagine it should have a grassy texture, and perhaps - a piknik blanket.

(https://imgpile.com/images/wC91Eb.png)

We'll have a "LineEdit" - which is the sort of text box like a username/password input or search bar. Only one line. Then the two buttons - randomize and enter.

(https://imgpile.com/images/wC9nV8.png)

I add a label at the bottom that we can put an error message in - if the player tries to enter a non-six letter word, we can give them a friendly reminder here.

Pleasantly, LineEdit has a feature to limit text to a certain number of characters. Any characters pressed after the 6 is filled will be ignored.

(https://imgpile.com/images/wC94CS.png)

And...because I'm a god-damn psychopath - let's...do this.

(https://imgpile.com/images/wChjjC.png)

I toss a script onto the ground scene and connect up the buttons. I don't know if I showed it last time, but every node has a set of signals they produce, which can conveniently be connected into code. They have quite a few options - but pressed() is enough for us.

(https://imgpile.com/images/wCheAo.png)

And those become functions ready to go:

(https://imgpile.com/images/wChaMj.png)

delphonso don't do this. You're a monster.

(https://imgpile.com/images/wChZux.png)

We get two new variables here: record, which is a blank dictionary, and vermin which is a very long string of 6 letter words. We'll talk about that later. My plan for the dictionary is simple - as far as I know, hashes are specifically designed to not be reverse-engineerable. That means, you can turn strings to numbers, but can't turn those numbers back into strings. However, if we keep track of all the strings and numbers (in our database), we can match them back up later if we end up with only a hash and not the string. I'm not sure if this will be necessary in the future, but I figured I'd get ready for it just in case. We might even end up making a reverse-engineerable algorithm instead.

[I missed a screenshot here, woops]
Code: [Select]
func _ready():
vermin = vermin.split(" ")
for n in vermin.size():
record[vermin[n]] = hash(vermin[n])
linein.text = vermin[randi()%vermin.size()]
The split(" ") here is just simply making the long string into an array, cutting out all the spaces and leaving us with only the 6 letter words. It's a bit easier on me than following the array syntax.

then, we go through the array and add each bug-word to the record dictionary, connected to its respective hash. Finally, we add a random word to the text-input box because it looks a bit nicer.

Let's give it a shot.

(https://imgpile.com/images/wChpBL.png)

Uhhh what the fuck?

Well that's a nightmare. I'll deal with that in a second. Why does it look like a weird meme? At least the other stuff works. I added print(vermin) and print(record) to the end of the ready function. Here are the results.

(https://imgpile.com/images/wChEf1.png)

Hmm. Some of the hashes are of different sizes. This is to be expected, but I'm not sure what that will mean for making stats from those numbers. Number lengths seem to vary between 8 and 10, mostly favoring 8.

(https://imgpile.com/images/wCh6RP.png)

Okay, well...deleting that text box and adding a new one with the same name fixed it. I also enabled the feature which allows you to easily clear the box by pressing the x.

For the reroll button, we'll just do the exact same thing we did in the ready function.

(https://imgpile.com/images/wChgVN.png)

For the commit button, I think we'll probably need a new function there. So let's just set that up.

(https://imgpile.com/images/wChQCc.png)

Okay, let's get started on that. First things first, let's make sure it's a six letter word.


(https://imgpile.com/images/wChWAR.png)

If it is six characters (this won't care about if those are punctuation, numbers or letters, right now), we make a new bug and we run the randomize button to refill the box with a new bug (I might change this, in case the player want to just add like...20 jeremies or something.)

If not, the text is ignored, and the label we set up earlier will say "six letters, please". Then I create a 3 second timer, when that counts down, the warning message returns to "" - meaning nothing is shown and the box is effectively hidden. I then have to free the timer, otherwise we'll end up bloating the scene with timers if you keep putting in non-six-letter words.

(https://imgpile.com/images/wChBeg.png)

This is all fine and dandy, but we need some bugs, man.

Let's work on the newbug function. I changed the above text so that the commit button send the inline.text to the newbug() function, thus you'll see the new variable: newguy here.

[I also missed this screenshot]
Code: [Select]
func newbug(newguy):
if newguy in record:
print("already got it!")
else:
record[newguy] = hash(newguy)
vermin.append_array(newguy)
print("new bug added to record")

Pretty self-explanatory. If newguy is already a bug we've seen, nothing happens. We can be sure that the text coming in is 6 letters, so we don't need to check it here again. If the word is new, we add that to the record (with its hash) and append it to the array. Should be easy!

(https://imgpile.com/images/wCh0Mr.png)

Cool - checking if the bug is already on record works no problem. Let's add a new bug..."fucker"

(https://imgpile.com/images/wChkIE.png)

You motherfucker.

This was actually a very dumb mistake on my part. "append_array" does not append the array - it appends an array onto an array. The function is simply "append()", so it looks like this now instead:
            vermin.append(newguy)

And with that:

(https://imgpile.com/images/wChAcX.png)

It works! We're now creating hashes and adding them to the record - the game is also adding those words to the list that it can randomly roll. Nice!

Here, I pressed random until the word I typed in showed up, confirming that it is working as intended.

(https://imgpile.com/images/wChLBh.png)

But still. We need a bug. I think the best way to do that is to make a new scene.

(https://imgpile.com/images/wCh25a.png)

A new scene: insect. As of now, it consists of just a sprite and a label.

(https://imgpile.com/images/wCho6G.png)

At the beginning of the program, we get ready to instance it. And then we go to the newbug() function and add the following:

(https://imgpile.com/images/wChXC4.png)

A new bug is added, then added to the scene tree. Their name is whatever name was passed to commit, and they're dropped into the window somewhere (randomly within screen size, for now - a +50 was cut off at the end, with the goal of running a 25 pixel barrier along the top, so that we don't get bugs on top of our buttons.

Let's try it out!

(https://imgpile.com/images/wChH82.png)
It's beautiful

We are already approaching the desired result:

(https://imgpile.com/images/wCh8eM.png)

I ran a few more 6-letter strings through to see what sort of hashes we can expect to see. Many of them start with 4, which is interesting.

(https://imgpile.com/images/wChz2k.png)

-=-=-=-=-

A few additional notes: Here's the quick and dirty method for matching hashes to their original strings.

(https://imgpile.com/images/wChv6W.png)

I was also thinking about bugs and I would love it if I could get them to walk in a sine wave like how many ants and cockroaches usually forage:

(https://usercontent1.hubstatic.com/6953682_f520.jpg)

Spoiler (click to show/hide)


I checked the capumon code and you should be able to get about 25% crit chance at maximum - which is pretty low, considering most combats end within 6 turns. If you have a cactus in your party, you crit chance lowers, but your accuracy greatly increases.
Title: Re: Can delphonso make a better game?
Post by: Starver on December 30, 2021, 11:54:09 pm
The thing of reversing hashes to (possible, maybe not the original) hashed inputs is sometimes called a Rainbow Table (https://en.wikipedia.org/wiki/Rainbow_table). It is entirely possible for multiple inputs to have the same hash-output, but I don't think that's an issue. My advice is to not bother with this. A 'dictionary' and reverse-lookup for 22,000ish possible 6-letter words will take at least 22000x(6+4)ish bytes of memory (i.e. about 215KiB, which doesn't sound large) but may be much larger if you start recombining and adding further lookups. Merely storing the hashable word in the bug-record (and also the hash-value if you don't want to calculate this static value more than the first time) is going to far be easier on the resources.


And I reckon the apparently variable hash-length is because (as a value) it would be zero-padded at the top end. They're also probably (because they often are) really hexadecimal values as well, though you're 'looking' at them in their decimal form by default. Do you have the printf() and/or sprintf() functions in Godot? (The former formats to output, like a straight 'print', the latter formats but for further internal processing.) Using hexis=sprintf("%08X",hashis) (or whatever works for you, with appropriate variable name rewriting) should convince you of this.

0xFFFFFFFF=4294967295 (8 hex digits => 10 decimal digits) which, at a glance, I think your decimal values are all beneath, and is four bytes or a doubleword - fairly standard possibility for a hash. 0x04D400AB=81002667 (10 hex digits, the first a zero-padding => 10 decimal digits only if you double-pad the start with zeros), which I think is your lowest listed value. With just "%8X" formatting or not doing "%010d" for the decimal[1], you'll get the variable-length 'number-strings' you see.


Yes, you can probably make a hash the input seed to a rand() stream to get 'more information out than you put in', and if it's suitably 'twisty' (e.g. mersenne-twisty!) then it may look like an increase of entropy. But if you put 1, 2 3 or 4 as the only possible seeds into a PNRG then you'll get no more than 4 'unique' sequences of arbitrary length, and putting in 32-bit dword value will 'only' give you 2^32 (possibly, not guaranteed!) PRNG sequences. Should be more than enough, but adds complications when a halfway decent (semi-?)cryptographically-secure hash gives you probably most of 256^6 starting positions (or 2*(256^3)?) spready fairly 'randomly' around the 4-byte hash-space. Beyond that 'resolution' you're probably asking too much of it though it also may not be obvious to the end-user/player if you push over the limits just a little bit...


Ah, sorry again for just blurting all that out. I do like my programming theory, as you know. ;)



[1] If it's a hex value, you know you can continually mod-2 it (and shift-right, ready for the next mod-2) and always have an equal chance yes/no, etc, for the 32 times you do it. Treating it as decimal means that the most-significant-decimal is 0..4 only (and proportionately less chance of the 4 being true) at the end of your ten mod-10s.
Title: Re: Can delphonso make a better game?
Post by: Eschar on December 31, 2021, 02:25:24 am
BTW, I played the final capumon version (and beat both opponents pretty easily.) Despite its tiny size, I liked the demo/game, mainly because the various mons intrigued me. I love them

pro tip: is there a limit on how much HP your mons can gain? regardless, if you have Sundrop in your team, you can use blinding/paralyzing attacks to keep opponents at bay while Sundrop's passive pumps up your mons' HP to convenient levels

edit: i can't stop thinking about them
Title: Re: Can delphonso make a better game?
Post by: delphonso on December 31, 2021, 02:54:12 am
Do you have the printf() and/or sprintf() functions in Godot?

You're not going to believe this. This is how you print formatted strings in Godot:

var formatted_string = "Boy, this seems like %s"
var additional_string = "a bad idea."
var actual_string = formatted_string % [additional_string]

This is even worse than the usual Python stuff. There isn't a way (at least that about 30 minutes of searching documentation could find) of either grabbing the original hex or even turning the decimal integer into a hexidecimal one - though the standard library does contain methods for changing hexidecimals into decimals (named hex_to_int). I assumed hexidecimals would be an easy way of generating colors as well, for the insects' bodies - so if I can find a way to do that, it'd be great (though, I suspect we'll end up with a shit-ton of pure black or pure white bugs).

This may be grounds for me to learn how to import libraries in Godot - as the standard library doesn't really have ways of dealing with this. Otherwise, I may be able to run the conversion myself. It's also possible to use C# (and I suppose, through that, just about any C-compatible language) - which gives us another option.

BTW, I played the final capumon version (and beat both opponents pretty easily.) Despite its tiny size, I liked the demo/game, mainly because the various mons intrigued me. I love them

pro tip: is there a limit on how much HP your mons can gain? regardless, if you have Sundrop in your team, you can use blinding/paralyzing attacks to keep opponents at bay while Sundrop's passive pumps up your mons' HP to convenient levels

edit: i can't stop thinking about them

Thanks a bunch, Eschar. And no - there is NO LIMIT. I made a 3 sundrop team and ended the fight with 300 health.
Title: Re: Can delphonso make a better game?
Post by: Eschar on December 31, 2021, 03:19:37 am
Currently using an all-Sundrop team for fun. The Sundrop that I kept out of battle for most of the fight gathered up to 475 HP.

...is Sundrop's Refresh supposed to deal negative damage? it just did
Title: Re: Can delphonso make a better game?
Post by: delphonso on December 31, 2021, 04:18:15 am
You've discovered the secret of Sundrop.

Edit: by now you probably know that the lady has a new team every time.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on December 31, 2021, 04:35:22 am
Liking the sounds of new game, also I like how I'm used in the example.

Shitty is a fine name. Does it run in the family?
Yes I come from a long line of Shitties! Also how did you find this out, are you spying on me!?
Title: Re: Can delphonso make a better game?
Post by: delphonso on December 31, 2021, 05:18:19 am
Jesus fucking christ. print('%08X' % hash) works to get a hexidecimal (as a string). I always way over-think this stuff.

Something about you just screams, 'Shitty'. >:}
Title: Re: Can delphonso make a better game?
Post by: King Zultan on January 01, 2022, 03:39:34 am
Something about you just screams, 'Shitty'. >:}
Probably my award winning personality.
Title: Re: Can delphonso make a better game?
Post by: delphonso on July 31, 2022, 11:08:24 pm
Bugs are dead, long live the bugs!

I spent a few days trying to work out the math to draw an ellipse and randomly attach legs to it in different positions all pointed /out/ and also mirrored if on the left or right side of the body. Needless to say, I didn't achieve the dream, and the bugs were squashed under my boot - that is, booting a new OS, as I did many times and have certainly lost any files I might have had before (including that Smallhands PDF I was working on...for the third time now.)

Rouge.

A...uhh...red powder...made of...uhh...ferric materials...
*I squint at the back of my hand, the ink smudging under flop sweats*

Ah wait - Rogue.
Yes, a rogue-like, to be clear.

"What is a rogue-like?", asks no one, since we're all too familiar with the concept. Yes.

More importantly, I found this (https://github.com/Bozar/GodotRoguelikeTutorial/wiki) and this dude is a fan of DF, so shit, maybe I'll message them too. Now I'm a busy fella these days - what with the baby who puked all night last night, the wife, who was puked upon several times last night, a little dog, who managed to avoid the puke, a job at a kindergarten where I often encounter puke, and several succession games that I committed and just can't do because I'm too busy cleaning up puke. But hey, it's my summer holiday, babyyyy.

I've got one month, to be exact, so I'm going to do this tutorial and tutorialize what I'm doing for the lot of you and at the end of it, hopefully I'll have a little rogue-like worth being proud of. On top of that, if I finish it quick enough, we'll see how far I can extend it past what is in this tutorial, you know - add some random generation to the world or make a little world map to encounter the dungeons on (maybe a sort of...FTL format travelling system. Those seem all the rage these days.)

What am I looking for out of this?
Beyond dusting off the ol' coding skills, I'm also eager to learn about and implement classes/object-orient programming, as I believe rogue-likes tend to do well with that sort of structure, and honestly I know very little about how to use classes. 

I'd also like to put together a little sprite sheet ala curses and maybe extend it into a DF tileset that I start using. We'll see!

Anyway, I didn't sleep last night because of all that puke I mentioned, so I'm going to not do any coding today, but if the mood strikes, I'll read more of this tutorial. Wish me luck and I hope you all stick around to pitch ideas!
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 01, 2022, 03:27:01 am
Huzza your making a new game, and maybe one of the monsters could be puke based?
Title: Re: Can delphonso make a better game?
Post by: Starver on August 01, 2022, 09:02:29 am
I spent a few days trying to work out the math to draw an ellipse and randomly attach legs to it in different positions all pointed /out/ and also mirrored if on the left or right side of the body. Needless to say, I didn't achieve the dream

Is something like this useful? (https://www.geeksforgeeks.org/midpoint-ellipse-drawing-algorithm/) Or this (https://www.cs.dartmouth.edu/~doug/155.pdf)?

Probably not, as library functions do as much to get a quick render of a shape like an ellipse (even if not by the tightest and nattiest integer-maths you'd have been proud to have squeezed into your assembly code, in days of yore), and not just in axis-normal orientations (i.e. r<sub>x</sub> and r<sub>y</sub> being the key eccentricity indicators).

But if you're drawing by quadrant/octant, like that, you can decide to stop at any given ellipse-point, for a moment, and extrude the point outward from the origin into a radial 'leg'. And do that equally over left/right reflections (and/or front/back), with trivial integer pixel-hopping gradient mathematics, before plotting out more of the 'curve' until the jext opportune leg(s) position.


Not to draw you back into that sinkhole of academic curiosity, if you're now dabbling with the abstractions of OOP/etc. Although you could implement a 'fast' ellipse-drawing algorithm behind a class structure that you customise to render (or return) an arbitrary hybrid vector/raster data construct that can service a graphical output anywhere from SVG to ASCII Art... ;)

(Maybe once you've sorted your Ultimate Roguelike to your satisfaction, and/or your desire to become more disemetic again.)
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 03, 2022, 07:50:42 am
I set down my 7th cup of coffee today.
"Hey stranger. I hear you're looking for roguelikes. Well tough luck, bub!"
I stand up from my desk abruptly. I promptly fall backwards, light-headed, reaching for an stable surface to support myself. My hand falls on a few lines of jagged, poorly copied code. You think you see a finger detach and fall to the floor.
"I ain't slept in 3 days, and I ain't plannin' to any time soon," I shout from the floor, my hand gushing blood that has the same viscosity as flat cola. "You wanna see some map generation? Well go fuck yourself!"
You begin backing out of the office.
"I'm on holiday! I'm RELAXING," you hear, as you lock the door behind you and leave.

So...map generation:

Rather than warming my toes by the fire of some softball, well-practiced code, I decided to dive into the hardest part of the roguelike projects: proc-genning maps. I've never done this before and really only have a tenuous understanding of how it works.

Bozar's tutorial (https://github.com/Bozar/GodotRoguelikeTutorial/wiki) does away with this problem easily by...not doing it, basically. The end result looks like this: with only the outside boarders and the square in the middle counting as "wall".

(https://github.com/Bozar/GodotRoguelikeTutorial/wiki/Image/09/1.gif)
(taken directly from Bozar's Chapter 9)

So, I did a bit more searching and looked for a more interesting roguelike example to rip off tutorial.

I found Thoughtquake's tutorial (https://github.com/Thoughtquake/dungeon-of-recycling) to make something similar to Powder, a roguelike that I really enjoyed. Thoughtquake's tutorial is pretty short (a 40 minute video) and sort of blasts through things so it's a bit advanced for an absolute idiot like me. I was able to understand enough of their level generation code to rip it off, though, and got the following in a quick test:

(https://images2.imgbox.com/14/4b/yq6Pt5aJ_o.png) (https://imgbox.com/yq6Pt5aJ)
(https://images2.imgbox.com/94/67/nrMJRrSN_o.png) (https://imgbox.com/nrMJRrSN)

Having only procgenned one map before (a 2-d wormsish thing), I was pretty happy with the result and better yet, I understood the code! However, I think this was the wrong direction. Let's start at the beginning. Make some shitty sprites and goons and then dig into the real shit: map gen.

I'm going to follow Bozar's tutorial until the end and see what I can implement from the Powder-like game which Thoughtquake put together.

That is, if I get any time to sleep or to focus on programming, which looks like is pretty light this week.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 04, 2022, 01:37:16 am
So what kind of monsters are you thinking about for this game?
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 04, 2022, 01:44:06 am
With little time: maybe the DF classics like a kobold, elf, etc. I'd love for them to be named as well, which shouldn't be too hard to do. Chesefeebus the kobold is just a few randomized word components.

With more time, I'd love to make a Forgotten Beast style boss who is randomly generated each game. We'll see how long it takes to get there.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 04, 2022, 03:23:15 am
Sounds pretty cool, can't wait to see it happen.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 07, 2022, 09:37:39 pm
Okay, so...it's been a week and I haven't done anything. Let's get started.

Here's what I'm thinking: roguelikes are horribly violent affairs where you wake up in someones basement and kill everyone you meet until you die. Obviously some of that is appealing. But, I personally find that very exhausting and stressful (which might be intentional to the design, because then you are encouraged to play again.) Instead - I want to make a simple "overworld" where you can walk around and talk to NPCs. This also has the benefit of being very easy for me to code, so I can crack that out in an afternoon (of course, currently there's a man drilling a hole in my bathroom wall and I can't even think because of the noise).

Here's my basic outline - each box requires some amount of research/effort that is significantly different than the others.

(https://images2.imgbox.com/7c/91/LWGA5Df1_o.png) (https://imgbox.com/LWGA5Df1)

Step 1: Home
This will be quite easy. I'll set up grid-based movement (which I realize hasn't been done in this thread yet), the basics of graphics and tilesets. I'll built the basic structure of the game here, but leave out the complicated stuff like combat and dungeon gen. My hope is to do all of this today.

Caveat: "look" which is a feature of many roguelikes, is something I actually don't know how to do off the top of my head, so I'll do a bit of research on what is a good way to implement a look interaction much like DF's 'l'ook in adventure mode. This is important for me because I want to add descriptions to creatures/objects. It's easy and adds a lot of flavor to a game. See below.

Step 2: Dungeon Gen
There's a few ways to do this, but the important stuff is this:
when you enter the dungeon it gets generated based on the info we feed it from elsewhere in the code.
I want the ability to "back out" of the dungeon if things aren't going well.
The dungeon also need to ultimately lead to a goal.
A boss creature should be on each level, either roaming or sitting right by the stairs down.
The stairs down could also just be something abstract like a valve you release or a handle you crank.
I would love the ability to add NPCs to the overworld by rescuing them from the sewer. This might be too much, but can easily be added with a simple interaction and they teleport away. It feels better if they follow you/engage in combat on your side. But that's pretty complex.

Step 2.5: Automata.
I've got a friend who is pretty well-versed in this method of generation and it would be good study for me to learn how to use it to make dungeons (or really anything.) This would be a lot of research though.

Step 3: Incrementing
Making the dungeon parameters bigger is easy. Scaling enemies is tougher but still, should be okay. Scaling the character to match is...more difficult. The simple solution would be to randomly increment whatever stats you have - something like how Fire Emblem characters randomly level up.

Step 4: Ending the game
Having some goal which is communicated to the player is good. Having the goal be achievable is better. This should be simple one level generation is done (just storing values in a singleton somewhere. I'll aim at just 3 or 5 levels, but we'll see how much I can extend it after this.

As for the tutorials: rather than follow Bozar's tutorial or Thoughtquakes, I'm probably just going to cannibalize their tutorials for my own needs when I get to them. We will see how well this goes. Anyway, I whipped up some boss descriptions real quick this morning: I'm pretty satisfied with them so far.

(https://images2.imgbox.com/67/5d/KOk9bw7z_o.png) (https://imgbox.com/KOk9bw7z)
(https://images2.imgbox.com/c0/b2/gt8shKP3_o.png) (https://imgbox.com/gt8shKP3)
(https://images2.imgbox.com/ef/8a/VfvjONeH_o.png) (https://imgbox.com/VfvjONeH)
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 08, 2022, 05:19:33 am
I'm liking the sound of all that, also it seems like most roguelikes just ignore the surface.

Given that the game takes place in a sewer I feel that a turd man should be one of the enemies we have to fight.
Title: Re: Can delphonso make a better game?
Post by: Starver on August 08, 2022, 08:28:26 am
I'm liking the sound of all that, also it seems like most roguelikes just ignore the surface.

Given that the game takes place in a sewer I feel that a turd man should be one of the enemies we have to fight.
...to the accompaniment of zither-music?

(And "...smells of elderberries" has got to go into the boss-description mix. ;) )
Title: Re: Can delphonso make a better game?
Post by: brewer bob on August 08, 2022, 08:44:42 am
Instead - I want to make a simple "overworld" where you can walk around and talk to NPCs.

I wish more games would concentrate on this part instead of murderhobos on power-trips, which gets really boring really fast.

(Ultima IV had a clever way of dealing with this problem, (https://en.wikipedia.org/wiki/Ultima_IV:_Quest_of_the_Avatar#Virtues) but I don't know if the same has been done much since then.)
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 09, 2022, 02:42:06 am
I'm pretty hung over, so...this isn't gonna be very detailed. Just an fyi, bruvv.

So - what did I get done yesterday? Not heaps, honestly. It felt great to get back into the coding mindset, and the boss description generation was a nice and easy starting point.

Gridbased movement:

So, to establish grid based movement, you just make everything locked to a certain number of pixels. Since I took a 24x24 DF tileset (This one! (http://dwarffortresswiki.org/index.php/Tileset_repository#Curses_square_24.png)) to get started, everything is locked to 24 pixels. This movement handling is the tidiest I've ever made it, as well:

Code: [Select]
const GRIDSIZE = 24
var moveinput = {
"right" : Vector2.RIGHT,
"left" : Vector2.LEFT,
"up" : Vector2.UP,
"down" : Vector2.DOWN
}
onready var ray = $RayCast2D
var movement = Vector2.ZERO

func _ready():
position = position.snapped(Vector2.ONE * GRIDSIZE)

func _unhandled_input(event):
for dir in moveinput.keys():
if event.is_action_pressed(dir):
move(dir)

func move(dir):
ray.cast_to = moveinput[dir] * GRIDSIZE
ray.force_raycast_update()
if !ray.is_colliding():
position += moveinput[dir] * GRIDSIZE

Simply, we have all the direction keys you could press and their objective direction (Vector2.LEFT is always left on the screen). When you press a key, you shoot a raycast out to the next square over. If that raycast collides with something, then you don't move there. Otherwise, you'll move. Simple as!

The benefit of this is that I can use Godot's built-in collisions this way. Otherwise, I'd need to make some sort of game-board-manager which checks if you're moving into an occupied space or not. This might become an issue when we run into pathing enemies - but we'll cross that bridge when we come to it.

I drew some shapes (some with collisions and some without) on the game map and moved our character around. I also added a HUD level and camera which follows the player. All those basically work out the box and require no modification. A similar text box to what I used in Capumon is thrown at the bottom giving information on inputs for now. Yesterday, the movement stuff didn't work.

(https://images2.imgbox.com/70/48/cAYG5oAt_o.png) (https://imgbox.com/cAYG5oAt)

I mean - it worked, but it worked weird. You could walk through the top most walls, and also you'd get caught on some geometry and wouldn't be able to move freely - this was especially bad down by the wall/dude where there's only one space free in between. So...why not? The code certainly looks right.

(https://images2.imgbox.com/96/47/LOb84Jvu_o.png) (https://imgbox.com/LOb84Jvu)

Unfortunately, I'm an idiot and left the raycast (the little arrow) on the top left corner. Meaning, it was casting out from there and checking the top corner of the nearest square. Obviously this meant it acted weird and not like the collision is intended. I move the ray-cast to position 12,12 - i.e. the dead center of the character. Now we're all good. So, let's make an overworld.

(https://images2.imgbox.com/32/67/nhQt8o8t_o.png) (https://imgbox.com/nhQt8o8t)

I draw a quick little DF-style town and give a clear outline borderwall. The town is just about the right size, I think. I'll add some things to discover here at some point. Now, you may have noticed that everything is really fucking pink. Godot is a game engine and not really an image editor, so although it may have been possible to convert the pink (actually "magenta", rgb 255, 0, 255) to transparent in the game code, I decided this was a bad idea and installed a terminal-based tool called "imagemagick". A quick command later (>mogrify -transparent "rgb(255,0,255)" curse24.png) and the pink is gone!

(https://images2.imgbox.com/80/06/z1PlmPgv_o.png) (https://imgbox.com/z1PlmPgv)

Now... let's add some basic talking/dialogue.

I assign the "ui_accept" button (Enter) to be the "talk" command. You'll need to be next to someone to talk to them. Because of how I built the town's tilemap and NPCs (namely, they're all just one giant continuous object), it'll be hard to make that ray-cast do the heavy lifting and talk to people. When we get to the dungeon, we'll probably need to set a separate tilemap for monsters, so the game knows what we're doing. We'll see, though - as that's a bit down the road. Enter, right now, just shouts out to no one if you're not next to someone:

(https://images2.imgbox.com/8e/96/G1v2oaps_o.png) (https://imgbox.com/G1v2oaps)

Instead of using the ray-cast, I opt for an Area2D - which we used many times in capumon. An area has collision but does not do anything but check if something entered or exited that area. It's generally designed for collectables like coins in a Mario-like. I'll be using it to check if you're near enough to someone to talk to them.

(https://images2.imgbox.com/77/fc/ipruZs2K_o.png) (https://imgbox.com/ipruZs2K)

Of course, the Area2D is looking to see if ANYTHING collides with it, which would include the little guy and the walls behind it. So, I made some quick adjustments and now the wall and NPC is ignored by the Area2D, but they still offer collision for the player.

(https://images2.imgbox.com/6c/24/pliyH6gj_o.png) (https://imgbox.com/pliyH6gj)

All this does is check if the body which entered the area is a TileMap or not. Since the player isn't, you're all good.

As you can see, the dialogue is the same color as the walls and is immediately lost. I'm going to modulate both colors until I find something that is readable and still feels Rogue-y. Okay, back to drinking water and laying in bed for me.

Don't drink, kids.

Don't drink kids, either.

I'm liking the sound of all that, also it seems like most roguelikes just ignore the surface.

Given that the game takes place in a sewer I feel that a turd man should be one of the enemies we have to fight.

I know some of the classic rogues had the surface be the actual goal of the game - though I think many of them were more about moving levels down/up a dungeon/tower. Also, yes to golgothan turdman.

(And "...smells of elderberries" has got to go into the boss-description mix. ;) )

Love this. I find that sort of random generation endlessly fun. It also helps it's piss-easy in code.

I wish more games would concentrate on this part instead of murderhobos on power-trips, which gets really boring really fast.

(Ultima IV had a clever way of dealing with this problem, (https://en.wikipedia.org/wiki/Ultima_IV:_Quest_of_the_Avatar#Virtues) but I don't know if the same has been done much since then.)

I sort of understand it from a classic rogue perspective. Your character was going to die and probably pretty soon, so wasting time interacting with NPCs, etc, probably wasn't what people were interested in. I don't really understand it in a modern context where almost all rogue-likes tend to have a way for your character to keep going.

The Ultima stuff is a really interesting read. It seems Ultima was one of those franchises that really kept trying different things with its systems, rather than sticking to the same formula and just iterating it slightly each time. Very cool stuff.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 09, 2022, 03:09:50 am
Looking like a pretty cool game already, also it's really surprising how fast a game can come together.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 09, 2022, 07:09:28 am
Yeah, whipping up a scene like this is pretty quick, especially with ASCII obfuscating a lot and making it simple visually. Handling movement and such is simple, too, as it should be, since Godot has so much built-in to help with this kind of thing.

When baby falls asleep, I'll see if I can't implement a quick and easy Look function to the game. I've got an idea of how to do it just like DF does.

EDIT: I got one working but I sent it to a friend for a second opinion. It's...fine.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 09, 2022, 10:54:28 pm
Okay, so I made a look function that I'm probably going to offload the talk function to as well.

Before that, I'll mention that I tried to find a color scheme that works and these certainly do not. I'll...work on it. It's better, though - because you can actually read the text, although just barely.

(https://images2.imgbox.com/9d/e2/xWJxeqS5_o.png) (https://imgbox.com/xWJxeqS5)

The way this works is pretty simple - when you press 'L', the game reveals a little X reticle which starts in the same position as the player. When you move, it uses the same function to move, but ignores collision and also only moves the cursor and the camera along with it. The player stays where it was.

(https://images2.imgbox.com/65/c7/kq3k47KE_o.png) (https://imgbox.com/kq3k47KE)

When you press escape, everything resets. It's pretty simply just reusing the code that's already there and adding a few conditionals. But moving an X around the screen doesn't have a lot of functionality unless it knows what it's looking at. So.

(https://images2.imgbox.com/27/52/XyIxh7GH_o.png) (https://imgbox.com/XyIxh7GH)

Here's an enum. I didn't use this in capumon - but the idea is that you replace numbers with words so your code is easier to read. Here, we have a list of all the tiles in the tilemap - in order. Normally, I could address these with tilemap[0], for example, to get the dwarf smiley. Instead now we know it's a guy if we're looking at that.

(https://images2.imgbox.com/25/55/4hTRbSAI_o.png) (https://imgbox.com/4hTRbSAI)

So then, we iterate over the x and y coordinates of the screen and check if any of those tiles are a Guy or a Traveller (the dwarf warrior sprite). If they are, we add them to a list of the coordinates of guys.

We take that list an generate names for them using a simple combination like "Id" + "man" = Idman.
I just add that to the end of this initialization process.

(https://images2.imgbox.com/cb/ef/PEYTPgyI_o.png) (https://imgbox.com/PEYTPgyI)

In the global, we check if the look reticle is at the same global position as the guys are - and if so, we're looking at a guy! So we pass that back down the chain to the player's textbox and update it.

(https://images2.imgbox.com/0a/37/IxH5Ok29_o.png) (https://imgbox.com/IxH5Ok29)

And so - now we can look!

(https://images2.imgbox.com/72/0e/G2UIS8NJ_o.png) (https://imgbox.com/G2UIS8NJ)

I'll likely use this same method to add descriptions to tables, statues and the like. It'd be nice to just look at them in the terminal, and get more detail for statues/dudes when you press enter - but that's some logic I'll need to set up first.

Now, when you press Enter while the look reticle is on a guy, we get their name and a brief description (the description is the same for everyone currently, but should be easy to extend.)

(https://images2.imgbox.com/9b/87/tMmlpspr_o.png) (https://imgbox.com/tMmlpspr)

This is exactly like how we talked to things in Capumon - a screen pops up over the rest of the screen, and displays text it gets from the global.

(https://images2.imgbox.com/55/ea/saxzq4Du_o.png) (https://imgbox.com/saxzq4Du)

and here, I've just moved the talk function from the textbox to that same screen - it's still not finished. Unfortunately, because the Area2D handles whether you're in talking distance or not, it doesn't know which guy you're talking to. This is why I might shift it all to the same thing as the "look" function and just have it be a different key that gives a slightly different function when you press Enter. We'll see.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 10, 2022, 02:05:17 am
I'm kind of hyped about this game and all you can do right now is talk and look at stuff.

Are the NPCs gonna be the same every game or are you gonna randomly generate names and disruptions every time?
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 10, 2022, 03:26:32 am
Hoping to randomly generate descriptions and maybe some of the dialogue. We'll see what I have time for. I have an index of all the NPCs and the game automatically fills in some information when you talk or look at them, so it should be easy to just set up a few personality descriptions, a few physical descriptions, and a bit of dialogue and spread it out across everyone. We might end up with a silent protagonist because of this, but for now that's fine. Unsure if it should be the same guy every time who tells you to go to the sewer, or if it's more fun for that to be spread out as well (but perhaps guaranteed)

I just got the 'k' talk menu to work. Currently, I'll leave it at that and work on the next step, as that's basically everything needed for step one. I can go back and flesh this stuff out later. It's more important to build the bigger skeleton for now. Feels insane that this is basically only three days of work. Part of that is that we're doing a lot of stuff I've done before in Capumon, and I'm just shaking rust off. From here on out, I'll be going into new territory, which should be a lot slower but also a lot more rewarding. Hopefully I can generate some random dungeon rooms by the end of the week.

Still undecided on whether I should add some sort of fog-of-war in dungeon mode, or just bring the camera way deeper in... We'll see what happens, but probably one or the other will be necessary. Not to mention limiting the movement of the "look/talk" function - because currently it's completely unlimited.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 10, 2022, 05:54:33 am
What do you plan on the dungeon looking like?
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 10, 2022, 09:30:20 am
What do you plan on the dungeon looking like?

Sort of like this bird drinking a soda.
(https://images2.imgbox.com/a8/0e/SZDPog1b_o.png) (https://imgbox.com/SZDPog1b)

So, you may have guessed that I seem to have gotten it.

I decided, after a brief discussion with my local search engine, that a walker generator was the one for me. Come, friends, and explore this marvel with me.
I watched a few videos on walker generation, but found Heartbeasts'  (https://github.com/uheartbeast/walker-level-gen)to be the best. You can find the repo for his stuff there - which I might need to dig into further to solve future problems.

So a walker is pretty simple - you start on a square, then move any of the cardinal directions. If you hit a wall, you turn. We'll also suggest it turn randomly and if it walks too far in one line. This is probably what dwarves with a fell mood do in DF when they're looking for someone to kill - though this time, we'll be storing the history of all those steps and painting a map with that history afterwards. Let's go through it...ahem...step by step.

Please, please, hold your applause.

(https://images2.imgbox.com/63/60/ytV1VvxB_o.png) (https://imgbox.com/ytV1VvxB)

So a walker essentially needs these three functions - the first one is the walk - where we walk a number of steps (roughly, map size). The second is the step function to check if we've walked outside the borders we want to go. Third is the direction changing algorithm, which will narrow the options down so you don't get stuck trying to walk into a corner for ages.

The top of the script looks like this:

(https://images2.imgbox.com/99/5a/YmrN3KXl_o.png) (https://imgbox.com/YmrN3KXl)

This is the first time I've done a custom class in Godot (and honestly, one of the few times in my life). Basically, we're building a node like the many that Godot offers already. I should note that this is only a script in Godot, it is not attached to anything, and isn't autoloaded like a global - it's just a new type of node we're adding to the project: a Walker node (by class_name).

We set up the directions we can go, our starting position and starting direction (just right for no real reason), and tell Godot what to expect for "borders" - we'll get into that later.

Our step_history array is what we'll actually be sending back out from all the functions here. It'll be a collection of coordinates recalling where our "walker" went. steps_since_turn is renamed to straightsteps later and is just there to keep track of how far we walk. It'll be important to contrast hallwayness which will control how far is the upper limit before we force the walker to turn. I set it to 6 to begin with.

The _init() should be real familiar if you did anything in Python before. This is something like "onready", but also allows the use of arguments from other parts of the program. It's just going to run this stuff first. We're going to make sure we can start in the starting position that we feed the walker elsewhere in the code. We'll also record our starting position as the first step in our step history.

Turning is the easiest to understand, so let's start there.

(https://images2.imgbox.com/c7/26/iQlkrNJ5_o.png) (https://imgbox.com/iQlkrNJ5)

If we turned, our straightsteps is going to be reset. We then duplicate the collection of possible directions, erase whichever one was previously tried (we'll only turn after taking at least one step, and if not, it'll just remove turning right from the rotation), shuffle the directions and then pop_front one of them. pop_front is something you're going to see me use again later when we need to give an NPC dialogue directing the player, but can make the rest of the dialogue random. It takes the first thing in an array, adds it to the variable, then removes it from the array.

that is:
if this array is [69, 420, blazeit, lol]
var mynumber = array.pop_front()

The end result will be
mynumber = 69
array = [420, blazeit, lol]

Again, we want to remove it from the array because if it doesn't work, there's no need to erase it again, we can just try again. That's what the while at the bottom does - if we hit the wall with that turn, we'll just turn again. A walker can walk over itself, so if it's a rectangle that we're working in, we'll eventually find a way to go.

Let's work on steps next.

(https://images2.imgbox.com/0a/eb/ufo7YH52_o.png) (https://imgbox.com/ufo7YH52)

Our next step is going to be where ever we are plus the direction we want to go (default is right, but if we turned, it'll be something else.) We check if there's space within the borders (that's what has_point means), and if so, we move that way, add one to our step counter, and add the new coordinates to our step_history. We also return true, so the rest of the program knows we were able to take a step. If we couldn't (say, if the step was out of bounds), then we'll return false to let the program know it was impossible to go that way.

So let's put it all together in the walk program itself.

(https://images2.imgbox.com/47/07/5JlPMwlb_o.png) (https://imgbox.com/5JlPMwlb)

Walk takes an argument of "steps" which will be how long we want the walker to keep walking. This is roughly how big the level will be, but can also relate to openness - since the walker is pretty likely to walk over itself a couple times as it approaches a corner. We iterate over those steps, and see if we should turn (a random chance, and also a hard maximum with hallwayness), then we return the step_history which should contain everything we've done.
(eagle-eyed readers will notice the fatal flaws I made here)

With the walker done, let's make a quick scene of a Node2D and set it up!

(https://images2.imgbox.com/ef/5f/AvXMfE92_o.png) (https://imgbox.com/AvXMfE92)
I got the borders here in units of 24x24 - so at 1032x600, our window size is 43x25 units. I've put a 1 block border around the outside, leaving us with 41,23 for the interior rectangle. This could really be anything, since the camera follows the player - so the size is really just how much space do we want the walker to work with.

We add a new Walker to the scene! Since we defined it by class_name, the engine treats it like any other node, and we can call the functions in it immediately. Remember, it's waiting for a starting position and border size.

(https://images2.imgbox.com/f8/76/dmS1Kifb_o.png) (https://imgbox.com/dmS1Kifb)

We set the starting position to roughly the center of the screen, but I might experiment with putting that start somewhere in a corner. We then give it that rectangle to walk around it. We call for 500 steps which will return that step_history to our new variable: map. we then get rid of the walker, since we don't need it. We then iterate over the map (which is just a bunch of coordinates like (24,13), (25,13), (25,12)) and paint a floor texture there from our tilemap.

I also set it so pressing Enter will regen a map. I did this in a separate project than Sewerkings proper, so it's only doing this map-gen. Oh baby, we're ready to go!

(https://images2.imgbox.com/37/7e/JDdPuPbC_o.png) (https://imgbox.com/JDdPuPbC)

Well that's not very good.

So clearly something was broken. What's the best way to fix things? Print, baby!

(https://images2.imgbox.com/ea/26/4UeTPMj0_o.png) (https://imgbox.com/4UeTPMj0)

And run it one more time!

(https://images2.imgbox.com/1a/a5/mJA9yHHf_o.png) (https://imgbox.com/mJA9yHHf)

Okay, so it's not turning. Well...why would that be...

It took me a bit to realize what I'd done. In the original walk function, you can see I put the return in the for loop:

(https://images2.imgbox.com/47/07/5JlPMwlb_o.png) (https://imgbox.com/5JlPMwlb)

And since it queue_frees as soon as it gets that variable assignment, it was killing itself after literally one step. I added an additional conditional as a safety net as well:

(https://images2.imgbox.com/de/3a/2iLyWJQe_o.png) (https://imgbox.com/2iLyWJQe)

Now the return is in the right place, and it'll turn if all else fails (for whatever reason).

Now behold! Glorious sewer!

(https://images2.imgbox.com/f8/b3/F6qxQBAU_o.png) (https://imgbox.com/F6qxQBAU)

I futzed with the settings and feel pretty good about 20% chance to randomly turn and hallwayness at 3 - so it pretty regularly goes 3 steps, but not always.

Starting tomorrow, I'll need to put together how to add players and end-goals to this map we've made, but that's a problem for tomorrow delphonso.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 11, 2022, 03:24:22 am
That's a fancy looking sewer generator you got there.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 11, 2022, 08:27:33 am
Ahead of schedule:

Since that walker gen gives us a list of all the coordinates that are now floor, we just check which one has the highest and lowest X value and then we're left with the left and right-most locations, which become the player's starting location and a goal-point.

I did just a bit of work to link everything back up so now we have a basic game loop. The player can enter the sewer and get back out of it. So - what now?

I zoomed the camera in by 50% and detached the camera from the look/talk reticle - which means you can technically look all over the map, but you'll only get info in the textbox, and have to keep track of where you're looking yourself - this is a de facto view limiter. I'll work on it eventually.

I don't have a lot to share because all I did today was a lot of prototyping of name, description, and dialogue generation which I should be able to implement tomorrow (then release a playable demo for anyone who wants to.) Since I now have a good idea on the formula to do so, I'm making a bit more content at the moment (just a few extra descriptions, names, etc)

So here's the question - what to do with combat?

Classic rogue combat is just bumping enemies and rolling dice - which I'm sure I can implement quite quickly.

But what if...what if something more exciting?

Since I'm ahead of schedule and haven't done anything to set up combat yet, now is a great time to prototype a different combat system than the classic rogue bump. A zelda-like action RPG sword would be terrible in the grid-based format we have, so that's out.

Or is it?

What's with all these rhetorical questions?
Don't answer that!

You ever played Earthbound?
Answer that one yes! Using some simple path-finding, we can make enemies run at the player, or just let them mill about the level. Running into an enemy can take us to a new battle scene, and that can be whatever we want.

Old school Final Fantasy-like combat would be fun to test and would also benefit from having party-members discovered in the sewer. However it is only interesting when deeply complex, and as we saw with Capumon - that complexity is very quickly exponential.

Something simple like tic-tac-toe or rock-paper-scissors is simple and pretty fun - but also either crushingly easy to defeat or purely luck-based.

Godot can handle big groups of npcs fighting each other, so maybe something with 10 vs 10 teams or something - again, these are pretty passive, so they end up being luck-based or barely tactical.

I'm not really sure here and very open to combat suggestions.

As I said, I'll try to implement the dialogue, description, and name systems tomorrow and put it up on Itch.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 11, 2022, 10:06:52 pm
It's here: PLAY NOW!!! (https://delphonso.itch.io/sewer-kings)

Let me know if you run into any horrid export errors or loop bugs. It should be okay, but honestly the testing has been minor.

Someone is hammering a new hole into our bathroom wall, so it's a bit hard to focus on writing up what I did this morning: long story short, I only tied up loose ends. I'm going to try to prototype a auto-battler combat system today. If it feels good, the new loop will be that the boss fight is available at all times, so sewer diving would just be to defeat and thus collect monsters to build up your own team.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 12, 2022, 04:01:23 am
Sounds exciting, I kind like the sound of having a big party and fighting a whole bunch of monsters at one time.


Also why is someone hammering a hole into your bathroom wall?
Title: Re: Can delphonso make a better game?
Post by: Starver on August 12, 2022, 06:45:52 am
(It's either the voyeurs next door, or the plughole has been in the wrong place since the house was blown onto its side There are no more possibilities, it's definitely one or the other.)
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 12, 2022, 07:24:28 am
We've had a series of issues with our water heater, electricity, and a pesky bathtub that was in the way. Whether this was orchestrated by voyeurs or not...remains to be seen.
God Willing, everything is done.

So, I have a working prototype for an autobattler, which my wife found so fun that I had to kick her off the computer so I could get back to work on it, which is a good sign. A friend found two big errors in that playable version (one being a boolean error that means you can't get back to the sewers), so I'll fix those up over the weekend and hopefully have basically an entire game on Monday.

Before going forward, I've noticed that progress on this project has been incredibly fast, which I attribute to the prototype-then-implement process I've been doing.

Reflecting on Capumon, which was the biggest project I'd ever made, I also tried to build everything inside what I already had. This meant I was trying to squeeze things in, link them together, and breaking them both in the process. I'd get an error on an emptied array, only tangentially related to what I was focusing on, then have to fix that before continuing. Or I'd have to scramble some code in one place to quicken testing, then unscramble it later - or scramble more than expected because it's all connected.

This time, I've made every 'next step' as a separate project, got it working to where I wanted it, then figured out how to slide it into the code I had. This might be intuitive for experienced devs, but is sadly something I've had to figure out on my own. It has meant that I can really iron out local, technical issues and - knowing the game's codebase - recognize specific struggles I might run into which aren't present in the prototype. I could prepare for implementation because it already worked, rather than struggling to get it working while also implementing it.

I'm also doing a lot more 'get it working enough' and less 'get it finished'. For example, the look function I made was 'complete', but rife with errors such as - after looking at someone pressing Enter anywhere would...look at them again. I decided to leave it at this, because I was sure I would rewrite it later anyway (as I did for this release). In Capumon, I certainly rewrote a lot of things which I'm dodging a lot better now.

Anyway, I feel amazing about the progress and confident in my own abilities, in a much different way than Capumon. It's also been a struggle to make these logs because I'm getting so much done in one sitting - just an hour or two and I'll have three or four major topics to address.

Either a bit later tonight or sometime tomorrow I'll recap what I did today/yesterday.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 13, 2022, 03:05:48 am
so I'll fix those up over the weekend and hopefully have basically an entire game on Monday.
Damn son you make this stuff seem so easy, this game seems to be coming along way faster than the last one.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 13, 2022, 05:03:11 am
so I'll fix those up over the weekend and hopefully have basically an entire game on Monday.
Damn son you make this stuff seem so easy, this game seems to be coming along way faster than the last one.

Stumbling over all those stones on Capumon really paid off. It also helps that this game is a lot less technically complex and is also much more in line with what Godot is meant for - so, for much of this, I can rely on built-in features rather than having to build them myself.

Okay, Sewer Kings:

So previously I made a class object (naming convention still escapes me, so this is likely the wrong terminology) - which is effectively a node that can do some operations for us given certain information. I took the same idea and made a more regular class: an NPC.

(https://images2.imgbox.com/7b/0d/V0PB9yGM_o.png) (https://imgbox.com/V0PB9yGM)

This is a Godot Reference - which isn't a Node. The difference? Heck buddy, if you figure it out please tell me because I have no fucking clue. You'll notice, I also didn't declare this as a class. I'm not sure if I'll be using the same structure for enemies - so I left it as its own thing for now.

What it does is quite simple - it takes a random description, name, and dialogue text from whatever arrays we feed it from the outside. I sat down and made a bit of content for each category.

About 12 first and last names:
(https://images2.imgbox.com/9a/f4/kbNngtD9_o.png) (https://imgbox.com/kbNngtD9)

Ten or so dialogues (really, it's a monologue, since the protagonist remains silent)
(https://images2.imgbox.com/8a/09/tPglyH5A_o.png) (https://imgbox.com/tPglyH5A)

And then several descriptors, which I decided to break up into three parts:
(https://images2.imgbox.com/ce/b0/JxGsAUCK_o.png) (https://imgbox.com/JxGsAUCK)

When you start a new game, the game will go through the list, grabbing a first name and a last name at random, then removing both from the rotation, so that we don't get any repeats.

(https://images2.imgbox.com/93/56/kKR5FA0x_o.png) (https://imgbox.com/kKR5FA0x)
You'll notice it's reliant on the size of the first names list. I'll add a conditional here later so it will operate correctly if the last name list happens to be shorter than the long name list. You'll also notice that this will make 12 unique names only - which isn't many, but is a lot with such a small cast so far.

Since I decided to cut up the descriptions into three parts - I also decided that it's fine if some of these repeat (unlike dialogue and names, which shouldn't repeat). I move all these description parts into the Reference itself, then grab three at random and attach a pronoun to them. So now it'll read something like:

Here we have delphonso.
He is tall and thick around the middle.
He smells of cheap wine...on a good day.
He has a tendency to obsess over one topic for weeks or months at a time before moving to the next one.

(https://images2.imgbox.com/29/14/pUeOpvft_o.png) (https://imgbox.com/pUeOpvft)

This also means we only need to pass two lists to the NPC Reference, now. One full of names and one full of dialogue. These need to remain outside the Reference, because the Reference is going to be checked for every NPC we make - so it would be quite difficult to modify the lists if they're not outside of it.

Okay, let's make NPCs!

(https://images2.imgbox.com/75/07/Iw87Oz2A_o.png) (https://imgbox.com/Iw87Oz2A)

First we see how many NPCs are on the homeworld map,
Then, for each of those, we make a new NPC by sending the dialogue and namelist to the Reference.
What we get is a new object that has a name, description, and dialogue.
We add that to a dictionary of NPCs.
We then erase that dialogue and name from the list and start again.

The dictionary of NPCs is indexed by coordinates, so it looks like this:

(24,13) : name="delphonso", description="He looks like shit", dialog="Oh no, I pooped my pants"
(25,13) : name="Urist", description="A short, sturdy creature fond of drink and industry", dialog="So the kestrel and the kobold..."

Except description is actually an array of 3 description sentences. More like, description[0] = "He looks like shit.", description[1] = "He smells like shit.", description[2] = "He is shit."

You may have noticed I called for the global a lot here. Like - A LOT. Don't worry, I realized that as I was getting started, finished it to test it, then moved it over to the global. It now rests comfortably there, with most other functions in the game.

(https://images2.imgbox.com/cf/58/TICvhHey_o.png) (https://imgbox.com/TICvhHey)

This is also only adding NPCs to the game based on the number I've placed in the home-town (something I expected to change, but haven't and it's growing on me how it is). I added this function for adding new NPCs should we ever want to. For now, it just does nothing.

(https://images2.imgbox.com/a6/5d/CfEKjR6r_o.png) (https://imgbox.com/CfEKjR6r)

Finally, I grabbed the right-most position in the dungeon and added a different symbol to it. I gave that position a collision that sends you back to the hometown.

(https://images2.imgbox.com/5c/36/yE2OANGV_o.png) (https://imgbox.com/yE2OANGV)

Before releasing it on itch, I also modified some of the colors and have hit a more generic rogue-green with dark background for the textlog. I'll keep messing with it.
Spoiler: Meet the NPC: Gilli! (click to show/hide)

Oh, I also cleaned up the Look and Talk function so they now use the same function, but flip a boolean whether you're looking or talking to someone.

Okay,
Sewer Combat!

For the sewer combat I decided to abandon the grid-based movement and just have critters/warriors move on a pixel-by-pixel basis. I simply put two buttons down that say "Add Ally" and "Add Enemy". This is just a prototype, remember. The whole thing consists of a tilemap to build the walls and floors, two positions for spawning enemies/allies, and that's all.

First thing's first - get the enemies to target the good guys.

(https://images2.imgbox.com/47/cd/OT8TF2Gz_o.png) (https://imgbox.com/OT8TF2Gz)

The enemies grab their parent(the arena, effectively), then grab the list of allies that the arena keeps track of. They target ally_list[0], which will always be the ally that has been around the longest. Here you see a lot of dudes rushing down a dude who isn't moving.

(https://images2.imgbox.com/29/75/K68QUcnH_o.png) (https://imgbox.com/K68QUcnH)

Now, we add the same logic in reverse to the allies. Now that's what I call a real battle! Just a bunch of happy dudes shoving each other around.

(https://images2.imgbox.com/15/0e/oTOAYfPu_o.png) (https://imgbox.com/oTOAYfPu)

Oh god, they got knives!

Now both teams spawn with weapons which they rotate around themselves (I can add a swing motion later, but there's something silly about all these guys wind-milling at each other). If a weapon hits someone on the opposite team, that member is deleted. I also added a win/lose screen that prompted the player to start again. This is what my wife found so appealing - trying to keep the violence going as long as possible. This is a cry for help from me, delphonso.

I also changed it so the pawns now target a random member of the opposite team, which changes occasionally, and means they tend to move toward the middle of the pack every time. I'll tweak this as well, as it sometimes looks pretty buggy - although it's effective for now.

I added some HP to units, then variable damage. I can pretty simply add a defensive value (damage reduction) as well.

It's enjoyable to watch, but would also be over real quickly in regular play. I'm not expecting the player to have more than just something like this on the field:

    @     k
k    ë
@   
         g

As of now, I'm thinking of how to make this more engaging for the player. I've got two ideas currently, both of which should easily slot into what I have now.

Option 1:
Rally Points:
The player remains engaged as they have some control over the positioning of their team and can tell them to move to certain areas of the map - this works best if the map has more obstacles, which would mean more pathfinding intelligence on my part.

Option 2:
Rematch!:
Instead of finer control, the player has zero control and is just betting on RNG. When you start a combat, you'll have 3 retries. You'll also be shown the reward, should you win: Let's say "3 kobolds added to your team". You can rematch any time before combat finishes, and if you do, the reward is reduced. This should make even fights way more exciting - as you hover over the rematch button praying that Cheeslfeebus can kill that last kestrel.

Not sure which one to go with, but I think both are decently good ideas. Implementing both might be possible, but depends how much work I want to put in - how much work it takes to add this to the game.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 14, 2022, 05:01:08 am
For the sewer combat I decided to abandon the grid-based movement
Blasphemer!


I'm really liking the direction you've gone with the descriptions and stuff, do you plan on doing the same with the monsters, also there's something quite amusing about the windmills of death thing you've got going in that one picture.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 15, 2022, 01:43:46 am
I managed to make prototypes of both ideas this morning. I'm getting a couple friends to playtest both tonight and should be able to shuffle one or the other off to itch tomorrow so you guys can play.
Title: Re: Can delphonso make a better game?
Post by: bloop_bleep on August 15, 2022, 01:53:31 am
PTW, didn't know this was a thing you were doing!
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 15, 2022, 02:09:23 am
I managed to make prototypes of both ideas this morning.
Which ideas?
Title: Re: Can delphonso make a better game?
Post by: EuchreJack on August 16, 2022, 05:14:50 pm
The game won't let me pick up the sword and armor and kill everyone. BOO!

Otherwise, I enjoyed walking around and talking to people.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 20, 2022, 06:02:29 am
Crashing and burning as the heatwave finally came for me and my family. We're without AC or fans. Send help.

So, I managed to make monsters wander around the dungeon randomly - using a simple algorithm to see if there is space for them to walk. No sprites yet and no collision leading to a combat scene. I'm nearing the end of this holiday, so this might just be something I try and blast through in the next couple days.

Which ideas?

So I managed to get working versions of both the "give commands" version and the "gamble on bigger winnings" version. This might have actually been what really burned me out: making two versions of combat, one of which won't be used. The gamble version isn't actually as exciting as I had hoped, however the team-building mechanics I quickly implemented are satisfying enough. The ability to control your units (as one big mob), is engaging enough to make combat something to not just slog through, but to actually enjoy a bit.

PTW, didn't know this was a thing you were doing!

Thanks, hoping to do more in this thread. I might start a bigger, slower project, and to post weekly instead of trying to go daily.

The game won't let me pick up the sword and armor and kill everyone. BOO!

Otherwise, I enjoyed walking around and talking to people.

Killing people in town is a stretch goal. Thanks, glad you enjoyed that part.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 21, 2022, 05:11:03 am
Sounds like this is gonna be a fancy game with those two combat systems.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 22, 2022, 08:31:10 pm
Okay, so I have been working on this in the background, and just not keeping logs of what I've done. Most of this was me sitting in a sweaty room trying to figure out how I want combat to work and I finally decided to just fucking make something and be done with it. That's it boyos. I'm trying to finish this game today.

I want content complete by the end of my day, or else, leave my own badge and gun on the table.

So what have I done recently?

(https://images2.imgbox.com/17/2c/TwrQoDnF_o.png) (https://imgbox.com/TwrQoDnF)

I made several arrays full of positions of stuff in the town so now the look command can do this:

(https://images2.imgbox.com/73/b0/egFRG4RO_o.png) (https://imgbox.com/egFRG4RO)

This was done with a lot of conditionals that I don't think were very well-done, but hey. It works.

Here's what the main town looks like now:

(https://images2.imgbox.com/32/12/a0agUX5i_o.png) (https://imgbox.com/a0agUX5i)

If you played the demo for a bit you probably noticed that it's broken. There was a boolean error on returning to the town that made it impossible to go back to the sewers. So now I've added that check to the scene manager instead of attaching it to the player.

(https://images2.imgbox.com/d3/a8/BVAJBDXE_o.png) (https://imgbox.com/BVAJBDXE)

You'll also see that difficulty increases every time you return. I connected that difficulty to dungeon size and number of enemies, and will also connect it to something like stats, I think.

I've also made it that the Sewer Kings are accessible at any time after the first time you've gone to the sewers. I'm a fan of this model of game: Here's the boss, you can fight it at any time, go get yourself ready for it.

Speaking of getting ready for it, I laid out some more of the infrastructure I'll need once I get to that point:

(https://images2.imgbox.com/30/a0/65OoWFv3_o.png) (https://imgbox.com/65OoWFv3)

I also set up a dictionary to keep track of the sprites I'll use for enemies and allies - these coordinates relate to the region of the tileset.

(https://images2.imgbox.com/98/df/Xax0lzzV_o.png) (https://imgbox.com/Xax0lzzV)

Inside the dungeon we now also have enemies who wander randomly:

(https://images2.imgbox.com/10/47/ANuzyAHm_o.png) (https://imgbox.com/ANuzyAHm)

This uses a pretty bad method which is just to make sure they don't walk into the same square as each other or into the player. Their movement is just random, unfortunately. But as I was researching A* movement, I decided it was unnecessary for what this is supposed to be - just goons wandering and whether you want to fight them or not is up to you.

(https://images2.imgbox.com/ec/63/unJG2MVQ_o.png) (https://imgbox.com/unJG2MVQ)

I also made it so the textbox is visible if you're inside the dungeon. The top header is lost, which is fine.

(https://images2.imgbox.com/ff/7e/YftklXsu_o.png) (https://imgbox.com/YftklXsu)

The camera/textbox/ui in general is all slightly off center, so shrinking it down just made things look real bad. Here, I ended up manually setting the location. Unhappy about it, but couldn't find a quicker solution programmatically.

I'll need to change the dialogue to reflect the game better, now that the design has changed slightly. I'll hold off on that until I've finished the combat system, etc, so I don't have to do that work more than twice.

Hoping to have it done today, then polish it for a day or two afterwards. Oh, also have to make music/sound effects.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 23, 2022, 04:05:08 am
Sounds fancy getting sound and sound affects, will there be battle music?
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 23, 2022, 04:09:14 am
Yeah, there should be.

I'm calling it for the day. I managed to get everything hooked up, so now battles are a thing you can do. Just gotta hook up the boss fights tomorrow, then we're done.

Music and sound effects are easy, and also relaxing and enjoyable, so this should be playable real soon.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 23, 2022, 04:20:00 am
The hype is building.
Title: Re: Can delphonso make a better game?
Post by: EuchreJack on August 23, 2022, 10:41:37 am
(https://c.tenor.com/O2_2ZuhrDHsAAAAC/hga-giraffe.gif)
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 24, 2022, 01:02:22 am
The hype was too high, my daughter didn't sleep last night.

Running on 3 hours of sleep, I decided it'd be a good idea to work on this and actually managed to not fuck everything up. Fixed a bug or two and linked up the unique Sewer King dungeon to the main town. The game is now roughly complete, though there is no end point, fail state, or consequences for failing. That's a problem for tomorrow delphonso.

Quick to-do list while I'm still vertical:

Add losing screen with "restart game" button (upon losing every member of the team or losing against a Sewer King).
Add consequence for losing a battle.
Add description to Sewer Kings.
Fix line error on battle-textbox.
Add right-click to cancel commands.

Once that short list is done, I'll post it on itch and you guys can playtest it for me while I work on sound and polish. Originally I felt I was way ahead of schedule, but that seems to have caught up to me.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 24, 2022, 02:52:00 am
Oh damn the hype was to high and to soon.

Also you seem ahead of schedule to me as I figured this would take months but you've got almost all of it done in a few weeks.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 25, 2022, 01:39:11 am
Also you seem ahead of schedule to me as I figured this would take months but you've got almost all of it done in a few weeks.

The stuff that I thought would take longer, took a lot less time, and the stuff that I thought would be easy ended up destroying me. Still happy to have gotten this much done in this short of a time. This game feels more like a gamejam game than I would like, but corners have constantly been cut.

Let's check the list:

Add losing screen with "restart game" button (upon losing every member of the team or losing against a Sewer King).
Add consequence for losing a battle.

Add description to Sewer Kings.
Fix line error on battle-textbox.
Add right-click to cancel commands.


Descriptions are still not done, you'd get a generic one but I realized that the text box for the sewer kings fight is...well it's slightly off the screen. Sorry.

When you play:
After going into the sewer once, the entrance to the sewer kings will open (this is in the building right across from the spawn point). This is still pretty unclear and I'll try to clean it up later.

HERE!!! (https://delphonso.itch.io/sewer-kings)

Tomorrow: either music and sound or go hiking with my wife. Depends on the weather, really.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 25, 2022, 04:31:57 am
Pretty cool game, haven't managed to kill a sewer king yet, but I figured a guy and a bunch of snakes didn't stand much of a chance.


There are two weird things I noticed when playing, when talking to people if you push the space bar the background gets darker, and the other is that the enemies don't wonder around for the most part and instead they stand in place and vibrate.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 25, 2022, 04:46:21 am
Are they wandering at all? If not, I think a last minute bugfix I did broke it.

I can fix the darkening screen thing easy.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 25, 2022, 04:56:50 am
Some of them wonder but most just seem to stand there, I don't think they're getting stuck in hallways because I've seen a few standing out in the open not moving around.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 25, 2022, 05:33:24 am
Hmm. I'll tweak it. They're on a timer which is pretty brief, but still feels slow compared to traditional roguelikes. I can set it that they move every time you do too. They shouldn't be standing around (well, Sewer Kings do) if they're in the open, as the only reason they don't move is if the square they tried to move to is a wall.

That could have been something to do with the bug I fixed.

Occasionally, enemies would wander onto the stairwell, which, if you also moved onto it, would cause you to go into other dimensions, superimposing the dungeon and the battle and the main town all on top of each other. It was fun until combat ended and the whole game crashed.
Title: Re: Can delphonso make a better game?
Post by: EuchreJack on August 26, 2022, 01:54:18 am
I liked how you get recruits after battle. Haven't quite figured out the battle system itself yet.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 26, 2022, 03:51:27 am
I also haven't really figured out combat.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 26, 2022, 05:55:03 am
There's a slight bit of timing that commanding your units can help out with, but otherwise there's not much strategy to be had. Mostly you just watch your dudes fight.

Whoever you last recruited is the first to flee, so there's quite a bit of luck on if you end up battling ogres (guaranteed loss, basically) right after getting a great unit like a croc.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 27, 2022, 01:28:10 am
Does that mean ogres are stronger than the sewer kings?
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 27, 2022, 02:36:39 am
Does that mean ogres are stronger than the sewer kings?

Individually, no, but you run into like...8 of them.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 29, 2022, 04:13:21 am
Anybody got any left over motivation? I can't seem to find mine. This point in the game dev process if just doing work. Link up this menu here, connect this button there, copy and paste the audio manager from Capumon, and we're dusted.

Just did a little bit today, weekend was a no-go. Should be done-done very soon, but it's just a bit more polished than what we've played before. Might add some greater variation to the mob size when you run into units, just to give you the chance to capture an Ogre by sending like twenty rats at it. We'll see. Algorithmically, it should be easy.

All music and sound effects have been made. Just need linking up.
Title: Re: Can delphonso make a better game?
Post by: eerr on August 29, 2022, 09:49:06 am
Anybody got any left over motivation? I can't seem to find mine. This point in the game dev process if just doing work. Link up this menu here, connect this button there, copy and paste the audio manager from Capumon, and we're dusted.

Just did a little bit today, weekend was a no-go. Should be done-done very soon, but it's just a bit more polished than what we've played before. Might add some greater variation to the mob size when you run into units, just to give you the chance to capture an Ogre by sending like twenty rats at it. We'll see. Algorithmically, it should be easy.

All music and sound effects have been made. Just need linking up.

The easy motivation is to see something happen, so go for something easy and visual.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 29, 2022, 09:59:59 pm
Okay, it's done! Well, as done as it's going to be! I'll do one final bug-fixing pass if you guys find anything egregious.

HERE!!! (https://delphonso.itch.io/sewer-kings)

Now the game has music and sounds (Since combats start and end so quickly, it gets a bit annoying to listen to the opening of the sewer song over and over...). There's now a main menu and a more detailed win/failure state. The enemies have been rebalanced so now it's possible to collect Ogres and Cave Lobsters. Many enemies have been tweaked, including new names. NPC dialogue has been updated to reflect the game, better. This will need another pass if I do a bug-fixing run.

Hope you enjoy!

I'm going to go get a vasectomy today, so...uhhh...I might be a bit ornery if the feedback is negative.

EDIT: okay, everything should be good to go on itch
Title: Re: Can delphonso make a better game?
Post by: bloop_bleep on August 30, 2022, 12:07:33 am
this has no business being this fun

EDIT: Although, it appears I have an encountered a bug. By the time I get a chungus army and try to fight another muck creature, it crashes, saying something like "You lost! Kobold has left your party. You won! Kobold has joined your party." Then I can't move at all, though I can look and talk. In the inspect element console, this error appears:

Code: [Select]
SCRIPT ERROR: Invalid get index '8' (on base: 'Array'). index.js:362:18
   at: _ready (res://goon_arena.gdc:22) - Invalid get index '8' (on base: 'Array').


Title: Re: Can delphonso make a better game?
Post by: delphonso on August 30, 2022, 01:22:17 am
Aye, someone reported a similar bug, where they can see two character windows, basically.

I know what happened - it's looking for the strongest creature to add to the list, but that happens to be beyond the list length. Easy fix. I'll make the adjustment and reupload in two minutes.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 30, 2022, 01:37:13 am
Okay, the web version should be fixed. I'm updating the other ones now.

Music also doesn't loop, even though I thought I had programmed it to. Ah well, next bug fix pass.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 30, 2022, 04:07:01 am
I didn't notice any bugs when I played through it, and I even managed to kill all of the sewer kings!


And I liked the music in the game, didn't notice any of it not looping.

Also I found the sound affect that played when things died funny for some reason.
Title: Re: Can delphonso make a better game?
Post by: brewer bob on August 30, 2022, 10:03:23 am
Okay, the web version should be fixed. I'm updating the other ones now.

Just tried the web version. Was surprisingly entertaining (also, loved the music!).

Got a crash eventually though, I think I ran into the same bug that bloop_bleep described.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 30, 2022, 06:22:10 pm
Yeah, a friend ran into it too. I'll attempt to track it down when I get the chance.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 30, 2022, 10:38:07 pm
Ah, got it. I was using enemy_list.size() as a backup index (if the random index was too high), but since the array has 8 things in it, it'd return 8, but the index starts at zero, so enemy_list[8] is null.

Fixed and should be unlimitedly playable now (until you expand the dungeon far enough that it grows outside the bounds of the tilemap.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 31, 2022, 03:37:33 am
until you expand the dungeon far enough that it grows outside the bounds of the tilemap.
What does this mean?
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 31, 2022, 04:33:25 am
So the way the dungeon generation works, there is a big rectangle of walls in the tile-set. The dungeon generator carves hallways into it with the floor tile.

Each time you dive into the dungeon, it gets a bit bigger and a bit longer, so eventually it will break out of the large rectangle I put in there. I don't know how long that will take, either. I guess a very long time.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on August 31, 2022, 04:46:10 am
That makes sense.
Title: Re: Can delphonso make a better game?
Post by: Starver on August 31, 2022, 05:40:30 am
Easily done, easily learnt from. Often a language has a "what actually is the last index value" function/call[1], but often you just need to remember that arrays (often[2]!) are zero-footed and thus length-minus-one at the top end.

Then you go on to fail in even more creative and hard to unravel ways. It's the law!



[1] Perl has $#thisIsAnArray that gives one less than the number returned from int(@thisIsAnArray), which means that foreach my $index (0..$#array) { … } works directly (or does if you don't have an altered $[, but that's now deprecated and so ($[..$#array) is probably an unneccessary safeguard) without having to worry about doing the int(@…)-1 in every case where it is necessary but never where it absolutely isn't. ;)

[2] I think not so in Fortran, though I never really used it. Trying to remember what COBOL does (probably 1-based arrays, given the target audience, but it was 30+ years ago I last did an "ENVIRONMENT DIVISION" in anger, and the rest, so I might have the wrong idea/be now outdated). And different dialects of BASIC certainly have had different ideas. But probably anything 'modern' (and ultimately descended from C, like so many of the various modern code-dialects are) has zeroed in upon being 0-based if there's been no competing design considerations getting in the way.
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 31, 2022, 06:09:07 am
Yeah, I had set it to size() and just didn't think twice about it. I'm sure python/godot script has a '.last_index()' or something similar but I just threw it to size minus 1.
Title: Re: Can delphonso make a better game?
Post by: eerr on August 31, 2022, 11:42:53 am
Neat!

A gripping tale of man against monster.

but uh, are you planning on making more?
Title: Re: Can delphonso make a better game?
Post by: delphonso on August 31, 2022, 01:52:09 pm
Nah, not really. The depth you see here is probably all I'll get up to. There's a few things I wanted to add, but am returning to work tomorrow and also have hit a spat of poor motivation/mild depression, which is making coming up with solutions pretty tough. Depending on how work goes the next few days, I'll do one final polish pass and be done.

I've got plans for a longer-term project, but that remains pretty nebulous. When that does kick off, this thread will be renamed for sure.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on September 01, 2022, 02:55:50 am
I've got plans for a longer-term project, but that remains pretty nebulous. When that does kick off, this thread will be renamed for sure.
Sounds exciting, what kind of thing will it be?
Title: Re: Can delphonso make a better game?
Post by: eerr on September 01, 2022, 10:19:47 am
The controls on capumon are giving me trouble.
The mouse can't be re-centered.

The game also locked up. I used dirty dog, then got hit to like 1hp, then used mustard, and the game locked up with 'you need to switch'
Title: Re: Can delphonso make a better game?
Post by: delphonso on September 01, 2022, 11:15:33 pm
It do be that way.

Capumon is honestly very poorly coded, with Sewer Kings only being slightly better on that front. The biggest issue with Capumon, is that it runs in a daisy-chain of functions, and, as you experienced, occasionally that chain breaks when something unexpected happens.

I've got plans for a longer-term project, but that remains pretty nebulous. When that does kick off, this thread will be renamed for sure.
Sounds exciting, what kind of thing will it be?

I'm hoping, actually, to make a commercial product next (still free, just commercial quality) over the next few months. I think this is completely possible given my current skill, because I know how to implement the desired mechanics simply and reliably, and the rest is just like...art and level design. It'd be a clone of Legend of the River King, but I'll do some more thinking on it about how to make that model of game more interesting/desirable.

In the mean time, I want to do this during the month of September: freecodecamp (https://www.freecodecamp.org/)
My fundamental skills are pretty poor, and I've just gotten highly specialized in the stuff I know how to do in Godot/python. This would help me out a lot for things like when I just want to build a quick bash script to modify some files at work. Currently, it's impossible for me to understand Stack Exchange/Overflow answers because of the different assumptions/difference of vocabulary. I think it's also a necessary investment for me to better learn how to structure complex code systems, because, as Capumon shows - I'm not good at that.
Title: Re: Can delphonso make a better game?
Post by: King Zultan on September 02, 2022, 04:03:09 am
A RPG fishing game sounds like it'd be an interesting thing, kind of excited for that.


In the mean time, I want to do this during the month of September: freecodecamp (https://www.freecodecamp.org/)
It's always good to improve your skills, after you take that course are you gonna continue to use Godot or will you switch to something new?
Title: Re: Can delphonso make a better game?
Post by: delphonso on September 02, 2022, 05:09:34 am
As I plan to stick to 2D, I'll stay in Godot. If I ever work in 3D, I might change engines, but everyone is praying the next version of Godot will be competitive when it comes to 3D development, so we'll see.
Title: Re: Can delphonso make a better game?
Post by: Starver on September 02, 2022, 05:25:58 am
the next version of Godot
...of course, everybody is waiting for that...
Title: Re: Can delphonso make a better game?
Post by: delphonso on September 02, 2022, 06:48:47 am
One day, 4.0 will be here and we'll never need another engine.

(Godot does update pretty regularly. I started with 3.2, Capumon was 3.3, Sewer Kings, 3.4, and 3.5 is already out)
Title: Re: Can delphonso make a better game?
Post by: King Zultan on September 03, 2022, 04:49:00 am
I recently played a 3D game that was made using Godot and even though the graphics weren't the greatest but I enjoyed the game, didn't say what version of Godot they used though but it did show you could make a commercial game with the engine the way it is now.


In case anyone is wondering the game is Bunker 21 and it's a phone game.
Title: Re: Can delphonso make a better game?
Post by: Starver on September 03, 2022, 02:01:37 pm
You could probably do a DOOM-like (basically a 2.5D drawing method, graphically optimised as visually vertical slices based upon a 2D (plan) map with floor/ceiling limits.

In fact, you could probably do what Descent (https://en.wikipedia.org/wiki/Descent_(video_game)) did and free up the player/view-window to have freedom across the entire six-axis range.

'All' you need to do is to write the "3D data to 2D rendering" in a fast enough manner to not mind that you don't have native direct-to-3D rendering capabilities. And before 3D-acceleration (or DirectX 3D, etc) everyone did that kind of thing in raw code of one kind or another. It's not quite a lost art.

Whether you could get Godot to do it quickly enough to rival (say) the latest Spiderman release is doubtful. But I bet you could get a decent (low-res but sufficient) environment with effort. (Could mean a lot of effort, reinventing wheels or hunting down the documented wheelwrights of times past.)
Title: Re: Can delphonso make a better game?
Post by: delphonso on September 06, 2022, 01:25:49 am
It's not quite a lost art.

I recently watched a video of someone creating a 3D engine using ASCII in C++ which was beautiful. The end result was Doom hallways, but with #'s making up the walls. There's a lot of tricks and tips you can do to squeeze performance out of Godot, but it's missing some of the easy resource savers (for example, all objects are "rendered" {wrong term, perhaps} in a scene even when the player isn't looking at it, or it's blocked by something else.) That's one of the bigger updates in 3.5, easier automation of that, but it's still up to the dev to implement the method of doing so.

but it did show you could make a commercial game with the engine the way it is now.

Yeah, this is pretty true. I've seen a handful of things made with Godot that I would say are impressive. The real reason I'm shying from 3D is asset creation. It's exponentially more work to make a 3D model with animations than a pixel sprite sheet. It's something I want to learn, and hey, maybe that'll be the focus of whatever I do after this.

What's this, you ask?

Well, here's my stated goal: Make a clone of River King and release it on itch as if it were a commercial product, rather than just like...a thing I did.

What's River King, you ask?

(https://midcurrent.com/wp-content/uploads/2018/01/River-King_400.jpg)

Oh wait wrong one, but I might want to read that as research. The real River King:

(https://www.mobygames.com/images/covers/l/257188-legend-of-the-river-king-gb-game-boy-front-cover.png)(https://webgames.host/uploads/2016/11/legend-of-the-river-king-2.jpg)
(I refuse to believe there are any more games in this series, especially not one on the DS.)

So Legend of the River King is a cute game. The basic idea is that your sister fell asleep really hard and the only way to wake her up is to ask a fish to do it, so you go on an adventure to find The River King and put a hook through his mouth. There's some basic RPG elements, but the originals were all about catching fish, selling fish, buying way too specific fishing equipment and enjoying the country-side.

The graphics of the old game were...well, I'd say a bit blocky and rough.

(https://s.uvlist.net/75150/screenshot/Legend%20of%20the%20River%20King%20GBC%20(Game%20Boy%20Color).jpg)

It also has the unpleasant UI of old gameboy games (and honestly the newer ones aren't much snappier). But at the core, it's a lovely peaceful experience with chipper music and a satisfying fishing game loop.

So why make a clone?

Because. I can make it more satisfying. I can make it even more chipper. I'm gonna cram so much cuteness down your cramhole you won't know what hit you.

Here's what I'm thinking, actually. I played the DS one recently, as it's the worst of the lot - and my intention there was to see /why/ was it the worst of the lot. Here's my synopsis:

Spoiler (click to show/hide)

I could talk for actual hours about how bad the quest design is in Mystic Valley, but I won't be doing that now.

Here's my idea for the game loop:
This is about resource management. You catch fish to sell to spend money on bait to catch fish.

Should you fail at fishing often enough, you'll run out of money. In such a situation, you either use a net (baitless) and scoop up some bait fish from the shallows, or you forage in the forest for worms/bugs and get beset by rats or whatever that trigger Final Fantasy style combat. I could scrap this second idea because it's seeming more and more pointless and would only be added as homage to the original games. Of course, winning combat would reward you with bait/money.

The idea here is the flexibility of using a net and a rod. While playing Mystic Valley, I would sit there with the bobber in the stream, waiting for something to bite and I'd see a fish just collide with the shore and mill about there. I really just wanted a net to walk over there and scoop it up. Which would break the main issue I have while playing River King: mainly, you just stand in the same spot and burn through all your bait, then go back to town. At least now there's something else for you to do, if you want to.

I'll keep hammering these ideas out, so any suggestions are appreciated.

-=#-=#-=#-=#-=#-=#-=#-=#-=#-=#-=#-=#-=

So today (because the teachers are required to come back, but the kids aren't allowed to come back to school because of a recent outbreak of covid), I had no work to do at all. With my time, I decided to make a very basic game to try to express the loop. I don't think it captures what I was trying to do, but it's good practice iron out what I want in 2D movement and methods to determine if you're fishing in shallows or depths. Anyway:

(https://images2.imgbox.com/38/46/fF9RAUf6_o.png) (https://imgbox.com/fF9RAUf6)

Here's our map. We've got a small pond with a shore (light blue) and a deeper section (the darker blue), plus a patch of exposed dirt. We also have a small nudist.

(https://images2.imgbox.com/f2/05/d90s7W1q_o.png) (https://imgbox.com/d90s7W1q)

I've determined these are the things we want to do in the game. Let's associate some keys to these actions.

(https://images2.imgbox.com/ef/ab/PzkmVqC8_o.png) (https://imgbox.com/PzkmVqC8)

Luckily, we're going to scrap all this eventually because I absolutely hate all of the names I've given stuff.

I make some crappy net and rod/bobber sprites out of the Godot logo and give them a brief time of existence when you press their respective button:

(https://images2.imgbox.com/c4/37/s2wNQ7Z2_o.png) (https://imgbox.com/s2wNQ7Z2)

When that timer runs out, it runs this function:

(https://images2.imgbox.com/df/62/CCXyLESN_o.png) (https://imgbox.com/CCXyLESN)

I end up having to do this twice, and really what I want is to use a state machine. I'll get into what that is more next time I write an update. Either way, we end up with our bobber and net existing for a brief time and I attached an area to both of them. Because of the way Godot works, I can check if the area the rod/net enters is the depths or shallows, and I print a message if it is the right one!

(https://images2.imgbox.com/b7/fc/QMoy81Yi_o.png) (https://imgbox.com/QMoy81Yi)

This requires setting up the correct collisions. Eventually, I settled on using the Layers built in to Godot. Basically: collisions can occur on one or multiple levels. I set level 1 to be present for everything except the walkable terrain - so our player won't walk into the water, but can walk everywhere else. The shallows is collision 2, which is also what the net is. The depths are collision 3, same as the rod. If they're not in the same collision layer, they don't interact, so we merely have to check if they ran into a body.

I wrote a quite rotation check for whenever you press left-right-up-or-down, with points the rod/net in that same direction. It's a bit silly because rapidly tapping left and right makes you catch several fish on a single cast.

(https://images2.imgbox.com/16/73/pVSvEAEw_o.png) (https://imgbox.com/pVSvEAEw)

Finally, since the dirt is an unusual shape, I establish another Area, and give it a complex polygon collision. I drew that by hand, and now the game knows if you're on the exposed dirt or not.

(https://images2.imgbox.com/f7/96/h06rtc6s_o.png) (https://imgbox.com/h06rtc6s)

Finally, I added a basic game loop - digging for worms can cause a rat to attack you, lowering your health and ending the game.

(https://images2.imgbox.com/4c/96/2ZugfADJ_o.png) (https://imgbox.com/2ZugfADJ)

If you want to play, go ahead here (https://delphonso.itch.io/delph)! It's only in-browser, as this isn't really worth a full export process. This was a useful experience because I know I /don't/ want to code it in this way and will instead do some research on state machines.



I want to play the PS2 River King, though it might take some effort to emulate it. I mean, legitimately obtain a copy and system.

(http://images.nintendolife.com/reviews/3ds-eshop/legend_of_the_river_king_2_gbc/1280x720.jpg)
Title: Re: Can delphonso make a commercial game?
Post by: EuchreJack on September 06, 2022, 02:37:27 am
...that was strangely enjoyable.

ProTip: Only fish with a net.  While it's fun to find worms and fish with a rod, the rats will kill you.  And you get the same fish.
I like laughing at the stupid fish swimming into my net.  Stupid fishies, you didn't even get a free meal.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on September 06, 2022, 02:55:36 am
It hates me, I can't play it for some reason, says something about not being able to load the body.


Anyway when you say fishing on the sea shore are we gonna be fishing from the shore or a pier? Will there be boats to fish the deepest parts of lakes and the ocean? Also how in depth are you gonna make the rod just be generic rod or are there gonna be various different rods, and will there be various different bobbers, types of line, lures, weighs, and other such things?
Title: Re: Can delphonso make a commercial game?
Post by: EuchreJack on September 06, 2022, 02:59:12 am
It hates me, I can't play it for some reason, says something about not being able to load the body.


Anyway when you say fishing on the sea shore are we gonna be fishing from the shore or a pier? Will there be boats to fish the deepest parts of lakes and the ocean? Also how in depth are you gonna make the rod just be generic rod or are there gonna be various different rods, and will there be various different bobbers, types of line, lures, weighs, and other such things?

Also, what kinds of watercraft will be available? Will we be able to upgrade from rowboats to motorboats? Can we get Fish Finder Sonar?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on September 06, 2022, 03:18:07 am
Zultan, if you can copy and paste whatever error you're getting, we might be able to help you. I hadn't thought about it, but there might be something in the html files that is exporting it in 64 bit, for example.

Ideally, seaside fishing would be scooping up crabbos or mullets or some other baitfish from tide pools with a net and then casting from the shore or a pier. This depends on how I obtain or create assets, essentially.

Boats and watercraft are probably not going to be included, although a rowboat was in the original game. I'll look into it and try to plan for it when designing movement controls. It should be easy enough to just turn off the player's collision or something, using the layers I have already got some experience with.

Fish Finder shouldn't be necessary, as you'll be able to see the silhouette of the fish in the water.

As for rods and equipment, that'll take some research from me, as I'm not actually a fisher. Of the dome, I was considering this:
Rods would improve casting distance (allowing for the really good lake and sea fish to be caught more often)
Lines would have a strength quality, allowing you to make more mistakes/be more aggressive while fishing, and probably allow access to otherwise uncatchable strong swimmers.
Bait should have an area of effect and draw fish in. I love the idea of getting some legendary bait (a Master Bait, if you will), that as soon as you cast, you see every fish on the map swim toward your hook.


Basically the only limitation to how complex and specific rod and kit assembly can be is how creative I can be with the impact such items would have on fishing. There's also a degree where it becomes exhausting rather than enjoyable, especially at the beginning, when you're already figuring out a new game.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on September 06, 2022, 03:31:43 am
Zultan, if you can copy and paste whatever error you're getting, we might be able to help you. I hadn't thought about it, but there might be something in the html files that is exporting it in 64 bit, for example.
response.body is undefined, is the message it gives not really sure what it means.


Also will there just be a hand held net or will there also be a cast net?


Ether way it all sounds exciting.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on September 06, 2022, 07:29:58 am
...that was strangely enjoyable.

Yup.

After trying fishing, took a stroll and walked out the game screen. Almost got lost after zig-zagging blindly, but found me way back.

You might want to put barriers or something on the screen edges to prevent players roaming out of view. Or maybe it was intentional to allow it? :D
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on September 06, 2022, 08:16:49 am
I like the idea of lowly hand-net which returns paltry bait all the time slowly evolving to fully trawling the ocean for thousands of fish at a time. We'll see how boats go, first.

Haha, oh yeah. Well it's all getting scrapped anyway, but good reminder. You Bay12ers all have an insatiable urge to walk through walls and off the map...
Title: Re: Can delphonso make a better game?
Post by: Starver on September 06, 2022, 09:16:29 am
There's a lot of tricks and tips you can do to squeeze performance out of Godot, but it's missing some of the easy resource savers (for example, all objects are "rendered" {wrong term, perhaps} in a scene even when the player isn't looking at it, or it's blocked by something else.)
...start with one object (as the viewport scene... though 'permanent' HUD elements can overlay it) , a canvas (or, to emmulate the ASCII-Doom, a text-window) and then paint upon the image object your blocks of colour (or print your ASCII), rather than spawning or unhiding graphical objects..?

...I'm theorising. Godot is probably optomised for object abstraction so that scripting leading to visible object-shuffling is rapid, and may yet inadvertently leave roadblocks on the way to any 'direct to screen' processing that ought to be superfast code but requires you to do all the initial point/vertex/area clipping (viewport frustra, portals, anti-portals, etc) or at least some form of initial 'minimum bounding box' position-checking.

If it was easy, though, everybody would be doing it all the time. ;) So I'm mostly just hand-waving how I might pursue it, with no intent to get my own hands dirty. (I don't know, though... If I dig up my old Delphi project folder I might be able to... No! That way lies madness!!!  :P )

Anyway, carry on with your more sensible ideas. /wanders off, mumbling to self.
Title: Re: Can delphonso make a commercial game?
Post by: Laterigrade on September 06, 2022, 08:27:30 pm
is Godot good?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on September 06, 2022, 10:25:23 pm
is Godot good?

I think it's possibly the best engine if you're coming in with no coding experience. Godot requires that you code, so you have to learn by doing. It's python's syntax, which makes it pretty easy to read, and the built-in features like bug catching and autocomplete are robust and very useful.

You can do a lot in the graphical engine, but eventually you need to code and that's just sort of necessary to make games. If you've already got coding experience, another engine might be better. Unity's got some weirdness with rights and distribution now, but it's popular for a reason (it uses C#, if I'm not mistaken)

You're actually dead-on Starver. The whole scene tree system for Godot should make it easy to free up resources and reinstantiate them when visible/needed, but all of it requires some savvy and planning on the dev's part. Whenever I try to mess with the scene tree, I have a tendency to crash my ganes by freeing something that is in an array somewhere, for example.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on September 21, 2022, 11:01:32 pm
Workload tripled out of nowhere and so haven't had time to do any coding or really any leisure activities. New teachers interviewed today, so potentially that's another two weeks and then I'll be back to a breezy job with plenty of time to code. I finished only one of the tasks of FreeCodeCamp - with (I think) 5 required to finish a course and earn a certificate. I'd like to get back to that too. It's all HTML and CSS at the start, which aren't really my jams, but hey - it's good to know anyway (also it's piss easy).
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on September 22, 2022, 02:45:17 am
Sorry to hear about your work doing that, hope things get less work intensive for you soon.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on October 07, 2022, 10:13:37 pm
Well I've got a bit of free time today, so let's make some fish.

I chuck together a pond using the same assets I used before. I also make a fish silhouette - it has 4 frames of animation, but I couldn't get it to look right, so instead it's just on the first frame.

The fish consists of a small collision shape, a sprite, a ray-caster, and a position. The position is slightly ahead of the fish's center, which I use to move the fish around after rotation.

After all that, we need to make the fish swim around. How to do this easily and autonomously? Well, let's use states.

(https://images2.imgbox.com/4c/c4/zlk2B8Gt_o.png) (https://imgbox.com/zlk2B8Gt)

We're going to use 3 states for now - that's swimming, turning and resting. We'll begin on rest and set a timer to 0.

Next we need to determine what is happening during those states. I decided on the following:

(https://images2.imgbox.com/2c/4c/6uHXXbWe_o.png) (https://imgbox.com/6uHXXbWe)

While resting, it's really doing nothing - just counting up until it's time to move. If I had done animations properly, I'd include something here to make the fish idly swim in place - perhaps a bit slower.

The fish then turns a random amount, but always clockwise for now. When they're done turning, they flip a coin and either swim or continue to rest. I'm not really sure why I did this beyond just adding more variation in the fish.

(https://images2.imgbox.com/aa/21/abyVYHjN_o.png) (https://imgbox.com/abyVYHjN)

Swimming is pretty straight-forward. They raycast to the position attached to the fish, and if it collides, then they don't swim. If it doesn't collide, they take a step forward. Since the position is just ahead of center, it follows correctly when they are rotated. This was probably the hardest part to figure out and this is a really easy solution.

(https://images2.imgbox.com/cc/77/wQDMv9M6_o.png) (https://imgbox.com/wQDMv9M6)

Fish unfortunately appear to beach themselves because the tilemap only has grid collisions, and the "shore" is all water, even though a third or more of it appears to be ground. Either way, the game is able to process all the collisions without me needing to do much work there.

I add in a simple function to left-click to spawn another fish. If you spawn a lot in the same spot, they'll all collide with each other and be unable to swim away. The same happens if you place them on the ground. Ah well.

Behold! Glorious bounty!

(https://images2.imgbox.com/a5/0f/IPpYHmU4_o.png) (https://imgbox.com/IPpYHmU4)




You can play here, browser exclusive! (https://delphonso.itch.io/delph)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on October 08, 2022, 03:18:26 am
That last picture looks like a small puddle filled with tadpoles.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on October 14, 2022, 11:42:45 pm
https://itch.io/jam/godot-wild-jam-50

Let's do it.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on October 15, 2022, 02:44:16 am
You gonna participate, the theme and wild cards sound interesting.


But is eight days gonna be enough for you to get game made?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on October 15, 2022, 04:01:22 am
You gonna participate, the theme and wild cards sound interesting.


But is eight days gonna be enough for you to get game made?

I've already committed. Someone is making the music for me. I have serious doubts 8 days is enough, but we'll see. I'll try to prototype something tomorrow. Gotta post Spookyfort tonight, too.

Let's just say what I have in mind will look familiar.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on October 15, 2022, 04:47:54 am
Oooo exciting.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on October 16, 2022, 11:54:34 pm
It's bugs (https://delphonso.itch.io/delph), bitch.

There's two crashes that occur, which you can just take as "winning the game" - because they're both related to there being too few bugs on the screen. This is just done enough to send to the music guy, which was my goal for today. Also sometimes they all go off to the top left.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on October 17, 2022, 04:29:24 am
It seems to hate me because I can't play it, but it sounds interesting.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on October 23, 2022, 10:00:23 am
Spooky cultist game! (https://delphonso.itch.io/sleeper-wildjam-50)

It's just bugs, plus the use of state systems and bad pixel art. The music was done by some dude who happens to also be in China, so that's convenient if I want to work with him in the future. Because the music absolutely fucks.

(Zultan, there's a 32 bit version in there for you too.)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on October 24, 2022, 04:48:18 am
I feel special, got my own special version!


That's a pretty fancy looking game for something that only took a few days to make.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on October 24, 2022, 05:01:07 am
I feel special, got my own special version!


That's a pretty fancy looking game for something that only took a few days to make.

Genuinely the entirety of the code was finished in about two hours. The rest of the time was asset creation.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on October 24, 2022, 05:08:50 am
Damn son two hours to make a game, you must code like lightning to do that.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on November 02, 2022, 12:19:38 am
I was rated "Most Original" (https://itch.io/jam/godot-wild-jam-50/results/originality) of all games in the jam!

Most of the comments were "I didn't understand this, but enjoyed it!" which I guess is my vibe.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on November 02, 2022, 03:34:27 am
Congratulation man, that's a big accomplishment there.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on November 02, 2022, 12:08:22 pm
Congratulations!

Title: Re: Can delphonso make a commercial game?
Post by: EuchreJack on November 15, 2022, 05:50:50 pm
Congrats!

It was fun.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on November 26, 2022, 07:58:03 am
Damn son two hours to make a game, you must code like lightning to do that.

Partial credit to my more prototype-y style of coding that I've been working on and partial credit to me recycling things I've done here already. It did feel good to get it that done that quickly, though, and to competently and confidently know how to integrate music, timers, etc.

Congratulations!
Congratulations!
Congrats!
It was fun.

Aww, shucks - thank you guys.


-=-=-=-=-=

Alright, enough thanks. It's time to get serious.

Questions:

What's been going on?

Things are busy in the delphonso household. We moved/are in the process of moving; we are adjusting our 2 year old to that process as well. Covid has made another sweep through my city leading to sweeping lockdowns and closures. I'm off work, which is nice, but my daughter is also home from playgroup, while my wife works online - so I'm taking care of baby all day, only getting "breaks" to carry heavy boxes to trucks or from a truck to an apartment. I'm sick, as always, with some sort of flu the kids gave me before school closed up. We also have to get covid tests every other day, which means a 30 minute queue at best, 1.5 hours at worst... I haven't touched this computer in 3 days.


Games/coding/etc?

Fishing game has hit a dead-end. The game jam really drove home the need for me to learn visual effects and things that make games look pretty, rather than make games functional. The issue is that I have no interest in making games look pretty and instead are far more interested in making shitty-looking games that are fun. This just requires some amount of self-discipline I seem to be lacking.


So...what have you been doing?

In the meantime I've been working on two projects.

A friend of mine and I are slowly hammering out the details of a Dwarf Fortress-like just to see how many things we can systematize rather than explicitly code. Or at least, to see how interesting we can make an experience by using systems. DF is all systems with very little hard-coded content (think the dynamics of personalities interacting compared to the game-like experiences of satisfying strange moods). This is all very ground-work stuff but will help both of us as we work toward our goals, even if it never gets put to anything besides pseudocode. I'll need to make fish that act autonomously and realistically, in some sense, so that's basically what we're doing here.

Second, my dreams of a Morrowind-like have never died, but Dunning-Kreuger has worn off and I now understand the amount of work that such a task would require. I've considered some alterations to make a smaller experience that can hopefully capture some of the magic of Morrowind, but we'll see when I get there. In the meantime I'm working on world-building. This is not only for the purpose of a game, but I'll also try this world out with my DnD group (to watch them utterly tear it apart, shoot the emperor in the cock, and then strangle a Daedric Prince to death). If nothing else, this is just writing practice for myself. I'm trying out Proton Drive instead of Google Drive (though it's more like Mega than Googy-Docs), so...Documents will be collected here! (https://drive.proton.me/urls/Y6ZWG1MG9G#d9zicbt76rxE)

I dunno...a game before the end of the year? Pretty unlikely. Maybe during Chinese New Year I'll whip up something. If not just a nicer looking name-generator for the world I'm building.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on November 27, 2022, 03:29:17 am
I don't see why people get all bend out of shape about graphics, as long as a game is fun I can't give a shit about graphics.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on November 27, 2022, 05:03:18 am
I won't put an enormous amount of effort into graphics, but I would like something that is at least as polished looking as Earthbound, so that means freezes and transition animations. Games need a lot of false slow down.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on November 27, 2022, 05:54:42 am
So you mean stuff like screen transitions or something to show the game is processing stuff like the mouse pointer turning into an hourglass?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on November 27, 2022, 07:32:16 am
Yeah, anything that is used to convey messages to the player should look good and also clearly send whatever that message is. It's jarring if you press 'start game' and the game immediately drops you into combat, for example.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on November 27, 2022, 02:07:52 pm
Even 'messy (https://mrmen.fandom.com/wiki/Mr._Messy)' graphics can be a style choice (https://media.tenor.com/uwXLM04ihekAAAAC/roobarb-running.gif), possibly harder to do right than a full set of detailed Blender-rendered sprites with greebles/nurnies galore. (A decision to succumb to horror vacui, or not, is also a consideration.)

Either way, you need to be consistent. Or at least justified if you're not, like "this level is deliberately cartoon physics, so a different style"/"this status effect switches the view into a Matrix-esque ASCII-art overlay" might apply... making even more work for you, in the process!

As I haven't an artistic bone in my body, I'd probably put my effort into (possibly procedural) rendering based around a thematic skeleton/shell appropriate to a given item, fine-tuning the parameters untilnit looks Ok, but I admire those who can improvise purely "through the pen" without a second thought. And people will exist all across the continuum of capability. Work with what you can do. Try to make it a feature, if not develop something or other as your signature style (https://www.explainxkcd.com/wiki/index.php/Stick_figure)...
Title: Re: Can delphonso make a commercial game?
Post by: EuchreJack on December 02, 2022, 12:50:56 pm
Yeah, anything that is used to convey messages to the player should look good and also clearly send whatever that message is. It's jarring if you press 'start game' and the game immediately drops you into combat, for example.

I now think more games should do that.  Adrenaline rush for the win!
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on December 03, 2022, 03:09:25 am
Yeah, anything that is used to convey messages to the player should look good and also clearly send whatever that message is. It's jarring if you press 'start game' and the game immediately drops you into combat, for example.

I now think more games should do that.  Adrenaline rush for the win!
Some times it's exciting but others it's terrible.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on December 03, 2022, 04:18:04 am
Yeah, anything that is used to convey messages to the player should look good and also clearly send whatever that message is. It's jarring if you press 'start game' and the game immediately drops you into combat, for example.

I now think more games should do that.  Adrenaline rush for the win!

Come to think of it, more than a few arcade games do exactly that, but you know...they also had the controls printed on them too.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on December 27, 2022, 06:39:20 am
Okay, after a few rough weeks of unknown work resuming dates, covid wrecking havoc on this country, and the holidays, I've got a good 4 weeks before I have to work again.

So what can I do in four weeks?

I went back and played Sewer Kings for the first time since I released it and I'm actually quite pleased with it. It's like...a real game, basically. Short, but there's something there that suggests I might actually be able to be good at this.

Rather than just crank out a game, I think I'd rather put the next four weeks' time into learning important skills when it comes to game dev.

Notably - I need to learn how to save data permanently on a user's computer. I also need to learn how to make animations look good on Godot. Both of these are relatively straight forward, but are important skills that will require time and effort to master.

If I crank those out quickly...well, I can either begin/resume work on the whole River King clone, or I could try and make a XCOM-style prototype. I'm a big fan of those sort of games and have been playing a lot of Depth of Extinction lately. It's an entirely different type of game, and would also require learning a new skillset. Not sure if that's a good use of time because 1, River Clone won't be that type of game and 2, Depth of Extinction pretty much gives me everything I want from the genre, so there's no room for me to improve.

Title: Re: Can delphonso make a commercial game?
Post by: eerr on December 27, 2022, 03:06:02 pm
The easy way is probably to go with plaintext w/ a little markup.

Modern csharp has the best text writing/parsing money can buy.

It's somewhat more complicated if you want to preserve a complex data structure.


I worked with a knowledgeable programmer on a game jam once.
He dug up his old save data parser,
aka it's something you can standarize enough to be mostly reusable out of the box.
(and i found the first bug in it)
Title: Re: Can delphonso make a commercial game?
Post by: Starver on December 27, 2022, 05:15:48 pm
For my projects that need persistent data (in Perl, often), I use one of other of an arbitrary delimiter-and-linefeed separated text file (e.g. .csv), a full JSON export/import of data structures, occasionally something based on YAML or XML...

By default, they generate (offline-)editable files that can be easily messed with by someone (me, usually, who knows how not to break things when doing so... usually!), in useful ways that the next run of the utility can happily find to both its and (ultimately) my own advantage.

But if I were doing a 'savegame', then I'd use a reversible obfuscation on top of whatever initial encapsulation I used. It could be (though it probably shouldn't be) just ROT13ing it before writing to file. Perhaps even a form of token-aware LZWing that further XORs each byte in the save-stream (compresses as it converts, then further pseudorandomises it beyond trivial analysis), with a bit of periodic randomness and/or checksuming to defeat attempts to replay or analyse until something works (making sure that it quietly but later firmly fails, to prevent the usual brute-force methods of reverse-engineering the sensitive bits)...

But I obviously wouldn't use this exact method for a public project (having lost any degree of Security Through Obscurity. And if Godot doesn't have a nice handy set of data-object converters that'll do various pre-sanctioned (and, moreover, thoroughly and professionally tested) munging/demunging things, on the way to and from a suitable file-dump.

Also, if I did any of my suggestions in my .pl files, the key to a third party getting around my precautions against savestate-hacking would be to read (or even rewrite) my very fancy code and discover(/disable) every little one of my game secrets! I don't know (because I've yet to dabble in Godot, despite liking wat I heard about it from yu, a while ago) what methods and precautions a Godot project can use, but I bet it's a better situation than "if you can't read Perl, it's safe". ;)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on December 28, 2022, 02:23:55 am
Glad to hear you're still working on this, but I don't know anything that could help you on your project though.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on December 28, 2022, 02:32:48 am
Well, it turns out that since Godot is a fully-featured game design tool, they have built-in formatting for save data so I don't really need to get too deep in the weeds with it. In fact, I could have done this without understanding how data is saved at all!

First off, json can be parsed natively in Godot, but because of the format, it struggles with Godot's data types (like saving vectors). I was presented with two immediate options: save as simple .dat files (I believe just saved in hex), or use Godot Resource files to save data.

On the topic of save manipulation, .dat is better, though the level of security is pretty light. Resource files are saved as plain text, and could be easily manipulated. As I thought about this more, though, I decided I didn't care and am comfortable with people editing their saves to have more fun/break the game.

That said, I did the .dat version of saving first, because it is easier to add to a project that is already in progress.

(https://imgpile.com/images/dnOKFk.png)

Remember this guy?

Well this has everything I need to test saving. So let's do it!

First, I assign the z key to save and x to load for no good reason at all.

(https://imgpile.com/images/dnOlph.png)

Inside our character, when it's checking what keys your pressing to move your guy around/pick up worms/catch fish, now it also checks for z or x being pressed. We chuck a custom function into each of these.

(https://imgpile.com/images/dnOcDa.png)

It's not visible here, but the only variable that is kept outside the function is "save_path" which points to simply "user://save.dat"

user:// is a folder which the engine makes specifically for this sort of thing. It is persistent, on Windows I guess it's saved in AppData or User, probably. On linux, it'll save in ~/.local/share/godot/app_userdata and then whatever directories have been made for running godot projects. The tutorial I followed also mentioned the use of a Directory function that I could use to separate this stuff up, should I wish to (currently, I don't wish to.)

Anyway, pretty straight forward - a single save file is opened and written. File.store_var will save whatever we want it to, so for the example, I just saved a number.

(https://imgpile.com/images/dnOfXX.png)

Loading is just as simple. We dump everything from the save file into a variable.

So let's use this to...like make a game.

First, we need to know what to save, and this is where I clearly see the flaws of this method. I have to do a mental checklist of everything I would want to save. Scrolling through the script, I grab these 5 values, but on a more complicated game, this could be a lot.

(https://imgpile.com/images/dnOiyG.png)

The easiest way to automate this, I think, would be to save all these stats as a separate file, then save, load, and update from that file instead of from each variable separately. This would be done using Resources in Godot - which I did a bit of in Sewer Kings. Tomorrow, I'll probably attempt to do something like that with this same game. It's simple enough that I could make those adjustments in less than an hour. Anyway, that's for tomorrow.

I set the data that is saved to this in the save function, which would be loaded in the load function, but needs to be applied to the game world. To do this, I create a new custom function:

(https://imgpile.com/images/dnOPP4.png)

The net and rod should always reset themselves, but I put it in there just in case something weird happens mid-save. reset_text is a function that was already in the game that just updates all the information that is visible to the player - which should work great now that all the values have been updated.

(https://imgpile.com/images/dnOxlu.png)

A quick tap of the z and x keys show that everything should be working alright. I walk a bit to the right, save, then I close the game, then walk to the far side of the screen. Pressing x reloads! This also works during the game - allowing you to save and load at any time. The randomize function is never recalled, so the pseudorandom numbers are still in their queue, I believe. Just a note for next time.

(https://imgpile.com/images/dnOJ7M.png)

Tomorrow: see how much of this I can automate without having to type in every single variable I want to save and load. Obviously that would be something to keep in mind at the START of a project, not the end of one - but it's good to know I can add save/load to any gamejam game pretty easily with what I learned today. Using Godot's data-type Resources, the processing time should be way faster, it also saves all the data types in Godot without issue, though there is a persistent bug of having trouble loading data inside other data. I have no idea if that would even come up in whatever I try and make, so it may be a non-issue. Really I need to figure out what I want to save before choosing the best save method to do so. Alongside that, I'd really like to make a big list of everything I would need to do to make a River King clone that doesn't look like shit.

For the record, I took all of this from GameEndeavor's tutorial here: (https://www.youtube.com/watch?v=d0B770ZM8Ic) it's 10 minutes and very good.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on December 28, 2022, 05:20:15 am
Already starting to look like an interesting game, also why do you get health can the fish hurt you?


Also what about putting the save file in the folder the game EXE is it, I've noticed that that's what most small games do.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on December 28, 2022, 09:11:26 pm
Already starting to look like an interesting game, also why do you get health can the fish hurt you?


Also what about putting the save file in the folder the game EXE is it, I've noticed that that's what most small games do.

This was the first prototype of River King clone that I made - you dig for worms, and occasionally, get beat up by rats while looking for worms - thus the health.

According to the Godot documentation:

Quote
Self-contained mode¶

If you create a file called ._sc_ or _sc_ in the same directory as the editor binary (or in MacOS/Contents/ for a macOS editor .app bundle), Godot will enable self-contained mode. This mode makes Godot write all editor data, settings, and cache to a directory named editor_data/ in the same directory as the editor binary. You can use it to create a portable installation of the editor.

So yes, I should be able to keep everything in the same folder, which is something I hadn't thought of, but will likely do because that seems like a convenient thing to do (assuming the game size is pretty small to begin with.)



EDIT: Didn't read literally the next line...

Quote
Note

Self-contained mode is not supported in exported projects yet. To read and write files relative to the executable path, use OS.get_executable_path(). Note that writing files in the executable path only works if the executable is placed in a writable location (i.e. not Program Files or another directory that is read-only for regular users).

Either way, yes I could do that pretty easily. instead of setting 'save_path" to user://save.dat I could simply set it to save_path = OS.get_executable_path() then add the file after grabbing that path. Or add a folder for saves.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on December 29, 2022, 03:34:38 am
Holy crap I helped somewhat I didn't think that'd happen since I know nothing about coding.


Also getting your ass kicked by rats sounds like it'll be funny.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on December 30, 2022, 07:01:05 am
I didn't do any coding today and you can blame it all on Mookzen, who gifted me Vampire Survivors for the XMAS GIVEAWAY.

This game is great - very addictive, very simple.

It's coming to a 3 day weekend, so I'll be busy with the kid the whole time, so maybe I can break this addiction and get back to coding.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 01, 2023, 03:03:06 am
*I stride in, slide a folding chair across the ground toward the table. It catches on a rug and snaps closed, taking three of my fingers with it. I squat awkwardly at the table, the pale grasp of unconsciousness creeping into my eyes.*

Okay, so here's the plan.

Save files by use of Resource

If I rewrite the fishing game, I can store everything in Resource files - I can then tell the game to search through all nodes in the scene, and save any that are of the type "Resource", thus saving all stats/progress as long as they are in Resource, but also not saving stuff I don't want, like...the current level (no need to store that in a dat file, right?)

This process /should/ be pretty simple, and I think I already grasp it.

                                         Narrator: He does not.

But rather than making the same project over again, I've got a much WORSE idea!

Hey kid, you wanna buy some tactics?

Been playing a lot of Depth of Extinction (great game that is just XCOM) and also Horizon's Gate (http://www.bay12forums.com/smf/index.php?topic=176974.0) (great game that is just Final Fantasy Tactics).

XCOM's core mechanic is cover. It's a tactical shootbang game, so the most important thing is getting into cover.

FFTactics relies on "facing" - since it's a (mostly) melee game, it's about moving in and keeping your back to a wall/corpse of an enemy that no one can stand on.

I think I can meld these two elegantly by having ranged be countered by cover, but melee countered by being in the open, giving you a dodge chance. I'd like to explore this more and make a simple tactics game (no levels/progression, just the basics) while at the same time, implementing the different save system.

So I grabbed some assets from OpenGameArt and am going to get started tonight.

The following is a list of things I need to figure out:

Resource-based save system + loading.
A* pathfinding for grid-based movement.
Writing tactical AI (yeeeeesh)
Calculating line of sight and cover.
Calculating dodge chance in melee (easy)
Figuring out a turn-order system (also...probably easy?)

Wish me luck!
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 01, 2023, 06:12:19 am
So you can't just add that stuff to your existing game?

Also exciting sounding new game you've decided to make.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 01, 2023, 06:50:15 am
So you can't just add that stuff to your existing game?

Also exciting sounding new game you've decided to make.

Not really. This is basically a write-from-scratch situation.

I could do the saving thing with the game that I already have, but then I wouldn't have the opportunity to learn new and useless skills like A* pathfinding  8)


Getting started now - just reading up on some similar projects that are open source.

EDIT: Not worth a full post - gotta prepare everything before I even start using tilemaps

I decided not to just cut corners on everything right from the get-go. I put a little time into the main menu and managed to achieve the level of Newgrounds in the late 2000s.

(https://imgpile.com/images/d7oVwu.png)

Nothing particularly special here - I'm using a particle emitter to drop all those single-pixels and generate snow.
The background is from OpenGameArt and the font is a free one from Dafont.

(https://imgpile.com/images/d7orrF.png)

just buttons, rectangles and labels so far. Not even a script to hook it up to a game.

(https://imgpile.com/images/d7ozvi.png)

But I did discover I can replace the particles with sprites. This gave me just a bit of joy at the end of a long day.
Title: Re: Can delphonso make a commercial game?
Post by: Eschar on January 01, 2023, 12:52:15 pm
It's raining (snow)men

Cool start
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on January 01, 2023, 01:10:33 pm
Love the snowmen!
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 02, 2023, 02:57:43 am
Snowing Snowmen an exciting way to start off a game.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 02, 2023, 08:10:58 am
Presenting:
An update about how to learn something you know nothing about.


Topic 1: A* Pathfinding

So. A* pathfinding is how you get things to move on a grid. I don't know why it's called A Star, but I do know that it uses a Szudzik function to find the shortest path between two points (well, the shortest to travel).

If I'm remembering a random video I watched on youtube once correctly, a Szudzik function keeps track of all pathing options until it reaches the goal, then only processes the paths which could potentially be less than the first successful path (thus doing none of the unnecessary calculations to test every single path on the map.)

Now to do that programmatically...well. I have no fucking clue.

There's two good bits of luck at play here, though.

First, this is Godot and Godot is good.
Here (https://docs.godotengine.org/en/stable/classes/class_astar2d.html) we have the documentation on the AStar object (2D and there's also a generic, 3D version). Even without much programming experience you can see there's methods for "compute_cost", "add_point" and "get_point_path". That seems like all the tools I need. Now, if only I could find an example...

Oh! The second bit!
Excellent youtube tutorial guy and dreamboat Heartbeast has specifically an A* pathing tutorial (https://www.youtube.com/watch?v=EPkaQFyEGQg). Better yet, his code is open source under an MIT license, so I could just use it if I want. Let's take a look at the project to get an idea of what we'd need to do if I were to do it on my own.

(https://imgpile.com/images/dNF6sG.png)

So here we have a simple map. Floor, a pawn and then walls. Upon running the game, it runs the A* process to determine all possible paths on the map (keeping track of all "points" (read, squares) on the grid.

(https://imgpile.com/images/dNFQzM.png)

Pressing Enter toggles the path-grid as visible or not.

Finally, clicking on a square allows you to reveal the path the character would take.

(https://imgpile.com/images/dNFg34.png)

The pawn doesn't move, however I know that this path is just a array of coordinates, so it should be easy to either have them walk the path, or just teleport to the end.

So, what's the issue?

Well, basically this:

(https://imgpile.com/images/dNF3w2.png)

Check that line counter on the left. 250 lines of someone else's uncommented code. With the video to rely on, I should be able to fully understand the code given enough time and effort. And here's a fork in the road for me.

I can either take this seriously and actually put in time/focus to become a better dev, or I can figure out just enough to scoot by and get this task done.

This is honestly a tough decision for me.

The grid-based pathfinding is where I've always stopped these types of projects. And this is a real shame, because these are some of my favorite games, and I've always wanted to make one of my own. I even went so far as making about 20 8-bit sprites of insects/vermin as part of a tactics game that was abandoned at the grid-based pathfinding back in 2020. And game-dev is a hobby I really like. I'm proud of Sewer Kings, which is honestly a strange feeling. I've written and drawn for over a decade and rarely made anything I didn't see full of flaws and holes and yet here I see my 3rd ever real game and it's like "wow, I can't believe I was the one who made this."

But on the other side of the coin...

                      I'm pretty fucking lazy.

*copies and pastes the script into my game and moves on*
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on January 02, 2023, 09:24:39 am
Pathfinding is some kind of foul sorcery I never understood.

...But then again I don't know anything about coding (unless some dabbling in BASIC and Turbo Pascal ages ago counts) and am not such a smart person.

Edit.
*copies and pastes the script into my game and moves on*

Good choice! I would've done the same.
Title: Re: Can delphonso make a commercial game?
Post by: bloop_bleep on January 02, 2023, 05:50:47 pm
A* isn't too difficult. The 250 lines are probably for the graphical overlay. You should be able to accomplish it in about 50 lines.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on January 02, 2023, 06:59:49 pm
So. A* pathfinding is how you get things to move on a grid. I don't know why it's called A Star, but I do know that it uses a Szudzik function to find the shortest path between two points (well, the shortest to travel).
The way I heard it, in the search for a good pathfinder they tried Algorithm version 1 (A1), then Algorithm version 2 (A2), then they decided that they could prove A2 was the optimal of all possible A-type algorithms, so they renamed it "A*" as being "the best and entirety of all 'A's, of whatever version..." (though, by tweaking A*, you can even get a version of Dijkstra's algorithm, should you so wish[1]).

This may be apocryphal. I've seen other less exciting (FCVO!) but possibly more mundanely possible reasons given, too.  :P

[1] ObxkcdReference: https://xkcd.com/342/ ;)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 02, 2023, 10:12:28 pm
Pathfinding is some kind of foul sorcery I never understood.

Apparently, I'm getting a grasp of it. But yeah, it's certainly a hurdle. It's one of those things that is so clearly /computer-y/. Humans, with our super-processor brains, can do the whole path-finding thing in our sleep, but for computers, they've got to check every possible path, because there's no intuition or heuristics at play. All the more efficient path-finding methods just do the barest minimum to not check every possible path.

I wonder if there's any cases of brain damage or disease that causes people to lose their pathfinding capabilities. Just climbing over the check-outs to get to the milk in the shop.

A* isn't too difficult. The 250 lines are probably for the graphical overlay. You should be able to accomplish it in about 50 lines.

Yeah. I read through all the code and could probably cut it down to about 100 lines. It comes with some additional stuff that is Godot specific (adding exit code to units so they can clear themselves from the map without needing additional code) and includes several variations - there's pathing code for just pathing, for pathing around obstacles, and pathing around obstacles and units. Obviously, I'll only need one of those.

The way I heard it, in the search for a good pathfinder they tried Algorithm version 1 (A1), then Algorithm version 2 (A2), then they decided that they could prove A2 was the optimal of all possible A-type algorithms, so they renamed it "A*" as being "the best and entirety of all 'A's, of whatever version..." (though, by tweaking A*, you can even get a version of Dijkstra's algorithm, should you so wish[1]).

I love how dumb that is. It was actually the Dijkstra's algorithm that I was thinking of before. In the code there's both a Cantor and Szudzik algorithm, however Szudzik is what I'll be going with.

Here's a write up (https://www.vertexfragment.com/ramblings/cantor-szudzik-pairing-functions/) on them both for those interested.

Okay.

Topic 1: A* Pathfinding, Continued

I spent most of last night and a good portion of this morning pouring over Heartbeast's code and commenting it myself. I think I have a decent grasp of how the algorithms in this work, and what tweaks I can make.

It's pretty elegant, though the code is...how to say? It's very Python. There are a lot of functions which perform only one method - I would have just put them in the main function, but I will admit that this did help chunk it up and make it more digestible for me.

When the game starts, an AStar object is created and filled with all the points on the map. It also keeps track of a list of obstacle points and player position points. The pathing grid that is shown is actually not all of what was processed, but an updated one which ignores units and obstacles.

This is all taken from a "board" object, which is the tilemap. I will use this same method for making the map of this little game. I could probably achieve this with random map generation (using the walker algorithm from Sewer Kings, or learning to use cellular autonoma, but I don't particularly want to bloat this project any more than I already have.) There is also an issue with this algorithm - if you choose a point that is inaccessible, it will explore all options that /are/ accessible before figuring out that there is no path. This means if I make a giant XCOM-style map, and if there's any regions that are inaccessible, then the processing time would bloat incredibly when you clicked on those inaccessible places. This is mostly just a note for myself for later.

The walls are actually indexed by group. Godot allows you to add such a property to any node. This means I can use a variety of things for cover (trees, snowmen, and rocks) but process them all the same way when it comes to path-finding.

After establishing the grid, it's just a simple check for where you clicked, then drawing a line to that point. Heartbeast built in several expected functions. For instance, I can limit the distance (obviously would call from a character's move-speed):

(https://imgpile.com/images/dU7IR2.png)

Clicking past 6 tiles just paths to the 6th tile and then ends.

I can also keep track of the line, and move the character to that point.

(https://imgpile.com/images/dU7ufG.png)

(https://imgpile.com/images/dU77Ba.png)

Basically, this is all I'll need to make a tactics game. It will require some polish and customization, but I think I'm at the right point to move on. My comments on the code pushed it to about 300 lines of code. I should be able to cut large swaths of it, because there are a lot of redundant/unused functions and some that are specifically for different types of games.

Figuring out line of sight and shooting is going to be tough, because I won't be able to reuse this code to do it. But it should be possible to check if a straight line from the attacker to the target meets an obstacle. There might be some issue here because of unit differences. The grid is calculated based on the tilemap size (64x64 here).

Also a note on the resource-based saving. The Resource files, I mentioned, are written in plaintext and are loaded as plain text into the game. I'm fine with people finding them and setting their strength to 10,000 or something, but there is an issue when it comes to running executable code...You can get the OS to perform stuff by injecting code into the save and have Godot execute that upon load. I'll find a way to hash it and unhash it or something.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 03, 2023, 04:46:22 am
So far it looks like a chess game with guns to be added.


Sounds exciting I wonder if that means the pawn will finally be able to topple the king?
Title: Re: Can delphonso make a commercial game?
Post by: Eschar on January 03, 2023, 11:27:00 am
Finally, Chess 2.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on January 03, 2023, 11:57:21 am
Finally, Chess 2.
You remind me of Battle Chess (https://en.wikipedia.org/wiki/Battle_Chess)... Although I feel safe exposing this directly in front of our Friendly Neighbourhood Developer as that was just regular chess with 'fancy' (for the time, arguably) animations and not any next-level(/-dimension) expansion.

But I'll stop myself before I blurt out my own Chess: The Next Generation ideas. At best, I'll swing delphonso's development arc away from the already planned one, at worst I'll actually guess what's going to happen and make it look like I swayed things. ;)


(Guessing that the Chessness is just handy graphics, though. An understandable placeholder theme.)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 04, 2023, 12:38:43 am
So far it looks like a chess game with guns to be added.

Sounds exciting I wonder if that means the pawn will finally be able to topple the king?


(Guessing that the Chessness is just handy graphics, though. An understandable placeholder theme.)

This is correct, it's just the placeholders that Heartbeast used, I'm pretty sure they're from Kenney, who is a great artist who makes a lot of free assets for amateur game devs.

I don't have much to show at this point. Yesterday I put together the tilemap and built the game world:

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/EIyCDWtKeNMIUnAcloBhxxCz)

Today, I'm far too hungover to code.

You remind me of Battle Chess (https://en.wikipedia.org/wiki/Battle_Chess)... Although I feel safe exposing this directly in front of our Friendly Neighbourhood Developer as that was just regular chess with 'fancy' (for the time, arguably) animations and not any next-level(/-dimension) expansion.
I loved Battle Chess as a kid.

Finally, Chess 2.

The Sequel (https://store.steampowered.com/app/314340/Chess_2_The_Sequel/)
(this actually looks pretty neat)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 04, 2023, 02:34:43 am
Oh god it's snowman VS snowman, it's gonna be snowmageddon!
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 04, 2023, 08:01:35 am
Hmm. Alright, I tried briefly to run the pathfinding debug script on the game I made and here's the notes:

First, it didn't work at all (except it did take the dimensions from the tilemap (16x16 instead of 32x32 in the example) so there's that.

(https://imgpile.com/images/d5w2br.png)

I set the debug lines to red so I can actually see them. Here we have some interesting issues.

First, the editor, though using 16x16 sprites was actually in 8x8 units, so that's why the grid is perfectly aligned with some things, but not perfectly aligned with some others (the snowman in the top-right). The pathing lines just cover the entire map. So...why?

Well, I thought I had solved it. It was a simple capitalization error on my part - 'Units' instead of 'units'. A quick fix later and...

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/zbPXbypFWqryZTFOpKeDujcK)

What the fuck, guys?

Obviously it's no coincidence that the only obstacle that is actually caught is the one that is slightly off the 16x16 grid. I'll figure this out tomorrow.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on January 04, 2023, 09:36:20 am
All sprites seem to be aligned to a grid of twice the density of your debug-grid, or indeed the grid you'd get by packing your sprites shoulder to shoulder. (Your 8˛ vs 16˛ confusion clearly comes into play there.)

And all sprites whose centres align with grid-crosses are ignored (for blocking purposes, plus a sprite whose centre aligns with a half-horizontal on-grid position (and, if you had one, I presume a half-vertical one). The only one that blocks is the only one that has a centre on a mid-mid 'box' position.

From this (purely from visual inspection) I would presume that the bottom-right corner of the sprite is being tested against grid-crossings and excluded as a match/clash between the two. Normally I would have expected a sprite origin to be top- or bottom- left, according to graphics convention (though maybe if you paste an icon as a mirror image of its original it would go from [x,y] to [x-w,y+h], and do this). With other systems having centre-origin (spreading ±<w/2> and ±(h/2) from that). I think you've told us/given us the info to remind me which one Godot is, but I've not gone back up the thread to check. ;)

So I think you have either two issues or 'merely' one-and-a-half. Both trivial, so long as you understand the error.

Firstly, get your (hangover-induced?) grid-size agreeing with the 'sprite-gridsize' of placement.

Secondly, check for off-by-one errors. Or an off-by-half. In the first instance, the top-left origin of sprite is being compared with and blocking against the bottom-right located intersection, so the code might be confusing things by exactly one (and only by the half-and-half-aligned sprite is it even finding that blocking node, which is lucky for the diagnostics. In the second instance, it's blocking (as would be logical, to surround by a grid that should enclose a sprite) against the centre-coordinates of the sprite, but this is half-grid-resolution off from what it should be.

And if you double the grid-resolution to match the sprite placement one (but leave the sprite size), your 'collision of nodes' should not just match the centre spot but the new nodes formed of your denser grid that are just on the sides/corners of your sprite, too...
Code: [Select]
*=•=*=•=*=•=*=•=*=•=*=•=*=•=*=•=*
”       " ' " ' " ' " ' " ' " ' "
• O#O#O •-•-•-•-•-•-•-•-•-•-•-•-•
” ##### "       " ' " ' " ' " ' "
* O#X#O * O#O#O *=•=*=•=*=•=*=•=*
” ##### " #####       ' " ' " ' "
• O#O#O • O#X#O#O#O •-•-•-•-•-•-•
”       " ######### " ' " ' " ' "
*=•=*=•=* O#O#O#X#O *=•=*=•=*=•=*
” ' " ' "     ##### " ' " ' " ' "
•-•-•-•-•-•-• O#O#O •-•-•-•-•-•-•
” ' " ' " ' "       " ' " ' " ' "
*=•=*=•=*=•=*=•=*=•=*=•=*=• O#O#O
” ' " ' " ' " ' " ' " ' " ' #####
•-•-•-•-•-•-•-•-•-•-•-•-•-• O#X#O
” ' " ' " ' " ' " ' " ' " ' #####
*=•=*=•=*=•=*=•=*=•=*=•=*=• O#O#O
..your "double grid" of "s and =s with nodes of * augmented by the tween-grid of 's and -s with new nodes of •. And variously aligned sprites of centre X and extends by #s to the O corners/mid-edges (sharable, due to the vaguaries of how I decided to do this particular ASCII art) that leaves pathable corridors between the not-too-close neighbour through which you could move any other sprite, whether highly constrained (single track, upper left) or with wide choice (larger gap, bottom right).

Does that make sense?

Or... Just make placement-grid the same (and in the same parity) as the pathing grid like I think you always intended. ;) But with the above diversion I should also help you with any future multitile path-blocking supersprites (assuming you don't just have a DF approach to it, c.f. wagons), of arbitrary size/extent per object.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 04, 2023, 08:21:38 pm
It for certain is testing the top-left corner. I expect there's something off about where it's testing (or perhaps it considers 0,0 of a sprite to NOT collide, for some reason) The sprite is squarely in the top left corner of that collision vertex, which could explain it. I'll find some way to test it today. I'm certain it will be a non-issue after a cup of coffee and last night's good sleep.


EDIT:
I turned the offset off and now it's obvious where it was actually colliding.

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/HZPSBgnkxFmcIZPBCXpPstZn)


EDIT Part Deux!

E 0:00:02.919   set_point_disabled: Can't set if point is disabled. Point with id: 86536 doesn't exist.
  <C++ Error>   Condition "!p_exists" is true.
  <C++ Source>  core/math/a_star.cpp:517 @ set_point_disabled()
  <Stack Trace> astar_tilemap.gd:125 @ set_obstacles_points_disabled()
                astar_tilemap.gd:100 @ get_astar_path_avoiding_obstacles()
                level.gd:15 @ _input()

For some reason, it doesn't catch...basically any of the points. It is counting everything on a 16x16 grid, though when it displays that, it doesn't really look that way.




Third edit:

I'm a fucking moron.

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/CnAFtIaxEjIvNuEJSuLyldSt)


(https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/TNbZDYKxdexBSHIUNXkkZGgC?width=800&height=600&method=scale)

everything is fixed.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 05, 2023, 01:54:56 am
(https://imgpile.com/images/d5QUt1.png)

I should just have a note on my desk that says "If it's not working, it's because it needs to be offset." I swear I run into this issue literally every game.

Since the sprite was centered, the collision was checking right in the center of the sprite, rather than the top-left corner, which is what we want for a clean grid. Easy fix and then suddenly everything worked correctly.

Okay, now that everything is fixed, let's remake the map and throw a dude on there.

(https://imgpile.com/images/d5FEya.png)

I had to remake the map because the trees were 16x32 - I was sure it wouldn't work, but just wanted to check. Now it's all rocks, snowmen, and buff guys.

Right now, the code assumes there's only one player. I add a few lines of code to allow you to click on a unit, then direct them where to go.

(https://imgpile.com/images/d5FQQM.png)

(https://imgpile.com/images/d5FvN4.png)

With that all working, the debug section gets removed, and along with it a few commands to allow me to toggle the grid. The line is the actual pathing script, so that is going to stay around.

I decide to do a bit more polish and clean up at this point. I trim down Heartbeast's code to about 100 lines, some of which I'm still not using, but might when it comes to enemy AI.

I also update the function for the main menu, which had bloated considerably.

Here's how old me would do that:

(https://imgpile.com/images/d5F6OG.png)

And now: the new and improved delphonso:

(https://imgpile.com/images/d5F3P2.png)

Rather than explicitly tell the code to hide each element of the scene, I just iterate over all the nodes in the scene, which would include labels, buttons, etc.

Now let's make this combat scene look more like a real combat scene.

We name the units Tom and Joe and add a button to send the unit to the square you have selected.

(https://imgpile.com/images/d5QN4P.png)

So the way this works now is you click a unit, then a label tells you who you have selected (I'll add another ui element to this at some point).

(https://imgpile.com/images/d5FAyl.png)

Then you click a square and the path is revealed.

(https://imgpile.com/images/d5FOGw.png)

And then you click "Commit Move" and the unit moves...directly behind the button.

(https://imgpile.com/images/d5QuOW.png)

God damn it, Tom.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 05, 2023, 02:11:27 am
Dang this thing is taking shape quite quickly, have you become some kind of code wizard?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 05, 2023, 06:30:35 am
It's a mix of coding skills improving (slightly), debugging skills improving (much more) and just gaining familiarity with the engine.

The whole "self.get_children()" is something I've known about for a while, but only now feel comfortable enough to use it, as it is pretty abstract.
Title: Re: Can delphonso make a commercial game?
Post by: eerr on January 05, 2023, 08:43:42 pm
I personally have been stuck on implementing a fancy pathfinding myself.

seems like something I should either dumb down, or copy off someone that know's what they're doing.

My idea was, a pack of wolves hunting.
making them behave naturally while also on a grid is not something I know how to do.
I had no idea where to start, so I sort of drifted off on that problem, and moved to easier to make stuff/stuff i already knew the basics of.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 05, 2023, 10:35:20 pm
Yeah. I'd love to be at the point where I could do this stuff myself, but I just don't think I'm at that level yet. Certainly using this code and reading through it has helped a lot. I roughly understand how the code itself works, but there's a lot of technical knowledge (the methods inside the AStar object, for example) that I'm missing.

I'm going to build a state-machine for dealing with player inputs and then I'll need to stop working on that part and actually work on saves/stats which was, you know, the whole point of this project.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 06, 2023, 02:55:45 am
I know nothing about code so I must ask what a state machine is?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 06, 2023, 02:59:36 am
I know nothing about code so I must ask what a state machine is?

That's what I used to control the fish that swam around the pond and also for the gamejam game.

Basically, instead of having a big list of "if ____, then ____" commands, you simplify it into a limited number of "states"

For the fish it was "swimming", "turning", and "idle" and just cycled between the states, making the fish do certain behaviors in each one. I'll do something similar with the mouse in this. "free", "unit selected", "attacking", "moving" or something along those lines.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on January 06, 2023, 09:27:36 am
Basically, instead of having a big list of "if ____, then ____" commands, you simplify it into a limited number of "states"

For the fish it was "swimming", "turning", and "idle" and just cycled between the states, making the fish do certain behaviors in each one. I'll do something similar with the mouse in this. "free", "unit selected", "attacking", "moving" or something along those lines.
...that's probably a decent cue to reply to the following:


My idea was, a pack of wolves hunting.
making them behave naturally while also on a grid is not something I know how to do.
I had no idea where to start, so I sort of drifted off on that problem, and moved to easier to make stuff/stuff i already knew the basics of.
Briefly edit: <= That word turns out to be a blatant lie... Sorry!, I have done something like this (not wolves, but it can be generalised to all kind of things, that you want to 'zerg' in anything more than a dumb rush at a target and exhibit other behaviours.

It'd be a dynamically (and cross-referencing) weighted sum of urges that I'll call Pack, Prey and Personal.

Pack is perhaps the most complicated, but based around Swarming behaviour where the desire is to be not too distant (but not necessarily too close) to other pack-members. it might have sub-states (for wolves: travelling mode, hunting mode, running-down mode, going in for the kill) which might designate a desired position to be at a given the flank of the pack 'mass' (or even gone around what is in front, info from the Prey urge's targetting, to lie in weight as a backstop to the more obvious zerg-like rush, which necessitates a special "pack position attractor/repulsor" combination to guide its individual swarming bevaviour), if not the Alpha position who merely feels the need to follow The Plan, so long as they have the flanks near them that they think they should have. - There's simpler versions of this, but you can have fun tuning the more exotic tactics into it to. The urge to Pack might be strongest (given more weight) in both offensive and defensive situations, but if (say) sufficient pack-members (or the Alpha, in particular) are lost/unseen during an encounter with an antiPrey (see below), it could be suddenly revalued as the weakest weighting of urge.

The urge of Prey is a (usually attractive) tendency to head for a target. If not actual prey (the current thing being hunted, or a scavangable item of interest), it can be something off-screen (the pack's den, where there is a desire to rest and recuperate?). It can also be a negative urge (encountering a dangerous foe, "antiPrey", the urge is to go away from that spot, being liable to become prey oneself) and there's the "healthy distance" version which encourages a Pack/Flock-like distance from the target (close in, to surround a big bovine wielder of sharp horns and worry at it but keeping out of range of its head-weapons; further away, such as cautiously moving beyond the herd (undetected) to spring a divisive pincer attack...). Plus there can be (and often will be) multiple such Prey (and/or antiPrey) point presences to sum up the effects from. Strengthened and weakened in the global mish-mash of primary Urges according to various factors.

The element of Personal is the random-wander, the strength of desire to be closer to the (potential) food than the others, the expectation that one is always at the right flank of the Alpha (the pack pecking-order generator having assigned this position, or another, to this particular individual) or near/further from another pack-friend/-rival. Usually the most subtle effect that just makes the rest of the behaviour not look like it's being coordinated by a computer (though it is!), but could be dominant if (say) you encounter the wolfpack when idling, and you're stealthed to the max and just creeping through the area.


Just take the three major Urges (themselves a summation of sub-Urges under their own rules and sub-states and all those pesky little calculations that generally boil down to vectors of various kinds) and, depending upon the State (could be merely Hungry, Fearful, Idle or a bit more complicated) mix them together for each wolf, translate that to a movement, enact those movements, deal with reactions (others in the pack, other NPC entities involved, the player's response in their own 'tick') and perhaps change state (packwide or personal) if circumstances changed across a threshold of any kind

And you can isolate and test each Urge (and sub-Urge) in its own right, before then testing States that define the mix. Can't promise you no unexpected emergent behavious (e.g. a tendency for the pack to spiral clockwise around some strange and otherwise unremarkable point - easily done!), but you can make sure that your vector-maths doesn't make them a direct result of some basic wrong-sign-error in an initial subcomponent.


The trickiest thing is the grid aspect. With directions (instantaneous, per tick, at least) being restricted to cardinal/diagonal and 'speeds' being probably one tile (or ✓2 tile-edge distances, but diagonally) at a time, subtleties might be lost. Collisions (movement to same tile) need thinking about (DF solution? Or does one entity (randomly?) get there first and block the other entity(/ies) that wished to move there?), as does the finer-angles of destination perhaps need some stateful 'memory'[1] All problems avoided in a vectorised movement system with a positional resolution much finer than the 'station-keeping' distances that you'd not normally expect your entities to approach within (except for deliberate collision/attack).


But it also needn't be this complicated. It could just he Pack or Prey or Personal (i.e. "Idle) for general station-kept movement across the map, surrounding (or fleeing directly away from) the biggest attractor (or repulsor) or the generally lolling about with occasional shuffling around at random. Depending upon the wolves' single current (shared) State. You don't need to combine them proprtionally, necessarily, and might even have some other mutually-exclusive states (P-initialed or otherwise...) that you think they should do. Like circling an apparently uninteresting point. (Perhaps indicating wary interest in something that the player can't immediately see? But if you disturb/displace/kill the pack and get go examine the focus tile properly you end up finding that some Mystical Orb Of Power was half buried there, and it's a very useful loot-item with geat in-game potential!)


Then again, I do like Emergent Behaviours from a tuned (or improperly tuned!) mix of simulated wants, needs, fears and whims. If only I could progress to making some of my thought experiments reach consumer-grade levels of quality, rather than moving onto my next (mostly unrelated) whim. ;)


[1] If, for several turns, you're highly consistently attracted to go 8 tiles north and 7 tiles northwest of your initial position, better to aim to alternate N, NW, N, ... (terrain/obstacles allowing) than clump Ns until the dominant direction is now NW and then potentially clump them. Additionally, if it's an 'off-map' attractor, N should not win out every time just because at each step the vector is 8xN and 7xNW as it wants to head at roughly the same angle to a point off 'at infinity'. Some stack of recent compromises in movement that skews in a NW because "we've already oversubscribed on the Norths, at this time!" could be a useful trick, even to bias a recalculated Urge-vector, to indicate some sort of Urge-inertia, in that tracking slightly NNW wins out for a tick or two, even when N now is twice as necessary as NW, say.
Title: Re: Can delphonso make a commercial game?
Post by: eerr on January 06, 2023, 06:05:45 pm
I'm stuck on basic pathfinding, not uh, a fully simulated pack of wolves.
I'm a newbie...

I'm also not really feeling a grid based game anymore.
I look at a grid and I'm like, damn, i wish this thing wasn't confined to a grid.
None of the games I've chosen to make, recently, are better for having a grid.
https://youtu.be/zmwk_OiUtxQ?t=38

Title: Re: Can delphonso make a commercial game?
Post by: Starver on January 06, 2023, 08:27:24 pm
...I regret the length and detail of that post. I was too much in a hurry to make it short. I even started to rewrite it much briefer, later on, but got called away from the keyboard again after an hour or so. So this is me apologising again for being an unmitigated stream of consciousness. Who says things like "unmitigated stream of consciousness". But maybe it'll help/not overly hinder someone out there.   :-\
Title: Re: Can delphonso make a commercial game?
Post by: bloop_bleep on January 07, 2023, 10:33:14 pm
When delphonso becomes a prominent indie game dev I will be able to say I was here when it began. Kinda like those people who played Dwarf Fortress back in 2006.
Title: Re: Can delphonso make a commercial game?
Post by: bloop_bleep on January 07, 2023, 10:39:38 pm
I personally have been stuck on implementing a fancy pathfinding myself.

seems like something I should either dumb down, or copy off someone that know's what they're doing.

My idea was, a pack of wolves hunting.
making them behave naturally while also on a grid is not something I know how to do.
I had no idea where to start, so I sort of drifted off on that problem, and moved to easier to make stuff/stuff i already knew the basics of.

Do you want them to exhibit pack behavior or just mingle randomly like the others aren't there?

If you want to implement A* pathfinding, you can just look at the wikipedia article on it, complete with pseudocode: https://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode (https://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode)

The heuristic h describes the shortest possible distance between two points. It is not necessary, you can just set it to be 0 always and the algorithm will work (in fact exactly like Dijkstra's algorithm), but the better heuristic you have the faster on average the pathfinding will be. If moving on a grid, you can use the Manhattan distance between points (x0, y0) and (x1, y1): |x0 - x1| + |y0 - y1|. If moving not on a grid, you can use the straight-line distance: sqrt((x0 - x1)^2 + (y0 - y1)^2).

Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 08, 2023, 07:17:37 am
I'm also not really feeling a grid based game anymore.
I look at a grid and I'm like, damn, i wish this thing wasn't confined to a grid.
None of the games I've chosen to make, recently, are better for having a grid.

This is actually a very important point to think about. Like, if you're doing a control scheme, you really should think about /why/ that one is the right one for your game. Think of something like Pokemon. Why is it grid-based? Genuinely, there seems to be no reason. Zelda manages to do grid-based puzzles with pixel movement, which is the only thing from Pokemon that seems like it would require the grid.

Something like XCOM benefits from the grid because it makes it clear whether you're in cover or not. Fire Emblem has terrain types, so likewise benefits, though I think that game is easier to remove grids and do something like Phantom Brave's movement.

...I regret the length and detail of that post. I was too much in a hurry to make it short. I even started to rewrite it much briefer, later on, but got called away from the keyboard again after an hour or so. So this is me apologising again for being an unmitigated stream of consciousness. Who says things like "unmitigated stream of consciousness". But maybe it'll help/not overly hinder someone out there.   :-\

This thread is always a home for Starver's streams of consciousness on code optimization, game design, and tales from the middle years of computer science. It was an interesting read and actually something a friend and I have been hashing out (in pseudocode, really) to make some sort of ant simulation. It just plays into our interests of automatizing units and seeing what they can get up to. I think any fan of DF can get that.

When delphonso becomes a prominent indie game dev I will be able to say I was here when it began. Kinda like those people who played Dwarf Fortress back in 2006.


Hell yeah. There's still a large gap between where I am now and a shitty commercial release, but I think I'll get there. Maybe this year, if I can keep up the practice.


I personally have been stuck on implementing a fancy pathfinding myself.

seems like something I should either dumb down, or copy off someone that know's what they're doing.
Do you want them to exhibit pack behavior or just mingle randomly like the others aren't there?

If you want to implement A* pathfinding, you can just look at the wikipedia article on it, complete with pseudocode: https://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode (https://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode)

Fake it til you make it, baby. I really think there's value in completing a game/project. If that means copying someone else's code and not fully understanding it, that's fine, honestly. I think that sort of intermediary step is necessary to actually understand it fully later.

Weekend is over and the kiddo is heading to school tomorrow. We'll see how much I get done. I'm boiling over with ideas right now, so I'm eager to get started.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on January 08, 2023, 01:25:36 pm
If moving on a grid, you can use the Manhattan distance between points (x0, y0) and (x1, y1): |x0 - x1| + |y0 - y1|. If moving not on a grid, you can use the straight-line distance: sqrt((x0 - x1)^2 + (y0 - y1)^2).
...there's also Chebyshev distance of max(xdif,ydif) if, on a grid, diagonal movement (at 45 degrees) is a potentially free addition to the any single-tile orthogonal moves you could make.

...while modified Manhattan as I think more applies to DF could boil down to something that expands to:
Code: [Select]
diagonal=min(xdif,ydif); // How far a full diagonal will take you
orthogonal=max(xdif,ydif)-diagonal; // How far you need to move before/after such a diagonal
total=orthogonal+(diagonal*root(2)); // Assuming it's a euclidean-like 'cost' along the also availabe 'diagonal taxicab' distances
 // ...otherwise it's just plain "orth+diag"
Or, by simplification (well, one line, and only if I haven't thinkoed or typoed), =max(xdif,ydif)+(min(xdif,ydif)*(root(2)-1)).



Really, it's all 2D "grids" (well, unless you go for something actually non-Euclidean (https://en.wikipedia.org/wiki/HyperRogue)). If your typical movement-distance is well beyond the resolution of the underlying coordinate system you use. So it's useful to know what options work for what movement constraints you decide your game has. As in that it might not matter if youre ultimately counting steps (including whatever cost/benefit given to diagonal steps), as the point is mostly to nudge the algorithm into the 'best' (until shown invalid by later obstacles) way to try the next stumble around in a bid to narrow down the full route onwards at each stage.


(TL;DR; get to know the possibilities, be more than a one-(/two-)trick pony, but feel free to choose what works best for you/most comfortably at the time. You can always revisit most of these choices later. Or in your next project.)
Title: Re: Can delphonso make a commercial game?
Post by: EuchreJack on January 09, 2023, 12:17:44 am
The whole "self.get_children()" is something I've known about for a while, but only now feel comfortable enough to use it, as it is pretty abstract.

Yeah, that sounds like a command I would avoid using too.  :P

When delphonso becomes a prominent indie game dev I will be able to say I was here when it began. Kinda like those people who played Dwarf Fortress back in 2006.
Word.
I was only here in 2008. I missed out!
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 09, 2023, 03:26:39 am
Productive but brief work today.

State Machine for Interface:


So, we left of with the issue that the "commit" button also read clicks, so you'd always walk down to the bottom left corner. I decided to fix this with a state machine. I also decided to stop struggling with uploading and just type it out by hand.

So, here's what I did. I considered what "states" the mouse could be in.

Right now, we're on "free to click", "moving a unit", and "clicking after having chosen a path". If/when I add attacking, I'll need to update this to include an attacking state, but rather than get mixed up in those reeds already, I'll just skip it for now.
Code: [Select]
enum pointerStates {OPEN, CAPTURED, SELECTED_FREE}
var state = pointerStates.OPEN
var pointer = null

Easy as. Pointer is just a placeholder for where the mouse was when it clicked.

I move the path-finding calls into the process, so now that is updated every frame. When you click on a unit, you don't see a flood-filled space that they can move, but you see a line from them to whereever you're pointing, but limited to that units range (right now, 18 for everyone).

With the states established, it's easy enough. We look for a click on a unit, and if we get that, we change to display pathing and wait for the player to click on a square. If you click past your range, it will just grab the last square within range.


Code: [Select]
func _input(event):
if event.is_action_pressed("mouse_left"):
if !current_player and state == pointerStates.OPEN:
var target_cell = (event.position / board.cell_size).floor() * board.cell_size
if board.position_has_unit(target_cell):
for n in player_list:
if n.position == target_cell:
current_player = n
selection.text = "  Selected Unit: " + current_player.get_child(1).text
state = pointerStates.CAPTURED
else:
state = pointerStates.OPEN
elif current_player:
state = pointerStates.SELECTED_FREE

Now that you've clicked, we're in the "selected_free" mode. Which allows you to commit the movement.

I don't think this is very elegant code, but it works. If I had more motivation, I'd rewrite it, but I AM pretty lazy...

At any point during these, you can press right-click and free yourself.

Code: [Select]
if event.is_action_pressed("mouse_right"):
free_selection()

func free_selection():
state = pointerStates.OPEN
line.points = []
current_player = null
selection.text = ""

When "commit move" is pressed, it just send the unit to the last point of the line, so that needs to be reset whenever we right-click as well. It's not much, but it's at a state where I could throw it up on itch to play around with. I'll probably do that tonight so I force myself to have a "stable" branch saved somewhere.

Running into an issue with this - mainly that I constantly think about tactics games and want to add so many systems and make a full game of this. But at the same time, I don't have the time or energy to do so. Some friends and I are about to start a brief Dark Heresy tabletop game - and just reading the rules I'm constantly picking things out and thinking "ah yes, I could make this into a tactics game".

Stay focused, delph. This is a save project.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 09, 2023, 04:13:30 am
I don't see why you can't make this as big a project as you want it to be, it's not like you have a time limit.

When delphonso becomes a prominent indie game dev I will be able to say I was here when it began. Kinda like those people who played Dwarf Fortress back in 2006.
Word.
I was only here in 2008. I missed out!
Same here I started lurking in 2011/2012 and it took until 2017 to finally join and I feel like I missed out on tons of cool shit.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on January 09, 2023, 07:07:28 am
I don't see why you can't make this as big a project as you want it to be, it's not like you have a time limit.

The way I see it, I can struggle for 2 years to make a game that, if I spent one year learning more, I could make in 3 months. Does that make sense?

Like if Toady and Tarn started on DF today, I think they could make the whole thing in 3 years. Toady's become a much better programmer and could look at modern DF as an example, and work from there.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on January 10, 2023, 04:23:12 am
It makes since but there does come a point where you have to decide you've learned enough to start working on something because no matter what you do you continue to learn things and as you progress you will realize that something that is easy now was difficult in the past.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on January 10, 2023, 08:51:08 am
I deem myself "an eternal student". I left pure academe, and yet wonder what it would be like if I hadn't fallen out into the world of work... I doubt I'd have become a Master of anything, probably one of those back-room staff (as I prided myself being in my actual path through employment) who muddled through knowing mostly enough about many things, such that I could help the true trailblazers/innovators(-to-be) onto their destined paths to glory.

...so, yeah, I've been learning and learning and learning (and forgetting/re-inventing wheels!) to the detriment of doing. Don't be like me. Set yourself a decent threshold, from there onwards to unlock that accumulated potential. ;)

(These are words I'd never include in my various versions of my C.V.s, of course. In them I'd be "flexible and adaptable, always willing to develop new skills", or whatever rot seemed like a good idea at the time. Anything to fill up space and avoid the rest of the clichéd stuff like "honest". That one in particular really getting my goat... a dishonest person would not flinch at making such a claim, so it should technically be considered the most meaningless assertion.)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on February 22, 2023, 12:18:10 am
I rather suddenly was pulled into my wife's hometown for Chinese New Year, which then disrupted any fleeting motivation I had to finish this project.

I bought a gaming PC and will thus be playing games instead of making them for some time. There's ideas floating around, but until I habitualize a dev-time, any project will be in fits and starts only.

On the plus side, I feel great. Been back in the gym, work resumed, playing games and reading heaps of books. Been great since the new year.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on February 22, 2023, 08:53:28 am
Glad to hear things are going well for you so far this year. I'm sure you'll find some spare time to work on this at some point.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on February 22, 2023, 01:34:09 pm
Very good to hear things've been great. Playing games and reading books is always good!
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 07, 2023, 09:41:04 am
Godot 4.0 is out! It's chock-full of features for making 3D games.

Here's what's new:

There's a new lighting system entirely that is lighter and looks better.
Occlusion culling is implemented fully, now - vastly improving 3D performance.
Tilesets and Tilemaps are now not the most unintuitive thing in the world.
New Node - CanvasGroup. This allows you to add several sprites together and treat them as one object, simplifying animation of segmented creatures.
There's a bunch of 2D stuff light lighting and transparency masking.
Shaders and visual effects have gotten a big upgrade.
GDScript has some new stuff in it - Types are now more efficient and robust. Functions are now first-class, allowing you to directly reference them.
The Compiler now has better error warnings.
Localization is now much better, including the ability to code in non-roman alphabets.
Godot Physics has been improved both in efficiency and reliability.
Soft-body physics objects have been added.
KinematicBody is now CharacterBody and has been redesigned from the bottom up, to be more intuitive.
GDExtension allows you to code in C, C++ and Rust as well as some other languages. Code can be added in as Nodes.
UI got an overhaul as well - which rules because it sucked before.
There's a new quick-resize/place feature. This makes it simple to place three objects equidistant across the screen, for example.
From 3.5, there's the feature I didn't use which is the "local path". For example, rather than going through the whole path of "Node2D/KinematicBody/Collision2D/CollisionShape" I can just path to "%CollisionShape"
You can now also just click and drag those from the editor bar to the script to immediately add them as onready variables.
There's now a built-in text editor for files like json or csv.
AI navigation got an overhaul, which is good because it was up to the dev before.
Music and sound also got an overhaul - making it crisper to overlap sounds.
Some shit about VR, 3D animations, and Multiplayer that I don't really care about.


I'm trying to get back into the swing of things. I'm going to mess around with Godot 4 and see what's different and signed up for a game-jam next week (this'un (https://itch.io/jam/godot-rumble)). Unfortunately it's right at the end of Godot Wild Jam so is absolutely empty. There's a lot for me to relearn with this huge jump to Godot 4.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 08, 2023, 05:29:02 am
Sounds exciting is this gonna help with that game you were making.

Also what are you planning to make for this game-jam?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 08, 2023, 07:58:10 am
If it fits the theme, I might try to make a diet version of DF legends. Not really a 'game', but should be manageable in 3 hours, and is an interesting project.

As for the commerical game...christ I haven't really thought about or worked on it at all. Maybe I'll try to figure out a fishing minigame instead, or just to learn the new engine features.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on March 08, 2023, 08:18:30 am
Maybe I'll try to figure out a fishing minigame instead, or just to learn the new engine features.

Or perhaps combine these?
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 09, 2023, 02:51:46 am
Combining things is always a good way to learn how they work.
Title: Re: Can delphonso make a commercial game?
Post by: eerr on March 09, 2023, 02:11:09 pm
If it fits the theme, I might try to make a diet version of DF legends. Not really a 'game', but should be manageable in 3 hours, and is an interesting project.

As for the commerical game...christ I haven't really thought about or worked on it at all. Maybe I'll try to figure out a fishing minigame instead, or just to learn the new engine features.
Text can be... quite alot of work.

Like, there's a reason most games avoid text like the plague.
Aka it's just as much work as pictures except not as cool or interesting.

Of course, now I'm back on my discord bot making something with exactly that. (and way too much boilerplate)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 09, 2023, 07:22:39 pm
That's true, but I also have a lot of experience with it and know I can crank out a lot of madlib content in just a few minutes. Pictures on the other hand...take ages for me.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 15, 2023, 12:09:10 am
Okay, the jam's topic comes out in 3 hours - I'll likely have a good chunk of time to work on it this weekend, and then send it off to my buddy to make music (he's also put himself in the 3 hour time limit, which is fun.)

Assuming the topic can fit this Legend-lite thing I've been thinking about, that'll be what I do. If not, well...I guess I'll need to figure something else out entirely.

I made a prototype of a fish-population legend-mode. Allowing you to click on a procgenned map and be told a type of fish there. Unfortunately the distribution is fully random at this point (as in, all oceans have the same list of fish, when in reality, I'd like both regional (northern fish and southern fish) and depth (near-shore and deep sea) discrimination. That said, it was a successful and quick project that I then set about remaking in Godot 4.

Then I realized how different Godot 4 is. It's pretty different. Maybe as different as the jump from Python 2 to Python 3. Many of the things I used are now completely different.

Some examples:
OpenSimplexNoise allows you to generate noise (like white-noise on a TV), obviously. This has been replaced by FastNoiseLite, which also has a host of different methods. Though, generating noise from a seed is still the same.

Tilemaps were fully re-written. Most of the functions you can call from a tilemap are gone or changed - including the essential tilemap.get_cell(coordinates) which would just tell you what tile is at that cell. I used this in the tactics prototype as well, so it's something I'm relying on. Tilemaps now have several different getters and they're a bit more complicated now. But far more versatile. Tilemaps now work with layers very easily, which is something that was frustrating me in previous 3.5 projects.

There's also some small changes to thing I always use such as OS.get_window_size() - which has now been changed to DisplayServer and has its own methods. A lot to learn here!

After this jam, I'll remake this fishing world gen thing and see if I can make things regional without too much work. It's a project I'm, for some reason, really into - and would be pretty good for learning how Tilemaps now work.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 15, 2023, 01:07:06 am
Seems strange that they changed how some things worked when they updated, you'd think they'd keep already established things the same to ease people into the new version.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 15, 2023, 07:39:31 am
Some were fully necessary changes. The tilemap editor in Godot 3.5 is both unintuitive and clumsy (easy to make mistakes with no clear undo capacity) - so that's a welcome overhaul. OpenSimplexNoise is also quite slow, so it required a revamp as well (noise is often used to generate things like fog and water effects).

Some shifts make less sense to me, but I haven't learned enough about them to fully understand /why/ the changes were made, which I expect will justify them.

The Jam's topic is "Madness Everywhere!" and about 40 people have joined as well! The topic made me instantly think of "Weird War" stuff, so maybe I'll make a legends-lite that's about an island that steampunk allies are trying to claim from undead nazis?
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 16, 2023, 03:17:59 am
That sounds pretty cool. Also what is weird war, I haven't heard of that one.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on March 16, 2023, 07:12:22 am
That sounds pretty cool. Also what is weird war, I haven't heard of that one.
There's a series called "World War Weird" (never seen, read the listings) that covered 'out there' elements of WW2, like the Japanese fire-balloons sent against the US, vehicle prototypes that never-where but could-havehbeen and some of the odder and less well known operations in general.

Then then there's also a horror-based war-set RPG system.

But I took it as more that of hyperfanciful V-weapons (and allied equivalents), in the vein of Return To Castle Wolfenstein (and/or the mystical side of "what the Nazis might have done"). Perhaps the Red Alert (Command and Conquer) sort of thing, with factions, scope and gameplay design of whatever kind. But there's all kinds of possibilities. I shall await any announcements by the thread owner before trying to pollute their decision-making with too many of my own wilder theories as to where this could lead. ;)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 16, 2023, 09:43:51 am
Yeah that's more or less what I was referring to. Mostly the Castle Wolfenstein weird tech-magic. I began work on the game - the code is quite simple and I cracked it out in about 15 minutes. Then I spent about an hour writing lines for the madlibs - which teetered a bit away from Weird War and took some inspiration from the books I've been reading lately (Solaris, Roadside Picnic, and War of the Worlds.) Everything is still a bit mad and reckless. This leaves me with an hour and a half to tie it all into a graphical interface, and build the basic architecture of scene transitions, music, etc. This is going to be tight, honestly.

I've got a timer that is keeping track of my work - total so far is 1 hour, 18 minutes.

Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on March 16, 2023, 12:10:02 pm
Weird War is a nice genre! With WWI there's all manner of Lovecraftian possibilities and then with WWII all the Nazi Occult stuff (which Wolfenstein builds on).

The topic made me instantly think of "Weird War" stuff, so maybe I'll make a legends-lite that's about an island that steampunk allies are trying to claim from undead nazis?

Wouldn't that be more dieselpunk (https://en.wikipedia.org/wiki/Dieselpunk) than steampunk if it's set in the interwar period? ;) (Just saying because steampunk got absolutely ruined when it became all goggles and top hats, thanks to the goths. *hisses*)

Also, undead nazis. There's a whole lot of really, really bad b-movies with nazi zombies and occult stuff. (https://www.imdb.com/list/ls008635837/)

This one I haven't seen, but the concept is quite the WTF!?:

Quote from: Elves (1993) - IMDB description (https://www.imdb.com/title/tt0099496/?ref_=ttls_li_tt)
A young woman discovers that she is the focus of an evil Nazi experiment involving selective breeding and summoned elves, an attempt to create a race of supermen. She and two of her friends are trapped in a department store with an elf, and only Dan Haggerty, as the renegade loose-cannon Santa Claus, can save them.

Edit. The list has some good ones, too. One of my favourite found footage films is Frankenstein's Army (https://www.imdb.com/title/tt1925435/?ref_=ttls_li_tt). If you're into (bad) zombie flicks, WWII and weird monsters combined, I highly recommend it!
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 17, 2023, 02:45:26 am
I wish more horror related things would use WWI as a back drop, so much potential yet to be used.


Quote from: Elves (1993) - IMDB description (https://www.imdb.com/title/tt0099496/?ref_=ttls_li_tt)
A young woman discovers that she is the focus of an evil Nazi experiment involving selective breeding and summoned elves, an attempt to create a race of supermen. She and two of her friends are trapped in a department store with an elf, and only Dan Haggerty, as the renegade loose-cannon Santa Claus, can save them.

Edit. The list has some good ones, too. One of my favourite found footage films is Frankenstein's Army (https://www.imdb.com/title/tt1925435/?ref_=ttls_li_tt). If you're into (bad) zombie flicks, WWII and weird monsters combined, I highly recommend it!
Those sound beautiful, I'm gonna see about watching those soon.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 17, 2023, 03:31:13 am
I don't reference Nazis specifically, though I do set the dates during WWII, but obviously with some alternate timeline stuff happening (countries at war are derived from a 'government type' and then a 'country name'. So you get Kingdom of Germany, as an example).

Elves sounds like a perfect movie.

Hopefully will finish the game tonight, post it here, and send it off to the music guy.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 17, 2023, 04:08:46 am
The hype, it grows!
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 17, 2023, 10:04:41 am
https://delphonso.itch.io/delph

A download for a 32 bit Windows version is there too!

It's up! I've got about 20 minutes left to iron any bugs out and to add in the music manager, etc - easy work, really.

It's....a lot less impressive than I hoped. But for 3 hours, this is pretty dang good, I'd say. I've come a long way since two years ago. There are still like...5 days left in the jam, so I'll wait to submit it until music is managed.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on March 17, 2023, 11:35:44 am
So far looking good! I like that you've taken the DF route and kept the descriptions vague. Makes your imagination run wild, and there's plenty of potential to create a (mini-)campaign for some Lovecraftian WWII ttrpg. :)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 18, 2023, 04:36:30 am
That thing is pretty cool, could probably use it for the base of a game if you wanted, also I'm still impressed that something like this can be made in such a short amount of time.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 21, 2023, 10:12:17 am
It's DONE, BAY-BEEEE (https://delphonso.itch.io/www-storygen)

Parker did the music in 1.5 hours and although I don't think it's a perfect fit, it absolutely slaps.

So far looking good! I like that you've taken the DF route and kept the descriptions vague. Makes your imagination run wild, and there's plenty of potential to create a (mini-)campaign for some Lovecraftian WWII ttrpg. :)

Yeah, I'm happy with the "stories" it generates. I just tested it one last time and found a small, 4-tile island in the south containing only carvings of strange beings and the fact "the locals call this place 'big man's grave'. Our monkey brains can't help but fill in the details.

That thing is pretty cool, could probably use it for the base of a game if you wanted, also I'm still impressed that something like this can be made in such a short amount of time.

Yeah, I'm quite happy with the technical side and being able to rely on myself to write a couple hundred strings without interruption in an hour. I wish it were more of a game and more of something to do.

It's certainly a starting off point, but most importantly, it really did re-ignite some desire to code. So hopefully I can ride this wave for a while.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 22, 2023, 03:28:39 am
Are you gonna keep working on this one or are you going back to that thing you were working on before?

Also I hope it does well in the voting!
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 25, 2023, 02:57:55 am
3rd place (out of 20) and rated number 1 in creativity again!
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 25, 2023, 03:16:09 am
Congratulations man!
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 28, 2023, 08:24:25 am
Are you gonna keep working on this one or are you going back to that thing you were working on before?

I'm right now just working on some small technical projects while learning Godot 4. If any of them are fun or interesting, I'll put them in the thread here.

Most of it is just grey squares with buttons that output to the terminal, testing how to connect things in the new version. It's not particularly fun or interesting so far.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 29, 2023, 04:13:20 am
It sounds interesting to me even though I'm a person that knows nothing about coding, the closest I've come to coding is modding Cataclysm DDA.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on March 29, 2023, 04:17:02 am
3rd place (out of 20) and rated number 1 in creativity again!

Nice! Congrats!
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 29, 2023, 06:08:38 am
Cataclysm DDA.

Don't you dare get my thread locked.

I actually implemented Conway's Game of Life (https://conwaylife.com/) in 3 dimensions today. Right now, the cubes only check 6 directions (+ or - 1 to each axis) which makes it even less sustainable than the regular game of life. I'll mess around with it and see if I can find a good balance between processing time and sustainability. Then...honestly no idea how to do an interface, but I could put that together and release it. It's been a satisfying problem.

Unrelated to gamedev, for now, but I've been using DeepAI (basically ChatGPT) as a way to solve coding problems I'm running into in bash/the linux terminal. It's been great, and clearly is a better way to learn some basics (if it's reliable) than asking on reddit/stackexchange. However I do miss long PMs to and from Starver about this stuff, so I might switch back.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on March 29, 2023, 08:43:36 am
This was mostly (at least in general gist) 'written' in my head before I even saw the closing line of the above post. With the caveat that I'm really not an expert, just an enthusiastic wannabe-polymath (but so far failed). But.. luckily, it seems you like my long posts. And as that is very much my default mode... ;)
 
I actually implemented Conway's Game of Life (https://conwaylife.com/) in 3 dimensions today. Right now, the cubes only check 6 directions (+ or - 1 to each axis) which makes it even less sustainable than the regular game of life. I'll mess around with it and see if I can find a good balance between processing time and sustainability. Then...honestly no idea how to do an interface, but I could put that together and release it. It's been a satisfying problem.

The general algorithm for N-dimensional adjacent+diagonal checking would be:
Code: [Select]
for D1 (-1..+1) {
  for D2 (-1..+1) {
    for D3 (-1..+1) {
      [...any more Ds you want up to DN..]
      next loop if (D1 D2 D3 [as needed, up to DN] all equal 0) // i.e. skip if no non-zero values
      countTally+=CheckNeighbour(here.axis1+D1,here.axis2+D2,here.axis3+D3[,...here.axisN+DN])
      // However you count things and accumulate them, in your version
    }
  }
}
// now use the countTally
There's a version of that which just loops by N, within a handler that holds the iterations of all D[N] array items, but that's the one you can manually hardcode to handle greater or lesser dimensions, which is all you want if you're not going arbitrarily far up. And is better than for D (1..N) { checkNeighbour(here.axisD±1) /* etc */ }, as it gives you the corners (compound displacements) without needing to ensure you're covering all cases explicitly.


Additionally, the traditional Conway "machine" is described by B3/S23, just two number-sets. The number of neighbours that cause a 'birth' (empty cell being made to live, i.e. 3 live neighbours) and the number that cause a 'survival' (the living cell not dying, here being 2 or 3 live neighbours). Even in 2D GoLs, you can use other sets, to create different evolutions of pattern. And it need not be contiguous or even make any particular sense (e.g. B0/S02468, top of my head, no idea if that does anything interesting other than autofill an empty-field into permanent fullness!) but there are indeed interesting versions that are not B3/S23.

My suggestion is that you tweak B3/S23 into something that seems to work 'as well' in 3D as 2D, by at least making S=(2,3) into something higher-topped (maybe higher-bottomed, too?) to reflect the fact that you have 26 'neighbours' instead of just the 8. But whether some B(9?)/S6789[10,..?] is linearly equivalent or not would be trial and error on your part.

Perhaps try prospective formulae upon every single 3x3x3 pattern (you can code that, automatically, similarly to the the neighbour-code, above) then either procedurally or visually check to see if any 3x3x3 cycles emerge from that, to confirm that statics, oscilators and gliders result (even better, emerging gliders but I think 3x3x3 might be too small for a classic glider-gun unless it expands out). If you get any likely B#/S#, you can pay more attention to these, but any variation of B and S rule that just goes superdead or superlive (or superstatic) for all cases, within a few cycles, can probably be readily forgotten.


Visualisation is a doozy. I'd probably do a grid of grids (well, a line of grids, unless doing 4D), where you show a subset of the field (say start with 15x15) in a number of slices (15 of them), the centre of the central one being tile 0,0,0 etc... Rendering a 3D view (isometric would do, no need for complicated viewport stuff,perhaps just add visual cues like hypsometric shading/shaded relief to add depth cues to distinguish near 'cubes' from non-near ones that just look like they are touching) can be done in a bit of canvas off to one side of the grid-slices area, if you like, but neither view alone will be perfect. (Like 2D GoL, you have to consider how big the visual grid can be, what happens if the active cells get near the border[1], etc. But you'll have decided what method you like for the 2D version, I imagine.)


All of this, and more, will have been addressed by 'professional' GoL academics and fanboys alike. There'll be lists of other "useful" 2D B/S rulesets, and perhaps even someone exhaustively proven any equivalently interesting 3D (or moreD!) rulesets. Or else proven them as mathematically implausible for the same sort of reason as Fermat doesn't work well with indices beyond 2...

But I think you'll enjoy finding out. I'm pushing some of my own 'clues' as to how *I* would do this (again[2]) to perhaps help you on your own way. But it might just end up being a distraction, so be sure to use your proven skills at scheduling to only spend a limited amount of time on it before actually stopping yourself from tweaking it further and sinking more of your time into it than you planned. This is one of those rabbithole projects, if I'm any judge. ;)


[1] Your playing array ought to be bigger than the visual window, unless you're implementing wrap-around in all directions, and maybe you allow it to increase the array as more rows/columns/slices are needed (or shift the playing field over, if it's only "bursting out" on one edge).

[2] Hands up... Yes, I've done it before, but with much more primitive computers/code. And I could have really done with more than a few kB of working memory and a relatively low-res screen to output through! Darnit, I might just try it again myself, I could probably do it in Perl with only about half the time spent trying to decide how to implement the data-structure so that I don't eat up memory like nobody's business... ;)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 30, 2023, 03:10:15 am
Cataclysm DDA.

Don't you dare get my thread locked.
Hey man I didn't bring any of the drama nor was I involved with it so we should be safe from it here.


Is Cataclysm going to become a forbidden word here at some point because of those people and their drama?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 30, 2023, 07:05:47 am
So I've now got two computers, and that project is happening on my work computer - from memory, I can detail it as follows:

It's bound to 3 dimensions, as every cell is a cube that is instanced.
Right now, the cells check their neighbors themselves. If their neighbor is empty, they pass that information up to the map, which attaches an integer to it. This integer goes up the more cells are next to it.
This way, the game isn't keeping track of the whole map and checking all the empty cells for neighbors. I assume this is faster, but have no actual clue.
The cells check their neighbors in 18 directions right now. That's everything in a 3x3x3 cube except the corners. This produces interesting patterns still, and is a bit faster than checking all 26 directions.
As for the rules I'm working with, I've cleverly not hardcoded them and so can change them pretty easily whenever I'd like. It's 3 or greater neighbors to spawn a new cell, and the safe zone is between 2 and 10 neighbors.
The "world" is a hallway about 30 by 30 cells, and open on each end. The game will slow to fully freezing before the cells reach out the hallway, as of now. When I make an interface, maybe I can make it so the player sets the rules for the game.

I'm undecided on changing the cubes to be semi-transparent, or just allowing the user to pause at any time and move around the space to look at their cubes, clipping and all.

Is Cataclysm going to become a forbidden word here at some point because of those people and their drama?

I think only for a week, then we'll move on.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on March 31, 2023, 04:08:48 am
That sounds pretty cool are you planing to make a game out of it or is it just gonna be a cell replication simulation?

Also won't your boss get mad about you making this on a work computer?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on March 31, 2023, 07:26:11 am
I'm actually wondering if all these tests I'm making in Godot 4 could be tossed together into something like a portfolio project. I also have a weird desire to make Simon, which is not really a standalone game by any means, but could be put in the same "game" as this and maybe some other stuff. I don't know where that chain of thoughts will go. Warioware?

Also won't your boss get mad about you making this on a work computer?

China has like... 3 hour lunch breaks where people usually sleep after eating. I don't eat as heavy a lunch as most folks here do, so I don't feel the need to pass out for that long. It's free time for me. Aside from that, I'm pretty good at my main job, so people are willing to give me a pass on some stuff. Plus the occasional automation of office tasks that I can do puts me in their good graces.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 01, 2023, 03:16:04 am
I also have a weird desire to make Simon, which is not really a standalone game by any means, but could be put in the same "game" as this and maybe some other stuff. I don't know where that chain of thoughts will go. Warioware?
You know that'd be pretty cool to have a game filled with mini games, you'd even be able to use all the other small games you've made for it.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on April 01, 2023, 03:22:08 am
I also have a weird desire to make Simon, which is not really a standalone game by any means, but could be put in the same "game" as this and maybe some other stuff. I don't know where that chain of thoughts will go. Warioware?
You know that'd be pretty cool to have a game filled with mini games, you'd even be able to use all the other small games you've made for it.

For some reason the first thing I thought of was Space Quest III and the arcade game you could play in it. Astro Chicken was its name, I think.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 08, 2023, 09:22:34 am
I also have a weird desire to make Simon, which is not really a standalone game by any means, but could be put in the same "game" as this and maybe some other stuff. I don't know where that chain of thoughts will go. Warioware?
You know that'd be pretty cool to have a game filled with mini games, you'd even be able to use all the other small games you've made for it.

For some reason the first thing I thought of was Space Quest III and the arcade game you could play in it. Astro Chicken was its name, I think.

We'll see if my work-computer turns into a Wario-Ware thing. I love a good old fashioned "game in a game". Hell, I think that's why I played the Yakuza series at all.

So, uhhh....


Dwarf Fortress Fan-game RTS?

After using AI to generate that image of dwarves fighting a cyclops, and coming off a recent discussion with a friend on the dwindling RTS supply, I think this is the project for me:

A dwarf-fortress themed RTS. The mechanics and what's special? Right now, genuinely nothing, because I gotta learn the new engine, baby and also have never made an RTS.

Let's get started with the basics:

(https://imgpile.com/images/hcY6Cx.png)

We'll need 3 types of objects: A command center, a worker and a resource node. I played Starcraft a lot as a kid (it was the only game I had for quite some time), so a lot of my references and influence will come from there, despite the game being more similar to Warcraft, I expect.

So, the command center serves the following functions:
a place to generate new units
the place where units drop off collected supplies.

The workers:
collect resources from a resource node
carry it back to the command center
continue to work without direction

While resource nodes:
stand there and look pretty.

So, let's get to coding.

Quite simply, the resource node does nothing but keep track of how many resources it has, here-on referred to as 'metals'

(https://imgpile.com/images/hcYveL.png)

In the editor, the metals node is a simple object. A sprite with a collision box and an area around it with its own collision box. I also add it to the group "resource".

Groups are not a new feature, but are something I only really just started using. They're similar to "classes" in computer science terms, but in practice are just a way to identify and group nodes. If you have a bunch of objects all over a mario-like game, for example, you can have a group of "hazards" and a group of "platforms" and have the player always walk on top of platforms and die if they touch a hazard. It's pretty straight forward.

The command center itself has no code, really - I didn't even make it a separate scene, and just baked it into the "world" scene. It is very similar in structure to the resource spot. It has one extra element called a Marker2D, which is just the new name for Position2D - a position on the map where I can spawn new units from.

The workers are called Migrants right now, and are pretty straight forward State-machines.

(https://imgpile.com/images/hcYQMP.png)

They can Idle, where they just stand there, they can move - which allows them to walk in a straight line toward their target, and they can collect which would be them mining for metals or dropping off at the command center.

You'll notice this new guy "await" - it's the new version of yield in Godot 4, and seems pretty smooth. Here it's just waiting 1 second.

All the direction information happens when the pawn gets close to a building. It's all here:

(https://imgpile.com/images/hcYgA1.png)

I check what group the nearest object is in, which should always be whatever the pawn runs into while walking, but could become an issue if there are buildings in the way.

Cargo is dropped off if it's a command center, and you head back to the resource. If it's a resource, cargo is collected and the value of the resource spot is dropped - then they target the command center.

I use a placeholder called "last_target" so they can remember where they last collected resources and use home as a permanent storage place for the command center. After dropping things off, they head back to where they came from, to collect more. If the resource is depleted when they get there - they just idle.

With all that done, basically all that is necessary is player input, and that's where things got tough. This all changed quite a bit from last version, and I also heavily relied on Tilemaps for my last few games, which are also completely different.

(https://imgpile.com/images/hcYE8j.png)

You can see I was getting pretty desperate by the time I figured it out...

So here's what's happening... When you click on the map, we need to figure out what you clicked on.

We check to see if it's the command center by grabbing the command center sprite and getting the rectangle that it fills. get_rect() returns something that looks like this: P: Vector2(-16,-16), S:Vector2(256,256) P is for position, and is a local variable - so since the sprite is anchored to the parent at the top-left corner, P = 0,0. S is for size, if the sprite is 256x256, then you'd get what I have in the example there. Here's the issue - Rect Objects can change to a different format: Rect(x,y,height,width) which is the same, but the values are separated. Different operations in the code can convert the rectangles to either format depending on the operation - which, my brother in Christ, is something I did not know and spent about 40 minutes confounded by.

So, here's my easy solution: reset the P to the global_position of the sprite's top-left corner. There's a couple issues, though. That size value is unmodified. Inside the editor, you can scale up or down these sprites, but the Rect that is returned by get_rect does not take that into account, and modifying the Rectangle changes it to the second format, which makes assigning it to the correct global position just a bit more inconvenient. It's a pain in the ass and I don't want to deal with it at all - and I shouldn't because There's Got To Be A Better Way!

I'll figure one out, but this is functional and enough work for today. But wait! - if this is such a pain in the ass, how will you handle selecting units?

Heh, here's the trick kid...

I won't.

(https://imgpile.com/images/hcYFIW.png)

We add a button to spawn new migrants if you have 200 resources.

(https://imgpile.com/images/hcYWBN.png)

Press the button and get a new migrant - they're already fed the information they need: home is where the heart is, and go find a random resource node.

(https://imgpile.com/images/hcY0cc.png)

Heh. It's too easy.


Also it looks like shit.

(https://imgpile.com/images/hcYp6o.png)

-=-=-=-=-=-=-=-=-=-=-=-=-

ENJOY! (https://delphonso.itch.io/delph)

Click is the only control.
There's a Zultan Approved Windows 32-bit version too.

FAKEEDIT: After uploading I remembered that Godot 4's HTML exports are still fucked, so instead, there's also a linux export there, if you want to play.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 09, 2023, 02:07:43 am
It looks really cool but I can't play it for some reason, a thing pops up and says I have the wrong Vulkan version, not really sure what that means.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on April 09, 2023, 02:48:47 am
a thing pops up and says I have the wrong Vulkan version

Have you been watching something that has someone else than Nimoy as Spock?
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 09, 2023, 03:16:27 am
a thing pops up and says I have the wrong Vulkan version

Have you been watching something that has someone else than Nimoy as Spock?
I don't think that's the problem as I've only watched the original Star Trek, so it must be some other thing to do with Vulkans.
Title: Re: Can delphonso make a commercial game?
Post by: EuchreJack on April 09, 2023, 04:09:39 am
(https://i.ibb.co/kSXYgW7/delph-s-digi-domain.png) (https://ibb.co/TgtzBFf)

Nope, not working.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 09, 2023, 04:13:08 am
I to got that when I tried it in the browser.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 09, 2023, 04:27:47 am
Yeah the browser one is known to be borged borked, but the Windows one is supposed to work. I'll read up on it tonight and try to get a working version out.

Edit: we didn't get home until nearly 9 and I've got work tomorrow, so I'll miss this for a night.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 11, 2023, 01:14:33 am
Or I'll miss it for several nights. Look, I'm a busy guy.

I've got a solution I'm satisfied with, for now - still need to better systematize and optimize it, but I'm good with this.

Code: [Select]
var command_rad = 72 (size of sprite)

func _input(event):
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
for centers in get_tree().get_nodes_in_group("command"):
if (event.global_position - centers.global_position).length() <= command_rad:
print("command center clicked!")

This simply subtracts the center position of the object from the position of the mouse click. If the length between them is less than the size of the sprite, you must have clicked on the sprite, and thus, have selected the thing you want to select. This is good, and works despite re-sizing, as I can use some code to get the size of the actual sprite just once when starting the game.

Okay, I'm working on the exporting thing now.

Zultan, try downloading the zip (https://delphonso.itch.io/delph) I've put up there now, as it might work?

Also, EuchreJack, do you happen to use Firefox?


Exporting issues:

You can now export Godot to HTML, again - but it requires a special header that Itch only supports outside Firefox (for now?)

Exports for Linux, Mac and Windows should all still work just fine, but all require some set-up first. I'm a bit wiped to try and figure that out now, but will work on it. If it's really too much of a pain, I'll downgrade myself back to 3.5 until it's easy-peasy again. The Vulkan issue could be a driver issue, which I might be able to fix by changing the export engine, as I tried in that export there.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 11, 2023, 03:36:20 am
Zultan, try downloading the zip (https://delphonso.itch.io/delph) I've put up there now, as it might work?

Also, EuchreJack, do you happen to use Firefox?
I no longer get issues about Vulkens but now it's saying my Opengl doesn't support 3.3 whatever that is and I've never been brave enough to figure out how to do something about it, guess I'll be missing out on this one. Not sure why it's an issue now I've been able to play all the games you made before this one.


Also I was on firefox when I tried to play it in the browser.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 11, 2023, 04:09:10 am
The transition to Godot 4 included a rendering engine overhaul. Vulkan is the frontrunner, but there's a 'compatibility mode' which uses OpenGL, though obviously the OpenGL version is different than what I was using in Godot 3.5. Some of the details are too technical for me, so this might be a bit fast and loose on credibility.

I'll see if I can get the browser one to work, as it should work on any Chromium-based browser (read, literally all of them now).


Edit: "Godot 3's HTML5 exports are more compatible with various browsers in general, especially when using the GLES2 rendering backend (which only requires WebGL 1.0)."

The headers issue is one of those tech issues that is so simple to programmers that they can't communicate it to people like me. Alas, I'll keep trying for tonight. If all else fails, I'm at a good place to switch back to Godot 3.5 - almost everything I'm doing is in-code, and thus won't be horribly effected by the shift to 4 should I choose to do so later.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 11, 2023, 09:26:16 am
Ughh....

It's too late for me to explain the code.

Come...closer...

I need to tell ya something....



I fuckin' did it.

Feast your eyes (https://delphonso.itch.io/delph)

(left click to select the migrant, right click to move it/send it to a resource. No migrant spawning, I've got to go to bed.)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 12, 2023, 12:10:08 am
Jesus fucking Christ I accidentally closed this whole post...

Quick version:

Take the click, subtract it from the sprites, if within radius, you clicked sprite.

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/PvwjEphSgItRbMsBNOdZSxSh)

Select_node is slap-dash last night. flash_resources is good, and I'll try to do something similar with the other functions - probably something with signals that the ui can catch.

(https://images2.imgbox.com/ad/70/gikfSWoM_o.png) (http://imgbox.com/gikfSWoM)

I used classes instead of groups this time, but I think I'll use both - probably classes for inter-unit interactions, but groups for player-input. Sprite radius is taken by this same line everywhere.

(https://images2.imgbox.com/b8/34/hmmQhFk4_o.png) (http://imgbox.com/hmmQhFk4)

You can see it in the migrant as well. Most of the values are the same, except the "my_title" thing which is tossed back up to the UI.

(https://images2.imgbox.com/cb/a8/Y6I5XHpm_o.png) (http://imgbox.com/Y6I5XHpm)

Metals can only flash their resource, which I actually quite like - I'll make the text bigger, give it a background, and probably use .show() and .hide() instead of this.

(https://images2.imgbox.com/bf/dd/6PDyCpqS_o.png) (http://imgbox.com/6PDyCpqS)

Also the body-checker is rewritten to be a bit better, however there is still an issue with walking past resource nodes that are empty while you're on your way back to one that isn't. I put those in there intentionally on the map, but forgot to program them around it.

(https://images2.imgbox.com/74/54/xwxO622s_o.png) (http://imgbox.com/xwxO622s)

I skipped over a lot because I already wrote this once and FUCKED IT UP. Basically, the structure underneath everything is way better. Controls are their own node, allowing me to scrap them quickly and iterate. It also allows for swapping out to AI easy, and using different control schemes for camera and actual gameplay. Aside from the file-structure, I'm trying to keep everything as autonomous as possible.

-=-=-=-=-=-=-=-=-

I'm very excited by this project. Like, far more than any game I've worked on so far. I'm excited to make something for the DF community, and I'm excited to make a Starcraft-like. I find myself thinking about the code and how to improve it as well as keep it flexible to emulate things from Starcraft (special scenarios, etc.)

Here's what I'm thinking of as my goals:

Task 1:
Add a command center and resource node.
= Builder units collect resource when directed to a resource node.
= Builder units path back to nearest command center from resource node.
= Command center can make more builder units. Ensure units do not spawn on top of each other.

Almost done! Will probably finish tonight.


Task 2:

Create a template building, builder unit, template barracks and combat unit.
= buildings are simply a button (perhaps even without a UI) that produces a unit. Ensure units do not spawn on top of each other.
= Click a unit to assign it a building task. Unit paths to the building location and builds it. Unit moves out of the building to avoid hiding/clipping.
= Place buildings on a grid of some sort, to ensure no overlaps.
= Click a unit to direct it to move somewhere.
= Click and drag to select multiple units, and direct them all to move somewhere.

Task 3:

Structure building and unit upgrade tiers.
= Make a template building, make a template research station, make a template barracks.
= The research station can not be built without a building and a barracks.
= The barracks only produces one type of unit, unless the research station is present, then it can make two types.
= The research station can upgrade the stats of all units on the field.

I think when I've done these 3, I'm on to the content-creation side. Making the factions (two just to start with), and the units each faction can have, as well as their upgrade tree. Maybe when those 3 are done, I'll make a separate thread - if I feel there's enough of a game for it. Hopefully this is something that actually looks done and is commercial quality in a year or so.

-=-=-=-=-=-=-=-=-=-=-

Compared to the fishing game - which is a game I want to make because I have an itch that is not scratched, this feels much different - this feels like something I'm making as a gift, and that has been a different experience entirely.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 12, 2023, 03:14:58 am
That newest version to download worked for me, but I wasn't able to play in browser.


I'm liking it so far and your plans for the future sound really cool even if I'm not that into RTS games it still sounds like something I'll play.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 13, 2023, 09:31:40 am
Try it now! (https://delphonso.itch.io/delph)

Task 1 is complete, I'd say!

Bugs:
Controls are fucked, because of parenting - alas, I'll fix it next time. If you can't click something, move the camera to the top-left.
Spawning multiple units spawns them in a stack on top of each other. Clicking them and giving them orders makes them fly off into outer space.
Units do not pathfind. Good luck out there with your mosh pit outside the command center.


Write up...tomorrow, maybe? I need to get more than 5 hours of sleep a night.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 13, 2023, 11:56:27 pm
Alright, so here's where I'm at:

I'm quite satisfied with what I ended up with in really, 3 nights of work, one of those nights completely redoing what I did the other night. It's buggy and looks like shit, which is my aesthetic. I'm also fully willing to delete this completely and start from scratch for Task 2. Before getting into that, let's talk about the additions to the code since last time.

(https://images2.imgbox.com/3f/f5/d2rSDLvx_o.png) (https://imgbox.com/d2rSDLvx)

Instead of immediately instancing the controller, we instance a new scene which is just the camera. I'm separating the camera and controls so that one could spectate 2 AIs fighting without needing a whole new control scheme. Here's the issue, though - since the controller also has the GUI, the controller needs to be the child of the camera. For some reason, this completely fucks controls.

(https://images2.imgbox.com/aa/9f/JvyKTny9_o.png) (https://imgbox.com/JvyKTny9)

Controller is added as a child to the camera, and the controls are simple - pressing WASD or the Arrows puts you 20 pixels in that direction. Because the camera's location is technically the top left corner, there movement math seems off - it's possible to go 20 pixels outside the world map (2048x1200), so we just subtract 20 from the width limit.

As for the controller bug - I think it's probably related to how the camera operates. I wouldn't be surprised if the camera doesn't move, but everything on the map moves instead - meaning the coordinate system is a bit borked and will need a rewrite. But hey! That's why I added camera controls anyway - to see if there's anything that needs tweaking. You can see that if you click the command center, for instance, then move the camera over to the right, if you don't move your mouse, or move it to the same spot, you can click the command center despite it not being there. It's storing the coordinates based on the window, not on the map itself. I'll fix it.

(https://images2.imgbox.com/94/34/NfSKIDWd_o.png) (https://imgbox.com/NfSKIDWd)

The command center gets a new function to spawn a migrant. I spent well over an hour trying to get a method for testing if anyone is already there. I'll watch a video on how other people do it, or check the source code for 0AD (an open source RTS that is a ready resource). It's really only an issue because two units in the same place will go into superposition and be unable to do anything because their positions are not where they appear to be.

I find it quite satisfying to see the little guys walk back and forth, and to see the metals number go up, but there's still a lot of work to do!

Such as:

Task 2:

Create a template building, builder unit, template barracks and combat unit.
= buildings are simply a button that produces a unit. Ensure units do not spawn on top of each other. [1]
= Click a unit to assign it a building task. Unit paths to the building location and builds it. Unit moves out of the building to avoid hiding/clipping.
= Place buildings on a grid of some sort, to ensure no overlaps. [2]
= Click a unit to direct it to move somewhere.
= Click and drag to select multiple units, and direct them all to move somewhere.

Issue [1]:

I still am not sure of a good way to do this. I'll need to think on it a bit to formulate a good solution - every RTS manages it, so it can't be that hard. A cheap way is to spawn them at the mouth of the building, then send them to path to a point nearby, which would push other units out of the way. Speaking of which, I'll also take another crack at pathing for the pawns this time.

The good thing is, if I can solve this, the second subtask can probably use the same process as well as the grid.


Issue [2]:

The grid is an interesting challenge. I think it's actually quite easy - just give a parameter of say 64x64 and snap the sprites to that grid. If I do that and make the buildings smaller, they couldn't possibly overlap - though it'd be good to do half-stages like Starcraft does and detect where a collision might occur. I may also be able to do some pathfinding with the grid.

Keep in mind the grid will have to be done programmatically, because tilemaps are fully different in Godot 4 - and if I ever want to move up an engine, I can't rely on them. I might do a bit of programming tonight! We'll see!
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 14, 2023, 01:57:30 am
You seem to be making massive amounts of progress in very little time, I don't get how you do it as programming seems like magic to me.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 15, 2023, 02:21:16 am
Some of this is stuff I've already done (migrant movement isn't too different from Sewer Kings combat plus the state system of the fish/Sleeper). A lot of this is totally new territory though, which is why it's pretty janky - and will need to be rewritten a few times. Mostly I'm trying to think a few steps ahead and build a flexible enough game infrastructure that I can handle stuff like a campaign later.

The guy who made Delta V said something like 'Game dev isn't hard, it's just thousands of simple tasks you have to do.' Which is pretty true, I think. It's a big list of problems with pretty simple solutions. The speed comes from me just not making any more problems with my solutions.

I got two hours of sleep last night and so will likely not work on this over the weekend. I'm doing some 'research' by playing some other RTS games. 0AD, for example, is very technically impressive, but a bit exhausting overall. A lot of resources and the tech trees are complex in a way I don't find rewarding.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 17, 2023, 08:00:15 am
Okay, so the input bug was an easy fix - it wasn't actually a global_position bug, it was an event.position bug - it's already fixed and now means you can click around whereever.

This  (https://kidscancode.org/godot_recipes/3.x/ai/context_map/)will likely be my solution for pawns moving about and bumping each other. Tomorrow, I'll either try to get a working version of this, or build on my existing code to allow for the challenges of Task 2.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 18, 2023, 12:38:00 am
Okay, I promise I'm done with Task 1.

It's here! (https://delphonso.itch.io/delph)

So basically all this does is fix the annoying camera bug, and add a very shitty pathfinding (technically steering/avoidance) behavior to the migrants that I stole from this tutorial. (https://kidscancode.org/godot_recipes/3.x/ai/context_map/) This code was written by moonmen and it's a joke that this is intended for kids. It does use an interesting function of the engine that allows you to throw raycasts without instancing them, which I should probably learn how to use. However it is not particularly reliable when it comes to avoiding moving objects such as other units (I think this is one of the improvements of Godot 4). Overall the migrants are less likely to get stuck, but still do occasionally get stuck when jobs are finished and they have nowhere to go - this is fine, as it is also how it works in Starcraft (though it looks less glitchy when the SCVs do it.)

I didn't solve the issue when you spawn multiple dudes on top of each other - but oh well.

I also ensured the UI is above the migrants - previously you could get the migrants to walk on the UI because of how they were instanced later than the UI.

Important lessons were learned, and now to move on to Task 2.

This kids can code thing is actually driving me nuts and I'll try to better communicate what I'm doing in the next posts - because who knows if anyone will use this as a tutorial at some point.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 18, 2023, 05:00:50 am
Looking good so far, can't wait to see what's to come.

I didn't solve the issue when you spawn multiple dudes on top of each other - but oh well.
Is the issue where the guy flies off into space when you spawn a second one?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 18, 2023, 07:33:54 am
Yeah. The two (or more) pawns can be spawned in the same spot, but as soon as they move, they're going to do collision checks with each other, and apparently being perfectly inside each other doesn't have a good solution, except freaking the fuck out.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on April 18, 2023, 12:36:03 pm
If you don't want to do "is one of these spawned aready in collision with another, if so then deal wth that as a special case of rearranging the newcomer" (or, possibly, give it an immunity until things change), which is probably the best special-purpose on-spawn handling situation, then you could just make every standard collision check:
1) Add a randomised/cyclic (sub-unit) vector to element, to reduce clashes (if they clash because of this added jiggle, it shouldn't be a 'fatal' one and it just adds a little 'personal space' impetus to nearly-touching pairs).
2) If your system does an inverse-square repulsive 'force', jump in there and cap it at the "exactly touching" amount (or even refacor it to non-inverse-linear?)... i.e. refactor so that zero_distance=zero_repulse (and quantum-stacking, for the moment), and a steady increase of push, nothing tending towards infinity or max_Int...

TIMTOWTDI, depending on your preferences.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 19, 2023, 05:53:34 am
(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/HVMHrxASQDErlFhGBXCvATyC)

Apparently I solved the grid issue in a single line of code. All the more time and energy to make the game better.

Quite simply, I'll just check where the mouse is, then use the engine's snapped() function to snap it to the nearest point that is a multiple of whatever cell size I tell it. That cell size is stored in a Vector2, so I need to provide it with an X and a Y value. So a 4,2 is a rectangle that is 2 pixels tall and 4 pixels wide. The size of the grid that I want is stored elsewhere to make it easy to change whenever I want. Here the grid is 64, and I put it to half as it felt better. I can also add an offset by just adding another Vector2 to the end of that - get_global_mouse_position().snapped(Vector2(grid_size,grid_size)) + Vector2(32,32), I will probably do this otherwise the building will snap to 0,0 - which puts it at the top left corner of your screen and only 25% of it is visible.

I originally made a function to give myself a big list of all the acceptable positions to place the buildings, but that's really unnecessary - this is a simpler and more efficient solution. The biggest hurdle now will be again in the pawn behavior - they'll need to path to the desired building location and put it together, without getting stuck inside.

I also found this game (https://store.steampowered.com/app/370070/Wyrmsun) by browsing OpenGameArt. It's opensource and more in-line with my desires. Not a big fan of the overall design, but I'll definitely look at the code for solutions, and play a bit because it does look interesting. The sprites are on a CC0 license, so I'll probably use it as placeholders for now.

If you don't want to do "is one of these spawned aready in collision with another, if so then deal wth that as a special case of rearranging the newcomer" (or, possibly, give it an immunity until things change), which is probably the best special-purpose on-spawn handling situation, then you could just make every standard collision check:
1) Add a randomised/cyclic (sub-unit) vector to element, to reduce clashes (if they clash because of this added jiggle, it shouldn't be a 'fatal' one and it just adds a little 'personal space' impetus to nearly-touching pairs).
2) If your system does an inverse-square repulsive 'force', jump in there and cap it at the "exactly touching" amount (or even refacor it to non-inverse-linear?)... i.e. refactor so that zero_distance=zero_repulse (and quantum-stacking, for the moment), and a steady increase of push, nothing tending towards infinity or max_Int...

Aye, solution 1 was something I did immediately (position.x + randi(), position.y + randi()), but decided against it as it replaces one issue with another. Solution 2 is certainly possible, but manipulating the build-in physics handlers is a bit too much for me.

I'll likely just figure out a way to check for units, or perhaps shuffle old units out of the way instead. 0AD has the units come out in a queue that goes to 5, then starts a new queue. This seems to be standard, and I'm sure I can figure out a way to do it if I've got a clear mind and a bit of focus.

Quote
TIMTOWTDI, depending on your preferences.
This is one hell of an acronym, but hey TIMTOWTSAC.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 20, 2023, 03:58:42 am
I'm lost as to what the acronyms stand for.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on April 20, 2023, 10:17:52 am
https://en.wiktionary.org/wiki/TIMTOWTDI (Because it can be said as an acronym, I tend to use it in favour of the initialism 'original (https://en.wiktionary.org/wiki/TMTOWTDI)'.)

I hadn't yet decided if the other was "...[Say/Spell] Acronyms Correctly", or something else, but clearly at least *I* had been understood, despite myself... ;)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 21, 2023, 03:35:43 am
Now that I look at it again after reading that it makes total since.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 23, 2023, 01:13:22 am
https://en.wiktionary.org/wiki/TIMTOWTDI (Because it can be said as an acronym, I tend to use it in favour of the initialism 'original (https://en.wiktionary.org/wiki/TMTOWTDI)'.)

I hadn't yet decided if the other was "...[Say/Spell] Acronyms Correctly", or something else, but clearly at least *I* had been understood, despite myself... ;)


Can't believe it's Tim Toady and not more like Tic Tac Toe - Tim Tow Tdii (Tea). My was "There Is More Than One Way To Skin A Cat."


Anyway.

ahem.

It took me about 4 days to get any work in at all and then I did all the work.

Things left to do:
Allow Migrants to build buildings.
Work out the logic for tech-checking.

Everything else is done or will just be recycled code. So let's discuss what was done:

(https://images2.imgbox.com/01/a4/TvLZM6WL_o.png) (https://imgbox.com/TvLZM6WL)

Here's the controller, right now - it uses the same methods to determine where you clicked - checking the sprite size. Until I find enough issues with this that I need to change it, I'll never change it.

The info_dump.clear() thing need to be removed, just from some testing before. I actually will quickly edit the code file now.
Also, I just didn't determine any controls for the mouse, so to "click", you have to press the up arrow. Look, this is early days still.

Instead of doing any of the checks in the controller, I left everything in a "bottom-up" configuration. You click on the command center, for example, and it calls a function in command center that is named "info_pass()". This means I need to build that function in everything that can be clicked (which is determined by the click_allow group). Luckily, the game will crash if I click on something that doesn't have that function - so it's easy to test! The info is stored in info_dump, which is called by the controller's parent: the camera. We'll talk about that in a bit.

(https://images2.imgbox.com/50/90/7iybKpVo_o.png) (https://imgbox.com/7iybKpVo)

The command center is pictured above - the info_pass() just sends up those same variables we've seen before, which have a few variations this time. Cost of things is stored in the global, and I've also included a fan-gamey thing where fort (and migrant) names are generated upon instancing. The tech option is just a string, but the global will keep track of whether the tech has been researched or not. I'll need to add that logic in later.

So, we can see that the command center, when asked to info_pass will make info_dump look something like this:
info_dump = ["Smallhands: Mountainhome", "Hire Migrant (200)", "Research Military"]

So how do we use that information?

Unfortunately, I'm a monster.

(https://images2.imgbox.com/68/de/FBF9nXZX_o.png) (https://imgbox.com/FBF9nXZX)

This is bad and I should feel bad (but I don't.)

Let's go through this line-by-line.
first, home (I have no idea why I named it that) grabs the info from the info_dump, if there is one.
The buttons on the UI are then all cleared and reset.
If home has multiple bits of information, those are placed on the buttons and the buttons are enabled. There's an exception here for the resource nodes, which pass a number up (i.e., not a string) and that info is placed on a button, but it doesn't look like a button.
If there's no info except a name, then just the name is displayed.

This is not very modular and also I'm not sure if I'm a big fan of all the work this method would require if we have like....4 playable factions.

Anyway, there's where I'm done.

I added a randomization level to the map - which will come with some issues, but oh well. This just throws a command center and 8 metal nodes around the map.

(https://images2.imgbox.com/74/62/X2ZgQByA_o.png) (https://imgbox.com/X2ZgQByA)

Finally, here's some examples of the dwarf names and fort names that are generated. Finding fort names was easy (thanks for the Hall of Legends), but finding the dwarven names is lacking. Does anyone know of a list of dwarven names? All else fails, I can use legend mode.

(https://images2.imgbox.com/49/c7/UluY1ODD_o.png) (https://imgbox.com/UluY1ODD)

(Dwarven names are just the first few dwarven words, but dwarves don't name their kids things like "spring" or "angel", so some seem a bit off.)
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 23, 2023, 03:26:42 am
Having randomly generated names for the dwarves and forts is pretty cool.

But is Urist included in the list, since it is the most important dwarven name it should be there somewhere?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on April 27, 2023, 11:54:56 pm
Having randomly generated names for the dwarves and forts is pretty cool.

But is Urist included in the list, since it is the most important dwarven name it should be there somewhere?

Thanks! It's easy to do and also helps remind me that this is a DF fan game, because right now...well it's mostly blue squares.

Urist is now on the list. I'll scrub through legends and make some documents of all the name components.


Alright. Let's see what I've been up to:

Spoiler: GIF (click to show/hide)


So first off, I added some sprites from the Wyrmsun project (it's neat, but not incredibly impressive). The sprites are open source, but still, I'll want to replace these at some point. As you can see, the pawns still have some shoving issues, but are mostly much better. That's because of this:

Code: [Select]
func _on_area_body_entered(body):
[...]
        elif body.is_in_group("unit"):
if body.target == target and body.state == body.State.IDLE:
state = State.IDLE

Basically, if you run into someone who is going the same place you are, and they're stopped, you stop too. This means that the first pawn is really the only one who stops where you ask them to, but they don't get stuck in a long line, thanks to that steering algorithm they've got. It actually feels very good.

Unfortunately, this only works on-body-entered, which doesn't pop if you started within each other's personal bubbles. I'll need to add a fix to that. (It's later in this post)

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/sFRBSazzhePZBqtbGCNvEmHc)

I also didn't add any stopping logic when I was testing their ability to go mine - so they just sucked this metals vein down into the negatives. There was also an issue with running the mining in the process. We've run into this in basically every game. yield() doesn't work in process, because it keeps getting called and overwriting itself. I believe this was fixed in Godot 4 with the new "await". I fixed this just by avoiding yield and using conditionals and a counter instead.

Spoiler: GIF (click to show/hide)

Here you can see that the behavior is all working well - this was actually pretty easy. Just fine-tuning the same algorithms from before. However, there's a few differences. Namely, that counter.

Code: [Select]
        [...]
elif state == State.GATHER:
if counter > 3:
if work.metals >= 50:
work.metals -= 50
cargo += 50
elif work.metals > 0:
cargo = work.metals
work.metals = 0
else: state = State.IDLE
target = get_home()
state = State.MOVE
counter = 0
if counter <= 3:
counter += delta
elif state == State.DROP:
if counter > 1.5:
if cargo:
glob.metals += cargo
cargo = 0
else: state = State.IDLE
target = last_target
state = State.MOVE
counter = 0
if counter <= 1.5:
counter += delta

Here's the state machine which is done in the process. Instead of using yield(), we're just using a variable called counter. It's just counting the "delta" which is roughly 0.013 per frame, I think. The 3 and 1.5 is roughly half-seconds, but I'll fine-tune it as I keep going.

The variable "work" here is just a container to keep the last-entered body (i.e., the metals node the migrant is working on), which means I can do this in the process instead of in the body-entered function. Likewise, get_home() is a new function that just checks for any resource-dropping places on the map and choose the closest one.

This is great because it allows for this:

Spoiler: GIF (click to show/hide)

This sort of behavior would be necessary for having multiple command centers or for "drop-off" buildings like are used in 0AD and many other RTSs.

The migrants also have an ignore range now. Basically, if they're here, they're close enough.

Code: [Select]
       elif state == State.MOVE:
if (target - global_position).length() <= 16:
state = State.IDLE

This '16' is the same size as the migrant's radius, but will need to be tweaked to deal with mixed units. I'm not sure how to go about it, because if I make it too big, the pawns clearly aren't going to where you tell them to, and if it's too small they bump each other trying to get to the spot. Maybe I can use counter here as well to count-down until it's okay to IDLE. We'll see.

I found this name generator: https://www.d0rfforge.com/
Which either I can use on my own or use the same method (literally shipping the language raws with the game) to determine names. I'm undecided as of now.

Progress is speedy, but slowing as I polish and fine-tune what is already here. There is no waste, though - all is useful in the grand schemes.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on April 28, 2023, 12:41:59 am
It's nice to see the progress. That GIF with the pawns moving and stopping is quite captivating.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on April 28, 2023, 01:25:16 am
The graphics really change how the game looks, it's pretty cool.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on May 08, 2023, 12:23:26 am
Not enough time for a full write up, but here's where I'm at:

Managed to get the tech tree checks up and running without issue.
Units can now initialize a building task (just make a sprite show up. Not done yet)
Spent 3 days trying to figure out the offset math for "snapped()", only to solve it in two seconds when I stopped and actually looked at the code.
Ran into a bug that I still don't understand - some issue with "pressed" and "button_down" being handled differently.
Made this monstrosity on accident.
(https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/mymFUeBrfEWnWmlXdQWNViAV?width=800&height=600&method=scale)

Will try to write it all up tonight! Progress was made! Task 2 almost done - the biggest hurdle now is adding additional states for building stuff.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on May 08, 2023, 03:50:57 am
What makes that a monstrosity, is it because of it being really bright looking?
Title: Re: Can delphonso make a commercial game?
Post by: Starver on May 08, 2023, 06:55:34 am
Looks like something severely downconverted to a 2- or 3-bit effective bitdepth. What might have been truecolour RGB now has a pallette of Red (#F00, in simple hex), Yellow (#FF0), White (#FFF) and transparency (traditionally #F0F). Maybe there weren't colours/hues that reduced to the other available simple 'shades' (green, blue, cyan and - of course - black), in this stock sprote, although the additional shadow might have taken up one of those (as a design choice, I'd probably flip between using full #000000 as 'shadow' transparency[1] or maybe cyan) if it wasn't an entirely separate[2] (secondary-)alpha channel or masking bitplane, originally.


Which makes it a fun thing to try to debug, if that is the cause for your concern. Image data probably of at least three bytes per pixel (with possibly two 'reserved' colours), if not four or five (partial transparency and partial shadow...? why not? Although I might use two nibbles, instead of two whole bytes, you generally don't need the same subtleties of shade...) somehow processed for rendering and ending up with an effective pallette of maybe four or five values (maximum of 3 bits). And probably not colour-rounded correctly, at that, though the transparency and shadow masks seem entirely intact and 'sane', implying they're just bitplanes unaffected by the other conversion errors.

I know, from experience, that if you overflow RGB byte data (e.g. by trying to 'normalise' intensity ranges in RGB buckets, but accidentally making the maths convert to 1->256 instead of 0->255), sometimes you can get subsequent routines to completely foul up and render 'unpallatable' output to the screen. This doesn't quite have that signature to it, as an error, but maybe some other form of bitshifting or other bit-operations that you're doing... Indirectly, probably, by object-method calls rather than direct operation on each raw extracted pixel.


And if that's not your real problem, I've probably just insulted your choice of artwork. ;)







[1] But even one bit on for 'very nearly black' would be normal and non-shadow. #010000, #000100, #000001 and additions of them.

[2] It might have taken the basic background alpha/mask, inverted it and procedurally skewed it to obey basic isometric assumptions, but it looks a bit too much 'height aware' to have used the flattened sprite as reference. I suspect these are sprites designed in something like Blender and the shadow 'underlay' raytraced at the time and exported in the resource accordingly. As either a secondary-alpha, to be later rendered as a shade-stipple of the engine's choice, or pre-stippled as black/alpha-bit chequerboarding. (The latter seems most likely.)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on May 08, 2023, 11:38:25 pm
What makes that a monstrosity, is it because of it being really bright looking?

Yeah, because...

maybe some other form of bitshifting or other bit-operations that you're doing...

Yeah, the monstrosity here was created when I called the "modulate" method on the sprite. My intention was to set it to be see-through by changing the alpha channel to 128.

So, using the built-in Color(R,G,B,A) type, I gave it 128 alpha. Unfortunately, modulate is actually a change by percent, rather than an addition or subtraction from the base number. Meaning, instead of setting it to 50% opacity, I actually set it to...12800% opacity.

The fact the shadow and flags are untouched is actually a mystery to me, and must be up to the artist who made the sprites to begin with.

-=-=-=-=-=-=-=-=-=-

So what has been happening?

Let's see, April 29th until the 3rd was a holiday here, but Chinese holidays are jokes, and you actually have to work on the weekends to "earn(?)" a national day off. This meant I've been pretty busy and exhausted without much time to rest. The holiday itself was nice, but traffic slowed down anything we meant to do, and my daughter has taken up the habit of needing me to help her get into sleep, giving me less time to work at night - and that time is for archiving threads against the imgur apocalypse anyway.

That is to say, I spent about a week without even looking at the project.

Coming back, I was trying to set up the "planning mode" for placing buildings. This requires a couple steps:

1. tell migrants to build buildings.
2. let the player choose where to build them.
3. make sure there's not already one there.

Step one was easy enough. I hooked up the UI buttons to the migrants, giving them the ability to start the planning phase.

originally, I tried to keep all of this inside the migrant, but ran into the issues that you might expect - the migrants are walking around and so...anything that is their child moves with them. It just made for slightly more work than I wanted. Instead, I moved it up a level to the camera-controller.

Code: [Select]
func _on_unit_opt_button_down():
if info_collect[1] is String: #this merely avoids a bug with clicking on the resource nodes.
if info_collect[3].has_method("spawn_unit"):
info_collect[3].spawn_unit()
else:
build(info_collect[1]) #clearly not sustainable, but so far, only command centers and migrants have buttons.
else:pass

This button was already used by the command center to make migrants - and I knew it worked. I tried to make the same with the second button, and couldn't get it to work at all. Here's my prints trying to figure it out.

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/vDMjRkTOxfyjsrXhzJzexhnR)

So. For some reason, the "pressed" function doesn't work on buttons if they're in the canvas layer (which is drawn on top of everything), but they do work if you call them with "..._button_down" as I did with the previous one. I'm sure I made a note of this same issue before, but lost it in that week off.

I was pleasantly surprised to see that I had already built the architecture of laying down barracks when I pressed the button and a barracks appeared:

(https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/YniMJMqWEpxSQQvBaVHnJhvb?width=800&height=600&method=scale)

So subtask one is done!

And then an easy snapped() and we're done, right?

So here's the list of issues:

1. snapped() follows a grid that is related to the window.
2. global_position on the mouse is skewed by the camera.
3. I'm apparently so good at math that I'm bad at it.

Okay, so the snapped issue is a big one. The way it works is that: If snapped(2,2), that means the cursor moves on a grid that is 2 pixels by 2 pixels, but it counts that from the top left corner of the display, not the world map. So, if I move the camera at all, I'm likely to be off-grid when I want to place things.

You can see the image of the barracks above isn't sitting in the squares or on their lines, which is where I want buildings to be.

Second, the get_mouse_global_position, IS related to the world-map, so as you move the camera, it moves the mouse exponentially. Global position counts pixels from the top-left corner of the world-space, ignoring the camera.

Here's a gif of that.

Spoiler: Wheeeee (click to show/hide)

This is easily fixed by just using get_local_mouse_position instead.

So the basic issue remains: I want everything to follow a grid related to the world-map, not to the camera. This is as simple as offsetting the snap by the amount that the camera is off-grid. Easy math.


I spent two days on this and I honestly have no idea how. I EVEN SOLVED IT ON PAPER AT SOME POINT.

(https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/ievQPeUOjZwrnFIzlvBhqLJb)

So what was I doing wrong?

Simply, I was trying to do the math inside the snapped() call. Which doesn't do what I wanted to. The worst part is that I had already solved this problem before the first time I tried to do the snap thing. The code is simple:

Code: [Select]
if planner.texture: #planner is a sprite, if it is untextured, you're not in "planning mode"
var nudge_y = 0
if position.y != 0:
nudge_y = position.y
while nudge_y > glob.grid_size:
nudge_y -= glob.grid_size
                (...same for x...)
planner.global_position = get_local_mouse_position().snapped(Vector2(glob.grid_size,glob.grid_size)) - Vector2(nudge_x,nudge_y)

What I was doing before was [...].snapped(Vector2(glob.grid_size - nudge_x, glob.grid_size - nudge_y))
this meant that the further you were away from the top left of the world, the smaller the snap-grid, leading to that weird inaccuracy in the earlier gif.

Anyway, that's all done now, so that's subtask 2.

Subtask 3 should be easy, right?
(it should be. Now that everything is snapping correctly, I just give that position to the parent and add the right type of child there. Double check nothings nearby and we're golden. Easy-peasy. Getting the migrants to path there, build it, then fuck off might be a lot harder, but once that's done, this Task 2 is done and done.)

Thanks for reading!
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on May 09, 2023, 03:16:16 am
Things seem to be coming along quote well.

and that time is for archiving threads against the imgur apocalypse anyway.
Hey that's the same way I've been using my free time.
Title: Re: Can delphonso make a commercial game?
Post by: WealthyRadish on May 09, 2023, 07:39:56 am
Calculating nudge_x and nudge_y with a while-loop may end up being noticably slow. For computing the remainder after division most languages provide a modulus operator 'x % y' for integers (and possibly something like C's fmod function for floating point numbers) which should have the same result.
Title: Re: Can delphonso make a commercial game?
Post by: Starver on May 09, 2023, 09:03:02 am
I also don't immediately see how the nudges feed back into the snapping ...no, wait, that Vector adjustment was off on a scroll-right bit. Ignore this.

The other thing I might have done, though, is that various rounding functions (floor/rounddown/int, ceiling/roundup, 'round' to nearest int) might be useful one-step-nested functions, which you can internally tune to do an offset-snapping as well as 'grid step magnitude'. Define a my_snapped() function/method to do the increment-rounding that the snapped() clearly does (probably with internal rounding anyway), but with the additional offset vector reference parameter (or raw position object reference; to again be used as you do, or with modulus[1]) fed into. I'm anticipating perhaps more complicated multi-viewport usages, so if what you have works then it works, but it could also be a useful transferable 'library' function for next time to be a self-contained copypasta to serve a simpler "planner.global_position"-like assignment operation that you can't get wrong again. (Well, differently wrong!  :P )


Meh, I'm overcomplicating it, probably. And I don't deny there may be typos/thinkos in this scrawl, so do of course run operational sanity tests on anything you wholesale copy the idea of. 8)


[1] If you can't get a modulus function to work right for you, or it just doesn't work how you would like it to work for -a % -b (if negatives of either value can occur), there's also variations upon b * ((a/b)-int(a/b)). Or just have started by taking up any signums you want, pass everything as absolutes then afterwards remultiply by whatever signums you took to re-sign the result. Or even something such as (b*(((a+d)/b)-int((a-d)/b)))-d, with a grid displacement 'd' built-in at that stage. Or ((a+d)%b)-d. Or straight (b*int((a+d)/b)))-d doing the nudging immediately rather than calculating and adding. LOADS OF POSSIBLE WAYS! Some more correct, for your use, than others. (Which may or may not be easy to overload onto a Vector2 object, rather than upon its .x and .y components in turn.)
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on May 09, 2023, 09:22:22 am
Calculating nudge_x and nudge_y with a while-loop may end up being noticably slow. For computing the remainder after division most languages provide a modulus operator 'x % y' for integers (and possibly something like C's fmod function for floating point numbers) which should have the same result.

Good shout by you and Starver - the modulo is operational as it should be. This is actually "revised" code from my several attempt to reinvent a square wheel, though I wouldn't have thought of modulo myself - just the difference in experience showing there.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on June 25, 2023, 01:10:24 am
You shuffle through your grandfather's attic, littered with bobbles and treasures which recount a lifetime. A jar of loose rocks from his travels, only known to him which were from where. A mannequin sports a moth-eaten coat, surely a gift from some forgotten acquaintance. Before you stand an old footlocker, weather beaten and rusted. The latches crack off, crumbling to red dust under the pressure. A wave of dust rolls off the lid as you open it, revealing

this thread.

What's 6 weeks between friends, right?

Look, it's rough out here. Winding down the school year, hitting a wall of depression and illness, my kid becoming more active and engaging (well that one is only positives, but does mean more time for her). I've been trying to get in the mindset to code which is like waiting for a good time to go to the gym - just a way to procrastinate.

The Plan:

Dig through my spaghetti code and finish whatever task I had set for myself 2 months ago and then actually finish it while also complaining about how poorly my code was written.

Then?

So I've been playing a bit of the Arkham Horror Card Game. The setting itself, I'm non-plussed about, really, but the game is well made, engaging and exciting.

And of course, that got me thinking about coding one.

We all know I love a good card game. I love Trading Card Games in particular, not because of the trading aspect, nor the throwing-money-into-a-pit aspect, but I love the sensation of opening a pack of cards and the possibilities that unfold in front of you as you read the descriptions. This holds over to the digital realm too, the Gameboy Pokemon TCG is one of my favorite games and a big part of that is being able to open packs in the game.

The way Arkham works doesn't lend itself to packs of cards, but it does lend itself to deck building, which got me thinking - why not have packs of cards?

Because they are annoying is the real answer, but in a video game, where they cost nothing but engagement and time, that's slightly less annoying!

My point here is to try again to make a card game concept into reality - this was some of the root to Capumon, but will need a lot more work.

Let me detail Arkham's basic structure as best I can - the rule book is like 30 pages, so let's skip quite a lot.

There are two tracks, effectively. The Agenda and the Act. The agenda is what the bad guys are doing and is effectively a fail condition, as well as ramping difficulty as you go. Every turn the agenda progresses, and after a certain number of turns, escalates. The act is the investigation the PCs are participating in, it progresses by finding clues and usually opens more scenes/rooms and triggers boss fights.

You can think of this as a turn counter and a victory counter, basically.

Turns: ---+-------+----x
Victory: --+---+---x
Every + would be an event or escalation. For victory, it's new rooms and places to gain clues. For turns, it's enemy spawn rates or negative events. The x would be a failure in Turns or a successful mission in Victory.

In Arkham, you gain traction in the act process by finding clues - which is simply testing an intellect attribute against a room's difficulty score. The tests are essentially a dice roll (pulling tokens from a bag, but same thing, in practice). Clues is merely what is necessary for the setting, when in reality, it could be anything that the scenario dictates. Keys to unlock a door, pieces of a broken relic, obstacles to reaching the end of a dungeon.

The "character" is made up of a deck, which is basically 3 types of cards: assets, permanent or expendable bonuses that are played ahead of time, events, which are special things you can do on a turn (think "immediately find a clue after KOing an enemy) or skill cards, which are just buffs to the dice rolls.

There are a lot of custom cards in Arkham (that's the business model), but it'd be very easy to trim these down to their bare bones. +1 or 2 to all skill checks, get a victory point when doing X, +1 every time you do X action. That's basically all the cards (there's more, but not necessary for our sake here). This would also make deck-building pretty straight-forward. I want a good investigator would have a lot of +1s to investigate or intellect tests, and maybe something like "get an extra clue when you get a clue" one-use cards.

I'll try and scratch something together on paper first, but I think this game is like...already a video game, so it wouldn't take much work to adapt it (I reckon they already have, as I know Pathfinder's Card Game became a video game).

But first, tomorrow I resume work on DF RTS's current task.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on June 25, 2023, 03:58:30 am
A card game sounds like it could be interesting even if I don't play those.
Title: Re: Can delphonso make a commercial game?
Post by: eerr on June 25, 2023, 12:40:42 pm
Oooh a card game!

My favorite (video) card game is arcomage.
it's a minigame found in the might and magic series.
(not the heroes of might and magic rts game,
this one is closer to the elder scrolls or wizardry, it's old)

In Might and Magic Day of the Destroyer, you can find a deck of cards to play arcomage in taverns, and each tavern has it's own rules and win conditions. You get a prize for beating all the taverns. I think in Day of the Destroyer, it's a pair of artifact swords.

https://www.youtube.com/watch?v=Vd6whbzhLcw


Title: Re: Can delphonso make a commercial game?
Post by: delphonso on June 25, 2023, 11:50:32 pm
Here's my beef.

Adventure Card games (and many deck builder games) are combat only - or can't conceptualize anything outside combat (Neurodeck is all about psychological disorders and has a therapy theme, but it's also clearly just combat.) So, what I'd like to build is something that can handle all aspects of TTRPG gameplay - roleplaying scenes, investigations and intrigue scenes, as well as combat. Build first is a skeleton for a combat encounter, but in building it, I tried to form systems that could be switched to other scenes.

I.e., instead of the Trap Encounter card being "test agility or take damage", the Intimidating Noble card could be "test personality or take threat."

Take two parts Arkham Horror and one part Munchkin, mix thoroughly and bake along side the finely-minced plump helmets and the finely-minced plump helmets.

Quote
Basic rules:
Draw 4 cards to begin.
On player's turn, draw one card, make a free test against the Opposition, if present.
Players take 2 actions: Actions include making tests, drawing additional cards and playing cards.
Damage = Might (for this example? Maybe depends on the character 'class')

Turn order:
Increase Threat by 1.
If instructed, draw a card from the Opposition Deck, effects and damage happen immediately.
Only one Opposition Card in play at a time.
Tests on Encounters/Enemies do not count as an action and happen at any point during your turn, this includes one free attack against an enemy (effectively 3 actions per turn, if Opposition is present).
Play equipment (permanent) or Instants (immediately discarded).
Discards are reshuffled into the deck immediately.
Tests can be made against the Scene or as Attacks against the enemy.
Attack: Test against your own Might.

As far as testing mechanics, I'm undecided, so we'll see. Right now, I have this, which is sort of how Arkham works.
Quote
How to Test:
Roll a d8.
Results 1-6 are compared against your governing stat, equal or below is a success.
The result of an 8 activates your character's Drawback, automatically succeeds. 7 activates their Expertise, automatically fails.

Not sure about the automatic fail or success on Drawbacks/Expertise. Maybe, instead, I'll just roll a d6 afterwards to test the result. This is a video game, so that stuff can happen instantly. This is stolen directly from Arkham, but twisted to have both connected to the character, rather than one connected to the scene and the other to the character.

Quote
Adventure 1: Kobold Kamp

Descriptive Text:
I'm working on it!

Scene Cards:
Threat Track 15 ----+----+----+
Victory Track 12 ---+---+---+
Out of the Forest: You approach the camp from the treeline, covered by darkness. You may now Test Agility (-1) to gain 1 Victory, as you sneak toward the camp.
        On Victory 4: Move to In the Camp.
In the Camp: Dipping between tents and hovels, the sleeping kobolds are oblivious to your presence. You may now Test Intellect (+1) to discover where the leader's tent is.
        On Victory 8: Move to Bigiflus' Tent.
Bigiflus' Tent: You've found the kobold leader's tent, now it is time to finish the job - eliminate the target. Discard current encounter and Spawn Bigilus Koba.
        On Victory 12 or Bigiflus defeated: You Win! Gain the card: "Intimidate (Instant): Replace Might for Personality in one test. If unsuccessful, draw a card."

Threat Path: On Threat 0: Draw from the Opposition deck every 2 turns. On Threat 5: Draw from the Opposition Deck every turn. On Threat 10: Enemies gain +2/+2. On Threat 15: Game over!

The numbers here will all need tweaking but you can see the overall structure: victory moves forward on player action, while Threat ticks up over time, increasing the difficulty and quickening the bloody end.

Quote
Opposition Deck begins{
Enemy Cards:
Helmet Snake: HP 1, Dam: 1
Kobold Fighter: HP 2, Dam: 2
Kobold Champion: HP 4, Dam: 3
Kobold Scout: HP 2, Dam: 2    Hit and Run: Test Ag, or return to Opposition Deck
Kobold Poisoner: HP 1, Dam: 2,   Noxious Dart: Test Might or lose 1 Might ongoing.
(Absent until Victory 8)Bigiflus Koba: HP 8, Dam: 3   Brilliant Taunt: Test Personality or gain threat.


Encounter Cards:
Sound the Alarm! - Test Agility, gain victory or threat.
Pudding Pot! - Test Ag, gain victory or discard one equipment card.
Kowardace... - Test Personality, succeed gain victory, failure, spawn a kobold fighter
Kaptives - Test Ag, gain card "Watch My Back" or fail to gain victory.
Kobold's Horde - Gain 2 coin, gain one victory.
Scorpion in a Coin Purse - Test Ag, success gains 2 coin, failure takes 2 damage.


     (Generics)
Physical Barrier - Test Might or take threat.
That's a Problem... - Test Intellect or take threat.
Trap - Test Ag or take 1 damage.
It's Coming Right For Us! - Test Might or take 1 damage.
Power Struggle - Test Personality to gain victory or fail and take threat.
Chest - Gain 1 coin.
}

Encounter cards are one-off that have immediate results - either damage or threat/victory and occasionally something more. Enemies would stick around dealing their damage (and effect) every turn until defeated.
The generics are sort of pointless, but illustrate how I'd like to spread out the work - having maybe 30% be recycled material per "scenario". This will likely come down to art assets more than anything, unfortunately.
I'd multiply these out at some point - perhaps related to the threat and victory levels. This is something that is far easier to do in video game form than physical game form, so why not.

Quote
Player deck begins{
Qui-quay, Barbarian - Health 10.
Might 4, Agility 3, Personality 2, Intellect 1.
Drawback: Superstition: Skip an action.
Expertise: Bulging Muscles: Heal 2 damage.

Equipment Cards:
The Song of Tempos: Add +1 to Might and Damage during attacks
Hetwoman's Advice: Add +1 to Intellect.
Good Luck Charm: On a failed check, reroll it once. This item cannot be used twice in an adventure.
Small Woodland Creature: Add +1 to agility on an Encounter.

    (Generics)
Longsword: Add +1 to damage
Battleaxe: Add +1 to damage
Javelin: Add +1 to Might during attack.
Handaxe: Add +1 to Might during attack.
Loincloth: Add +2 to health.
Buckler: Reduce incoming damage by 1.


Instants:
Rage: Attack, adding +1 to Might and Damage.
Primal Instincts: Ignore damage from an Encounter.
I've Had Enough!: Discard the current Encounter.


    (Generics)
Sudden Insight: Gain 1 victory.
Watch This: Test Might to gain 1 victory.
There's Gotta Be A Way: Test Agility to gain 1 victory.
Hah! Take That!: Deal as much damage as you recieved back to the enemy.
You Left Yourself Wide Open: Deal damage without testing an attack.

    (Unlockable)
Watch My Back (Instant): Add +1 on an Encounter test.
}

Player decks have a player card which has two effects, a drawback and an expertise - basically a positive and negative that can occur. I'll need to see how this feels in actual play before I commit to the concept, but I do like giving the "class" some depth there.

Equipment is just anything that sticks around giving a modifier or conditional modifier - this is where the programming will be hardest, I think, but we'll see. Equipment will probably need a slot system to work: an augment, such as the advice card and an equipment (maybe armor and weapons?).

Instants are like encounters, but played by the player at any time on their turn (I guess, using an action). I will likely change the writing from this: "Watch My Back (Instant): Add +1 on an Encounter test." to this: "Watch My Back (Instant): Perform an encounter test at +1." as that clearly only uses one action.

I'll likely write up the social encounter deck tonight, because I'm sick with a chest cold and can't sleep anyway...

This is technically playable already by rolling dice to see which cards you draw...so I'm going to go do that now and see how it feels.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on June 26, 2023, 02:42:19 am
That sounds pretty cool, it also sounds like you'd need to make a lot of different kinds of cards for several different categories for it to work. Would you need us to help with the cards?
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on June 26, 2023, 10:16:52 pm
That sounds pretty cool, it also sounds like you'd need to make a lot of different kinds of cards for several different categories for it to work. Would you need us to help with the cards?

Probably, but let me set up the data structures first - once I've done that, we will all know what is or isn't possible. It might just be a play-testing thing where we see a desire for "such and such a card".

I play-tested what I have here and found 2 things:
Redrawing the same equipment over and over sucks, so obviously that can't work the way it does now.
2 actions per turn is too tight, 3 is better, but also pretty easy. I'd prefer a 2 action, but 3rd if an Opposition card was drawn, as I do also want "down time" in the game. Maybe I can  replace that with a generic "Down time" encounter card that is just (lose one action). I played twice and won once and lost once. Pretty good for a rough draft.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on July 24, 2023, 12:33:29 am
Okay so programming a card game was way harder than I figured - I'll keep messing with this in the background, but this was posted about a day before I suddenly had to search for a job and so, all of these things fell to the wayside. I haven't coded /really coded/ in a long time, and so now I'm thinking about a "simple" project to warm back up.

DF RTS died when a friend said they'd take a crack at the map code and then didn't. And also when I said I'd put the finishing touches on it and then upload it, but also didn't. I'll save the files and dedicate time to them in the future.

The card game is waiting on the Pathfinder Card Game to arrive in the mail from the US - once I've gotten those rules down I should have a better grasp of where this whole business is at and where its shortcomings are. I've decided to flesh it out more fully in design documents before trying to code it, lest I code myself out of possibilities I'd like the game to have.

Anyway a warm-up project. All of these usually balloon to being a 3-month long thing that never gets done, so that's what I'm expecting here. I dunno, maybe I can make a tamagachi or something? That's easy enough to manage, he said, lyingly. I'm not sure what I'd like to work on, but my hours are few, and when I start a new job, my time might be even tighter...Unless I just stop sleeping, which...hmmm...
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on July 24, 2023, 02:50:18 am
Sleep is for the weak, I mean who needs sleep when you got code.
Title: Re: Can delphonso make a commercial game?
Post by: Duuvian on August 09, 2023, 04:31:22 am
Oooh a card game!

My favorite (video) card game is arcomage.
it's a minigame found in the might and magic series.
(not the heroes of might and magic rts game,
this one is closer to the elder scrolls or wizardry, it's old)

In Might and Magic Day of the Destroyer, you can find a deck of cards to play arcomage in taverns, and each tavern has it's own rules and win conditions. You get a prize for beating all the taverns. I think in Day of the Destroyer, it's a pair of artifact swords.

https://www.youtube.com/watch?v=Vd6whbzhLcw

I enjoyed Arcomage a great deal. I had MM8 when I was young and played it heavily in that game along with HoMM3 and it's expansions. Arcomage also had a stand-alone version released some time after MM8 but I don't think it did very well, might be abandoned by now but I haven't checked. HoMM4 was pretty good but I was disappointed by the reset by the new owners. Gauldoth Half-Dead campaign made up for that though. I don't know what happened to the series after that, it didn't seem like good things from what I read on the internet but I don't know as HoMM 4 was the last one I tried.

Delphonso, if you get to the point of beta releases I'd help with those if I am available and also if I see it in this thread (I often don't check Creative Projects section). If you would like, feel free to pm me if I miss it were that to occur. I didn't read the whole thread, in case something along those lines was already posted. I'm also no good for coding help.
Title: Re: Can delphonso make a commercial game?
Post by: Salmeuk on August 09, 2023, 03:56:38 pm
Quote
I dunno, maybe I can make a tamagachi or something?

my first and only attempts at making a game was some kind of clicker / idle game take on an aquarium. but it ended up rather tamagachi like. of course that project never got very far..  so I approve of this random throwaway idea!

in fact, a little portable tamagachi-like device that contains an active Dwarf Fortress sounds rather cute. you shake it every once in a while to wake up the sleeping dwarves haha. oh the possibilities!
Title: Re: Can delphonso make a commercial game?
Post by: Duuvian on August 11, 2023, 05:49:49 am
I remember Tamagachi were wildly popular for a year or two when I was about nine or so. I wanted one lol, I got a decent cheap knockoff depicting a dog a few years later in a Christmas stocking after they weren't cool anymore. It was kind of f'd up unintentionally though; one of the options was to discipline the digidog (a digi hand smacks it) and the only way to start a new one was after the existing one dies. This meant if you didn't want to wait for it's natural death which took two weeks to a month of realtime IIRC, you would have to beat it to death while it wallowed in it's own excrement and starved since there was no "new game" option and they were tough little digidoggies that took a lot of that to start a new one.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on August 11, 2023, 07:23:23 am
So the Pathfinder Card Game is almost exactly what I wanted. There's certainly some "improvements" I could make, but the system they have set up is really good, and allows for a lot of flexibility (because it's a card game, and you can just...tell the players to do a new way to play the game). I'll tool around a bit with what I've already got, but it's clearly going to be hard to match up with what Pathfinder has presented already - I might make some custom campaigns for Pathfinder instead of making a whole new game.

That said, the Pathfinder Card Game Video Game is quite poor, and they've abandoned the new ruleset already, so unlikely to get an update or remake any time soon. Might be worth a gamejam or something to make a 3-scenario mini campaign or something. Just make the rules necessary for that.

Cheers, Duuvian, I'll give you a shout anytime I make something worth playing.
Quote
I dunno, maybe I can make a tamagachi or something?

my first and only attempts at making a game was some kind of clicker / idle game take on an aquarium. but it ended up rather tamagachi like. of course that project never got very far..  so I approve of this random throwaway idea!

in fact, a little portable tamagachi-like device that contains an active Dwarf Fortress sounds rather cute. you shake it every once in a while to wake up the sleeping dwarves haha. oh the possibilities!

Insaniquarium is still a masterpiece.

A pocket dwarf is actually a good idea - just let a dwarf grow up, get his psychological profile, maybe there's a strange mood minigame...Then when he dies, get a new dwarf from the fortress. There's something there!

I remember Tamagachi were wildly popular for a year or two when I was about nine or so. I wanted one lol, I got a decent cheap knockoff depicting a dog a few years later in a Christmas stocking after they weren't cool anymore. It was kind of f'd up unintentionally though; one of the options was to discipline the digidog (a digi hand smacks it) and the only way to start a new one was after the existing one dies. This meant if you didn't want to wait for it's natural death which took two weeks to a month of realtime IIRC, you would have to beat it to death while it wallowed in it's own excrement and starved since there was no "new game" option and they were tough little digidoggies that took a lot of that to start a new one.

Jesus christ...

I had a Tamagachi when I was little. They were just impossible to keep alive, for my 7-year-old self. My sister also struggled with it. I recall keeping them in our backpacks at school, and going to feed them/clean up their shits on the excuse of looking for books. I went back and found mine dead, and sat down at my desk and quietly cried. Oh to be kid again...

I picked up a "Vital Bracelet V", which is a Digimon pet that is also a pedometer/heart rate monitor. It's great - the little dudes don't die, and just slowly evolve over roughly a week. Once that's all done, you tuck them away in an app (or just delete them) and load up a new egg. It's got a lot of modern conveniences, like being able to just wipe whatever you have and start over any time, or tuck one away into 'storage' until you're ready to raise it.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on August 11, 2023, 07:34:31 am
I went back and found mine dead

You monster! You killed it!
Title: Re: Can delphonso make a commercial game?
Post by: Starver on August 11, 2023, 08:45:34 am
I never did have a Tamagachi (not the target age for it), but I did dabble with various other A-Life things. Somewhere I might still have the disks (indeed, I might still have the installation on the original and long-unused computer buried a bit in my pile of old hardware) for Creatures (https://en.wikipedia.org/wiki/Creatures_(1996_video_game)), which was perhaps a bit overambitious a project given that I was often supposed ro be working at home, when I wasn't actually working at work, and probably couldn't spend the time to reinforce be reward/punishment the trainable behaviours of my Norn(s) and make them more self-sufficient (or at least intelligent enough to go to whichever bit of their biome they needed to be for me to keep them alive and safe at any particular moment).
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on August 12, 2023, 03:32:11 am
I had a Tamagachi when I was little and I never got to play it because the damned thing didn't work, I mean you could turn it on and watch the critter slowly die because none of the buttons worked.

Also having to beat it to death to get a new one is a pretty metal way to start a new game.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on December 12, 2023, 08:54:59 am
It's time...
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on December 12, 2023, 03:39:09 pm
*anticipation intensifies*
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on December 13, 2023, 02:21:40 am
The HYPE it builds!
Title: Re: Can delphonso make a commercial game?
Post by: mikekchar on December 13, 2023, 10:15:16 pm
Forgive me because I haven't actually read very much of this thread :-)  I started work on a DF-like game a few years ago and got a fair way through.  I generate a map and have a dwarf wandering around in it trying not to die of thirst.  Not really that engaging, but it was fun to code.  I did most of it on Twitch, live streaming usually 8-10 hours a week for about a year.  Unfortunately, I found that the stress of keeping that schedule on top of my already busy work life caused problems for some health issues I had and so it's been on the back burner for a *long* time.  It was super fun streaming development, though, so I'd like to get back into it.

Having made that long winded introduction, I've learned some things along the way.  The first is the old classic: You can make a game or you can make a game engine.  If you start making a game engine to make a game, at best you will complete the game engine.  More normally you complete nothing :-)  Going the other way around is actually easier.  Pick an engine that gives you as much facility as you can find, start writing your game and when you get a good way through it, rewrite the whole thing from scratch.

The reason for this is that coding is coding.  You've just got to grind your way through all of the details.  The hard part is figuring out what the details should be.  if you are coding the engine at the same time you are figuring out how the game should play, or what facilities your game engine needs to provide, you will not be nimble enough to try what you need to try.  One day you think, "I know!  We should try X".  6 weeks later you finally add the features to your engine to try X.  X sucks.  It's fine because by trying X, you realise Y is the *real* way to go.  6 weeks later, you add the features to try Y.  Y doesn't suck, but it's not really right either.  Z is definitely the way to go!  Rinse and repeat forever.

Ideally you want to be able to rapidly try your ideas until you are very sure that you have the game play that you want.  Then you have plenty of time to implement it in the best way possible.  At least if you are an indie dev and you don't have project managers screaming at you to do the *next* idea, so let's hang on to that bloody legacy carcass a bit longer...

This is obviously not what Tarn does, but he's special in a number of different ways :-)

I think the other big thing I learned was that it helps to make a lot of small, completely unrelated games before you tackle a big long term project.  The reason is that the "game loop", the thing that people find fun about playing your game, is quite elusive.  I had assumed that, like most development I do, I could write something quite basic and then just keep enhancing it with more features as I discovered what I wanted to do.  The problem is that "fun game loop" is surprisingly difficult and it's not really an incremental thing.

Getting some practice just crafting "fun game loops" is a really good idea, I think.  This is something that Tarn and Zack do a lot of (and you can see that they have *many* games in various state of completion).  I think this is part of their "special sauce".

So, what I would do now that I have some experience is:

1) Write something tiny, unrelated to any big idea, using an established platform that makes it quick to churn out a game.  Tamagotchi remake is a *wonderful* idea.  The original is *so* basic, but it has a fun game loop.  Try to implement just that classic game loop.

2) When you have something working, think about what the ideal development environment would be and build that.  Then reimplement your tiny game.

3) Spin on that idea for a while, changing the "fun game loop".  How did that influence the underlying development environment?  What kinds of things did you have to do?  How would you support that in a larger game.

4) Goto 1, but with a bigger idea.

Hope that helps you.
Title: Re: Can delphonso make a commercial game?
Post by: delphonso on December 14, 2023, 12:23:12 am
*snip*

Thanks, Mike. I threw that up in the game design thread - as I think it's good general advice. I mostly stumbled on the same stuff on my own after...10 years of trial and error and error and error. The issue I run into is when my eyes are bigger than my stomach with my next 'slightly more' complex game. See the DF RTS - which was just too much for me to realistically tackle.

Speaking of -

Abandon all projects! There is only GLORY!


Drag tamagachi out into the streets and stomp them to crumpled plastic and cheap silicon.
Remove all strategy from the RTS - it is time to get real.

Stuff your ambitions away and make that which is attainable! Simple! Game!

Here's the thought process: I should stop trying to make games I play (Starcraft, Pathfinder ACG, Morrowind) and make games I want to play.

You know what I've always wanted to play? A gladiator game that doesn't suck/was made by a fascist.

You know, Sewer Kings is just fun - as mike points out - the core loop is fun. What if that, but it's gladiators?

And what if it's more rogue-ish? Sleeper is only fun when the time is almost out - so how about timed rounds like in Vampire Survivors?

Oh! So you'll be playing as a lanista - a manager - and the gladiators aren't exactly you. Perhaps you don't really control them, just like Sewer Kings?  I could write better AI, as I learned in the RTS, so instead of simple location commands, you could set a personality, basically (greedy, aggressive, defensive). Maybe. Or you control one gladiator and have a team of 2 or 3, the others being AI controlled.

As lanista, you'll be gaining money from these fights, spend it on new arenas, new gladiators, permanent upgrades - all like Vampire Survivors!

There's a good idea here, I think.

So here's the project: Untitled Gladiator Game. Ugg

Mechanically, I want to rip off Vampire Survivors as much as possible, but I want to make something more similar to an autobattler. No weapon upgrades/combinations like in most VS rip offs. Really, I just want to rip off their progression system, because it's very satisfying. The core gameplay will be more similar to Sewer Kings, but much more stream-lined and hopefully having rounds of enemies showing up.

I'm going to get started on a basic code-base today. I've spent the last couple weeks planning this out in my head, so it shouldn't take too long to get to a point where I've fucked it up so much I want to quit again.
Title: Re: Can delphonso make a commercial game?
Post by: King Zultan on December 14, 2023, 03:32:42 am
Sounds pretty cool, can't wait to see how it turns out.
Title: Re: Can delphonso make a commercial game?
Post by: brewer bob on December 14, 2023, 04:25:29 am
I'll be following this project definitely.