Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Vapourware Codexian Game Development Thread

shihonage

Subscribe to my OnlyFans
Patron
Joined
Jan 10, 2008
Messages
7,157
Location
location, location
Bubbles In Memoria
Yes I'm aware of shadow issues.


Something's off with the walk animation. Maybe it should cycle a bit faster. Now the characters seem to be skating around.


This is a framerate-driven engine with sprite animations which I pay for, so my options of adjusting this are limited to these, or combination thereof:

1) Double or halve the animation speed (halving would make it choppy, doubling would make it too fast in most cases)
2) Pay the animator to re-render thousands of frames multiple times until we get the timing just right
3) Radically rewrite the engine to be timing-based, with all the glitches that will follow
4) Adjust the amount of pixels per step a person takes

The right amount of pixels is surprisingly hard to nail, as different people seem to require different amounts, and also some animations simply won't mesh with amount of pixels I can ALLOW them to step.

During creation of Fallout, Tim Cain and Leonard Boyarski spent a LOT of effort together as animator and programmer to make sure no character skated, and that NPCs felt completely connected to the ground. In retrospect, Boyarski believes it was a waste of time that could've been spent elsewhere (in his recent Matt Chat interview).

This certainly meshes with my putting it as low priority task, considering how I don't have the team, budget or time they had at Interplay.
 

Duckard

Augur
Joined
Aug 14, 2010
Messages
354
I just spent the past few days implementing UI functionality, and also the foundations for saving and loading. Serialization was a huge pain in the ass, and I feel like it will continue to be such going forward. Still, excited to bust out the spreadsheet again and get back to gameplay work.

shihonage FOW fading in and out looking good. Also, I agree that while the skating is weird it's acceptable for a small team. Spiderweb games have a bunch of skating. Only suggestion if you haven't already done it is to create a measure (e.g. 1 tile in game = 0.5 meters = 2 unit in the animation program), and then tell your animator the speed at which the character should move. Won't fix the footfalls, but it should help with problems arising from speed disparity.
 

zwanzig_zwoelf

Graverobber Foundation
Developer
Joined
Nov 21, 2015
Messages
3,084
Location
デゼニランド
Serialization was a huge pain in the ass, and I feel like it will continue to be such going forward. Still, excited to bust out the spreadsheet again and get back to gameplay work.
I don't know how you're handling it, but maybe my approach will help in one way or another.

In order to serialize something I create a stripped-down version of the classes I want to serialize, then write some code to copy the values from the in-game object to the class that needs to be serialized.
Upon loading I either check the object at the position written in the savefile if it's a static object (e.g. door, console, etc). If we're talking about objects that can be destroyed/changed by the player, I just purge the whole level and recreate these by making a clone of a prefab for this object and copying all saved data from the savefile.

Not sure if this will help you, but hopefully it will.
 

vlzvl

Arcane
Developer
Joined
Aug 7, 2017
Messages
191
Location
Athens
I did my serialization work the past 2 ways for saving and loading.
It *is* a pain in the arse since C++ containers such as map can get extremely ugly and while you can handle them easily from scratch and save them no problem,
the loading can get pretty fucking ugly since the states are very dynamic.
I had to battle with dynamic monster position and their id, status effect times, spell duration, fog of war visibility, chest items etc. etc.
I ended up using a nice XML to allow some breathing and flexibility and allow some compatibility.
My mechanism is pretty easy:
- At start of game i just load static values in containers, players etc.
- The i load the initial map and place the party.
- Then when i want to save, i just prepare my XML and save everything, including the dungeon name
- On load, i still load the map stored statically in my data files, then i just *overwrite* everything with my dynamic data in XML (monsters, chest items etc.)

The trick here is before you save, you *unload* your current dynamic data (current level) into an *all maps* data, then save that global data, not local

For example:
- load map into say localmap variable (just an example)
- when you save then, then you do this: allmaps[ current_map ] = localmap, then save allmaps instead, no local

This way you basically *transfer* the local data to global all the time just before you save or after you load.
Sure, this might be expensive on memory since you *hold* memory you may not use but in my RPG case of a game i will be using events & decisions across all levels so its incredibly handy. Perhaps there is are some bugs here or there but at the moment i save and load everything just sweet
 

CryptRat

Arcane
Developer
Joined
Sep 10, 2014
Messages
3,548
For anyone has time and is interested, starts in 20 hours: https://itch.io/jam/lartus-mini-rpg-one-week-jam
I made a simplified engine and a mini-dungeon for the occassion which seem to work. Almost no more work to do (but probably tons of bugs and typos to look for) ; I may or may not dare to share the game at this point.
pli7aUo.jpg

 

CryptRat

Arcane
Developer
Joined
Sep 10, 2014
Messages
3,548
Well the game can be completed, I've got a couple of more days to test ; I'm not the one doing the assets but they should be ready too.
4BMZfcw.jpg
 

Duckard

Augur
Joined
Aug 14, 2010
Messages
354
zwanzig_zwoelf vlzvl Thanks guys, here's what I eventually did.

There are 3 types of objects that get serialized.

1. Presets defined at development time. These need to be serialized by value only upon building the game, and otherwise by reference.
2. Objects that are referenced by other serialized objects. These need to be serialized by value only once upon saving, and all references to them should save only an identifier.
3. Objects which are serialized but are not referenced by anything else. Always saved by value.

My current method is to keep a list of all of (2) and save that first. Then save (3). This doesn't handle complex object hierarchies and will break if any of (2) or (3) have references to (2). A more robust option would be to save the first occurrence of each (2) by value, and otherwise save only its identifier but I don't need to do this right now.

When it comes to saving maps, I only need to save the dynamic parts -- a mapping of coordinate to entity identifier (everything that can occupy a hex has an entity), and a scene id. Everything else about the map is defined at development time. After loading that data, I just need to reconstruct the state from the saved data. I still need to implement this part, though and the reconstruction seems like a fair bit of work.
 

Ninjerk

Arcane
Joined
Jul 10, 2013
Messages
14,323
Yes I'm aware of shadow issues.


Something's off with the walk animation. Maybe it should cycle a bit faster. Now the characters seem to be skating around.

Yes I'm aware of shadow issues.


Something's off with the walk animation. Maybe it should cycle a bit faster. Now the characters seem to be skating around.


This is a framerate-driven engine with sprite animations which I pay for, so my options of adjusting this are limited to these, or combination thereof:

1) Double or halve the animation speed (halving would make it choppy, doubling would make it too fast in most cases)
2) Pay the animator to re-render thousands of frames multiple times until we get the timing just right
3) Radically rewrite the engine to be timing-based, with all the glitches that will follow
4) Adjust the amount of pixels per step a person takes

The right amount of pixels is surprisingly hard to nail, as different people seem to require different amounts, and also some animations simply won't mesh with amount of pixels I can ALLOW them to step.

During creation of Fallout, Tim Cain and Leonard Boyarski spent a LOT of effort together as animator and programmer to make sure no character skated, and that NPCs felt completely connected to the ground. In retrospect, Boyarski believes it was a waste of time that could've been spent elsewhere (in his recent Matt Chat interview).

This certainly meshes with my putting it as low priority task, considering how I don't have the team, budget or time they had at Interplay.

I think it's in part #4 and in part the lack of torso movement of the model. A major part of walking is falling and that isn't happening here. That said, it's definitely a minor issue at this or any point, I think.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
So my current project, code named "I'm making a... Thing"

It consists of The Main Project.

I learned my first lesson the hard way, by at first, just inserting my test code into it. That one time...I couldn't get the test code to work, So i'd start tweaking this or that and at the end ended up with a project that wouldn't work anymore and I changed so much shit, I couldn't figure out how to repair it. (I had a backup from before I started..but still)

Now I have The Main Project and 2 sub projects (map editor and texture-izer), along with 6 or 7 other test projects.

The biggest test project (dealing with both the map editor and texture-izer), was to reduce the D3D draw counts (2,000+)
This was killing the frame-rate. 5 FPS on a 100x100 map.

So I came up with a way to make my existing map all 1 object resulting in 1 Draw call...Fabulous!
Now the texture-izer app part, let's me select a pair of faces in the map (walls or floors) and re-texture them.
I notice every time I add a new texture, my draw count goes up by 1...not a big deal. FPS is still the the 500's

Fast forward 2 or 3 weeks as I work on all the other test projects.

Finally, I have some working test code I want to add to the texture-izer.

Fire up the old sub project...and WTF? 4 draw calls! I thought I fixed this, it should be ONE!

Search the code for about an hour thinking I loaded some test objects...Nope.

Well...FUCK. Can't find what has gone wrong! I better test if the re-texturing still works.

It does. I texture a few faces...great, let me test adding a texture and re-texturing a face with the new texture...draw count goes up by 1 to 5...hrmmm.

DERP DERP.

ARG! Problem solved :) I just forgot I had already added 3 additional textures. (1 draw call for 1 object with 1 texture, plus 3 for the additional textures, plus the texture I just added = 5)

:negative:+:retarded:+ finally = :dance:

Zep--
 
Last edited:

vlzvl

Arcane
Developer
Joined
Aug 7, 2017
Messages
191
Location
Athens
I notice every time I add a new texture, my draw count goes up by 1...not a big deal. FPS is still the the 500's

I hate multiple textures since they decrease performance on both rendering (due to more draw calls) and also loading time.
You may want to start using sprite sheets, then you just need to convert pixels of specific subimage to texture coordinates on one single image.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
You may want to start using sprite sheets, then you just need to convert pixels of specific subimage to texture coordinates on one single image.

Yeah, not texturing sprites, but I know what you mean. 1 YUGE image consisting of different textures.

I don't think that will work well with the faces, well, unless I start fucking with the U,V of every face (which at this point, I don't need to do) 5 or 10 or even 100 draw calls for the map level+its textures will still give me an acceptable frame rate.

Zep--
 

vlzvl

Arcane
Developer
Joined
Aug 7, 2017
Messages
191
Location
Athens
will still give me an acceptable frame rate.

i hope the system you are testing your game on, is not a power rig 8)
They tend to give you 1000-ish frame rates regardless of what you are throwing into them,
but there are a boatload of players out there with much weak rigs, including me, with Intel HD and such.
If you can find a weak rig to test the project on, the better.
I remember the time Legend of Grimrock was in development, i was bitching so loud on their forums
about performance all of the time. Unless you are planning to give a "minimum requirements", invest some time in this.
But 100 draws is pretty small number, unless you are drawing only 2 or 3 triangles per call.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,226
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
I thought the loss of a character would be more painful if the player gets used to seeing that character regularly. So I decided to implement a follower system.

FollowerTest.gif


At first, I made the follower move toward its leader, wherever the leader is. But then if the leader goes around a corner, the follower gets stuck. So I had to implement a movement history and make the follower follow that. And I had to disable collision so you don't get stuck in a corner with your followers behind you. And I had to fix teleports to keep followers together. And I had to mess with physics if you're on the second floor of a building going downstairs, and the second floor vanishes with your followers still on it. And what if your followers die in combat? And what if you go to the squad menu and back again? And how do you save and load who from your army is in your personal retinue? And now I am running into all of these situations where having followers around was more complicated than I thought at first.
 

ProphetSword

Arcane
Developer
Joined
Jun 7, 2012
Messages
1,755
Location
Monkey Island
And now I am running into all of these situations where having followers around was more complicated than I thought at first.

Building video games in general is like that. Some things are much easier than you would have imagined, and some things you thought would be super easy turn out to be the hardest things in the world. But, damn, it's both fun and rewarding when you figure it out.
 

Duckard

Augur
Joined
Aug 14, 2010
Messages
354
1xBh2Lx.png


What information do you draw from these targeting panels? Also, which panel do you prefer?

I've never seen a game that shows targeting info in the form of all possible outcomes corresponding to their % chance of happening like B, so I hesitate to do it even though it's a more faithful representation of the decision the player is making. All popular games feature something along the lines of B where it just shows you conditional probability for crit chance (if it shows it at all). By the way, crits represent attacks to unarmoured parts of the body, and the armour mechanic is central to the gameplay so I can't just show hit chance like most games do.
 

DavidBVal

4 Dimension Games
Patron
Developer
Joined
Aug 27, 2015
Messages
2,994
Location
Madrid
PC RPG Website of the Year, 2015 Codex 2016 - The Age of Grimoire Make the Codex Great Again! Grab the Codex by the pussy Insert Title Here RPG Wokedex Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming! Pathfinder: Wrath
1xBh2Lx.png


What information do you draw from these targeting panels? Also, which panel do you prefer?

I've never seen a game that shows targeting info in the form of all possible outcomes corresponding to their % chance of happening like B, so I hesitate to do it even though it's a more faithful representation of the decision the player is making. All popular games feature something along the lines of B where it just shows you conditional probability for crit chance (if it shows it at all). By the way, crits represent attacks to unarmoured parts of the body, and the armour mechanic is central to the gameplay so I can't just show hit chance like most games do.

If I get it right, the 20-25 is some extra source of magical damage, not affected by crit? but it deals damage even if you miss? weird.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom