Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 31

Author Topic: Can delphonso make a commercial game?  (Read 48670 times)

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #30 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.

King Zultan

  • Bay Watcher
    • View Profile
Re: Can delphonso make a game?
« Reply #31 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.
Logged
The Lawyer opens a briefcase. It's full of lemons, the justice fruit only lawyers may touch.
Make sure not to step on any errant blood stains before we find our LIFE EXTINGUSHER.
but anyway, if you'll excuse me, I need to commit sebbaku.
Quote from: Leodanny
Can I have the sword when you’re done?

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #32 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.



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.



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?

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]



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.



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.



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



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?



Please! Please! He's already dead!




[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.
« Last Edit: September 27, 2021, 02:40:09 am by delphonso »
Logged

King Zultan

  • Bay Watcher
    • View Profile
Re: Can delphonso make a game?
« Reply #33 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!


There's something incredibly beautiful about this.
Logged
The Lawyer opens a briefcase. It's full of lemons, the justice fruit only lawyers may touch.
Make sure not to step on any errant blood stains before we find our LIFE EXTINGUSHER.
but anyway, if you'll excuse me, I need to commit sebbaku.
Quote from: Leodanny
Can I have the sword when you’re done?

Quaksna

  • Bay Watcher
  • Dreams of creating a great work of art.
    • View Profile
Re: Can delphonso make a game?
« Reply #34 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

NJW2000

  • Bay Watcher
  • You know me. What do I know?
    • View Profile
Re: Can delphonso make a game?
« Reply #35 on: September 27, 2021, 06:49:42 am »

PTW. This is an interesting read.
Logged
One wheel short of a wagon

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #36 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.


We now add in a checker if the target's hp is 0.

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.


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!")

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)

spinnylights

  • Bay Watcher
  • Wolf Leather Dress
    • View Profile
Re: Can delphonso make a game?
« Reply #37 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.





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.
Logged
Our little Kinsmen — after Rain / In plenty may be seen, / A Cross and Grumbly multitude / The soiled Ground upon // A needless life, it seemed to me / Until a little Roc / As to a Tavern saucily / Advanced and breakfasted. // As I of He, so Armok, me / I pondered, may have judged, / And left the little Mountain-folk / With Wariness enlarged. —–Emily the Poetic Thorns

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #38 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.

King Zultan

  • Bay Watcher
    • View Profile
Re: Can delphonso make a game?
« Reply #39 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.
Logged
The Lawyer opens a briefcase. It's full of lemons, the justice fruit only lawyers may touch.
Make sure not to step on any errant blood stains before we find our LIFE EXTINGUSHER.
but anyway, if you'll excuse me, I need to commit sebbaku.
Quote from: Leodanny
Can I have the sword when you’re done?

spinnylights

  • Bay Watcher
  • Wolf Leather Dress
    • View Profile
Re: Can delphonso make a game?
« Reply #40 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 but the driver docs don't make mention of GLES3 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.
Logged
Our little Kinsmen — after Rain / In plenty may be seen, / A Cross and Grumbly multitude / The soiled Ground upon // A needless life, it seemed to me / Until a little Roc / As to a Tavern saucily / Advanced and breakfasted. // As I of He, so Armok, me / I pondered, may have judged, / And left the little Mountain-folk / With Wariness enlarged. —–Emily the Poetic Thorns

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #41 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.



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:



Which leads to a status check:



Which checks if the combat is over:



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.



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:



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.



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?

King Zultan

  • Bay Watcher
    • View Profile
Re: Can delphonso make a game?
« Reply #42 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?
Logged
The Lawyer opens a briefcase. It's full of lemons, the justice fruit only lawyers may touch.
Make sure not to step on any errant blood stains before we find our LIFE EXTINGUSHER.
but anyway, if you'll excuse me, I need to commit sebbaku.
Quote from: Leodanny
Can I have the sword when you’re done?

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #43 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.

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #44 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.



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!)



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.



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.



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:



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...
Pages: 1 2 [3] 4 5 ... 31