Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

What are you working on? (Game Making Thread)

I think that if you're dealing with objects, you should use OOP. Especially with your _Create() and _Update() and any other calls you make. With that underscoring pattern you need to be very careful you don't do something like make a _Collision_Create() function that introduces ambiguity whether Scout_Collision_Create() is creating a Scout_Collision object or creating a collision object for a Scout. This is just an example and it's easy to get confused when things get more complicated.

You could always do as Unity does with UnityScript and define that an entire script file is within the scope of a single object. That way the scripters don't need to grok any extra object syntax.

As for self.RotateByDegree(...) vs. RotateByDegree(self, ...) I don't think that matters as much unless error reporting suffers. If it were Ruby it would be the difference between seeing the error on the line that says "self.RotateByDegree(...)" saying "No such method `RotateByDegree` for Scout object" and seeing the error inside the RotateByDegree function saying "No such member `rotate_vec` for Scout object". It's better to see the error where the scripter made it than to see the error inside internal functions that just weren't called correctly.
 
rey meustrus":26un6amc said:
I think that if you're dealing with objects, you should use OOP. Especially with your _Create() and _Update() and any other calls you make. With that underscoring pattern you need to be very careful you don't do something like make a _Collision_Create() function that introduces ambiguity whether Scout_Collision_Create() is creating a Scout_Collision object or creating a collision object for a Scout. This is just an example and it's easy to get confused when things get more complicated.
I agree totally with the first line there, any objects -> OOP, however I only have 1 object, "self", which is more of a structure of values to be manipulated by functions, which is where standard approach works best (OOP is where the data is important, procedural is where the functions are important), so I'd only go OOP for a matter of syntax than paradigm.

In my design, the create, update, drop functions are required for each "thing" type, so the focus is pulled to the functions, the game creator can add their own functions, I'm even planning on making the _Update() and _Drop() functions optional (So you write in the _Create() function what you want called on update), so I don't believe the focus is on the objects, rather it's on the functions that the object performs, I am still open to counter points and I'd like to hear more because I like the OOP approach and would rather implement it, but it's more of a syntax preference in this case so I'll take your advice and leave it as target object in parameters.
 
Ultimately the decision should be based on what's simplest and easiest to understand, not on ideology. Thinking about how you could isolate and test each component will help you figure out how the system would break down under either paradigm, so do that before thinking too hard about whether the data or the functions are more important. If you like the OOP approach better and it's not just because you're one of those OOP fanboys, you should probably go with it.
 
That's actually some pretty good advice, thanks loads. I began modelling the OOP paradigm against the system and it all suddenly fell into the concept of static classes, so tonight I'm going to reform it to use name-spacing for all operations that involve the "self" object to act as a private static class and use the C function syntax to keep it inline with what is actually happening underneath.

Here's my new idea. Again, comments would be great:
C++:
// Name of our thing

namespace Player {

    // Mandatory Create() function

    void Create() {

        Thing::AddMeshSceneNode( self, <span style="color: #666666;">"models/scout.obj" );

        

        SceneNode::SetMaterialTexture( self, <span style="color: #0000dd;">0, <span style="color: #666666;">"textures/scout_flat.tga" );

        SceneNode::SetMaterialTexture( self, <span style="color: #0000dd;">1, <span style="color: #666666;">"textures/scout_bloom.tga" );

        SceneNode::SetMaterialType( self, <span style="color: #666666;">"solid" );

        SceneNode::SetScale( self, vec3( <span style="color: #0000dd;">0.25f, <span style="color: #0000dd;">0.25f, <span style="color: #0000dd;">0.25f ) );

    }

    

    // Optional Update function

    void Update() {

        SceneNode::RotateByDegree( self, vec3( <span style="color: #0000dd;">45.0f, <span style="color: #0000dd;">45.0f, <span style="color: #0000dd;">45.0f ) );

        

        if ( self.id == <span style="color: #0000dd;">44 ) {

            Console::Print( <span style="color: #666666;">"I am thing 44!" );

        }

        

        if ( self.path == null ) {

            const thing_t other = UDMF::FindThingById( <span style="color: #0000dd;">22 );

            if ( other != null ) {

                Thing::FindPathToThing( self, other );

            }

        } else {

            Thing::TraversePath( self );

        }

    }

    

    // Optional Drop() function

    void Drop() {

        

    }

    

    // self is a read-only struct of data derived from the map and managed by the engine

    // It is modified by engine-defined functions

}
 
So once Penumbra Hearts is up and running, I want to start work on a futuristic racing game similar to F-Zero. So today I got all fired up about it and started making early concepts for sprites (Just so that the official spriter I commission has some reference.)
Here they are:
All_sprites.png

The only 2 that are worth anything at the moment are the first one of the guy with red hair (Rona Madona) and the car next to the one of him opening his mouth.
Lemme know what you think and how I can improve ^-^
 
Mmmkay, I'll move it to there.

Also, since I'm only doing the story for Penumbra Hearts and helping with the system somewhat so I don't have as much work as Gabriel.
I've wanted to learn Processing for a while now too, but I think it's better to go into learning a language with a goal in mind, thus I think this project is a good idea.
 

Jason

Awesome Bro

Think I'm gonna' break my game down and work on it from scratch, since I keep going through this unending loop where I fix an error, then another pops up, when I fix that, another pops up, until eventually it leads me back to the first error... thankfully I've still got the project, so remaking the maps and certain events will be easy, but I'll be having to rescript a lot of the stuff I added, however, I'm thinking of finding a scripter to help out on all that shit, it'd definitely make my life easier...

It sucks that I've lost my "design documents" though, since I had all the story written out for the first few chapters with notes and stuff and descriptions of places, so I'm going to have to rewrite it all from memory, obviously I still know how it'll go and stuff, but getting all the cutscenes remade properly will be a pain in the arse, however, this time I won't streamline them, fuck you guys who want to jump straight into the game, I'm going to make you sit through a two hour cutscene if I have to!
 
Thanks Jason, you reminded me of one of the jobs I needed to get done on my project.

I was about to work on the path-finding system but as soon as I looked at it I was like uggggggggggh so I was about to work on the collision system until I read Jason's "design document", then I remembered what I was actually planning to get done today.
 

Ares

Member

Picked up my project after a 1,5 year hiatus. Still have that itch to have at least once finished a project i guess ;)

After coding away for a while in rmxp and bumping into big problems (Feel like helping?) I am now exploring a transfer to rmvx ace. I have to code a lot all over again anyways, and rmvxa actually positively surprised me.

So that means for the coming hours I will try convert my custom scripts to rgss3 and make them work again...
Not to speak of all the graphics I will have to convert...

At least i'm not bored anymore!
 
Okay so I did what I needed to do and modeled a lantern prop, which really shows the pros and cons of this stuff.

I now see that I need to write a new shader for alpha channel handling, the graphics engine I am using doesn't handle triangle ordering correctly for each model, so I'm doing a 2 pass rendering where a solid texture layer is rendered and the alpha textures are rendered last after the entire scene.

So that's another texture layer added to the list for objects...
 

Jason

Awesome Bro

Just spent the last 10-15 minutes working on a new menu mockup since the one I currently have is all over the place in terms of code, so I'm hoping to show the mockup to another scripter and see if they can do it for me, I mean, it's simple enough, but I'd prefer someone that's more efficient and tidy when it comes to coding than myself, lol... it'll also give me more time to work on the gameplay, since like I've said, I'm starting all the way from the beginning again, and that includes a fifth rewrite of the story (Will I EVER be happy?!), but I've got some new gameplay elements to throw in too which will hopefully make it more fun to play, and I've already started thinking up an idea of how the chapters will work out, and if I can get it working properly (Currently using a test bed project to see if I can get things working before I put them into the proper game, it's always a good idea by the way) I reckon I could have something interesting on my hands...

If there's anyone in here that can work with RGSS3 and fancies giving me a hand with the menu (I've got a diagram drawn up and stuff already), just throw me a PM, I'd be very grateful!
 
I have coded collision, AI movement, and AI dialogue. :)
(Both of the latter which work off of Arrays, so to enter a new dialogue/movement, I just have to add an extra item to the array)... NPCs are gonna be cinch to create now! :D
 
Xhukari":6izho46c said:
(Both of the latter which work off of Arrays, so to enter a new dialogue/movement, I just have to add an extra item to the array)... NPCs are gonna be cinch to create now! :D
Reminds me of my mind-set when I first started game programming. In the future you will look back at these words and laugh at your past-self!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top