Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 22 23 [24] 25 26 ... 31

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

Starver

  • Bay Watcher
    • View Profile
Re: Can delphonso make a commercial game?
« Reply #345 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). 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.)
Logged

EuchreJack

  • Bay Watcher
  • Lord of Norderland - Lv 20 SKOOKUM ROC
    • View Profile
Re: Can delphonso make a commercial game?
« Reply #346 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!

delphonso

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

King Zultan

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

King Zultan

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

Starver

  • Bay Watcher
    • View Profile
Re: Can delphonso make a commercial game?
« Reply #351 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.)
Logged

delphonso

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

King Zultan

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

brewer bob

  • Bay Watcher
  • euphoric due to inebriation
    • View Profile
Re: Can delphonso make a commercial game?
« Reply #354 on: February 22, 2023, 01:34:09 pm »

Very good to hear things've been great. Playing games and reading books is always good!

delphonso

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

King Zultan

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

brewer bob

  • Bay Watcher
  • euphoric due to inebriation
    • View Profile
Re: Can delphonso make a commercial game?
« Reply #358 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?

King Zultan

  • Bay Watcher
    • View Profile
Re: Can delphonso make a commercial game?
« Reply #359 on: March 09, 2023, 02:51:46 am »

Combining things is always a good way to learn how they work.
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?
Pages: 1 ... 22 23 [24] 25 26 ... 31