Bay 12 Games Forum

Please login or register.

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

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

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #45 on: October 03, 2021, 11:07:41 pm »

I'm the smartest person on earth.



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)



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

Hmm...



This...shouldn't be here.



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!



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!
« Last Edit: October 03, 2021, 11:09:14 pm by delphonso »
Logged

King Zultan

  • Bay Watcher
    • View Profile
Re: Can delphonso make a game?
« Reply #46 on: October 04, 2021, 02:25:10 am »

What are you gonna be doing when you finish fixing stuff?
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 game?
« Reply #47 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!
Logged

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #48 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!
« Last Edit: October 04, 2021, 06:01:40 am by delphonso »
Logged

eerr

  • Bay Watcher
    • View Profile
Re: Can delphonso make a game?
« Reply #49 on: October 04, 2021, 10:36:07 am »

What did you learn about singletons?
Logged

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #50 on: October 04, 2021, 07:51:16 pm »

Here's a link 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.

delphonso

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



And now the gameshop scene is made:



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



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



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.



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.



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



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!



King Zultan

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

delphonso

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

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Can delphonso make a game?
« Reply #55 on: October 05, 2021, 11:23:48 pm »

Bonus: Little warm up 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]).



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.



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!



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.



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:



Which is what the main scene looked like before.



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...



Things get silly.



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!






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








delphonso

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



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?



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

Hmm...



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?


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. 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.


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...


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

King Zultan

  • Bay Watcher
    • View Profile
Re: Can delphonso make a game?
« Reply #57 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?
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 #58 on: October 06, 2021, 09:26:14 am »

New aesthetic found:

Spoiler (click to show/hide)

delphonso

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



Brief music interlude - trying to capture the same sense.

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.

Pages: 1 2 3 [4] 5 6 ... 31