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)

New vendor system:

HS_ShopNew_edited.gif


It's working OK so far, but you can't actually buy anything in it yet. The vendor doesn't have an inventory, but you can browse the player's inventory. You can't sell anything yet though either.

My next step was going to be putting prices on items. I could give everything a generic price for now, and I probably should just to keep moving. But now I'm starting to think about the different ways I could price the items in the game:

1. Set price for purchase, half price vendor buyback (as in most JRPGs)
2. Calculate price based on stat boost, small fraction of price for vendor buyback (as in World of Warcraft)
3. Simulated economy, supply and demand, dealer has a margin (as in Mount and Blade)

By the way, the items in your inventory are listed individually, and not stacked. The reasons for this are varied, but one reason is that I want to include weapon level-ups at some point. Basically you can enchant your items, but only after you've leveled them up through use in battle, and different enchantments requiring different stats (including one powerful enchantment that will require at least one previous wielder to have died). There will be a popup window that appears on mouseover to show you an item's stats, so you know not to sell that sword that's about ready for a new enchantment.

But that's all pretty far down the road still. For now I just have to decide on how to calculate the prices. I'm thinking I'll probably go with #1 just because that'll be easiest and it'll be what most players will be most comfortable with. But if anyone has any input, I'm open to suggestions.
 
Nathaniel3W":ypgrjwef said:
New vendor system:

...
Last time I saw screenshots of your project I noticed that all the sprites are axis-aligned to the world, rather than the camera, are you going to do anything with this? I don't like how "flat" the sprites look on the edges of the screen, aligning to the camera would solve that at the expense of higher field of views making the sprites look like they are leaning Smooth Criminal style at the edges of the screen (as opposed to making them look like flat characters).

Ragnarok Online aligns to the camera, as does pretty much every game that has 2D character sprites in a 3D world.

EDIT: Using depth-bias you can also apply offsets to anchor your sprites at a certain point without having them clip through the world, have you encountered clipping issues and if so I'm interested in how you solved them, if you've solved them.
 
Xilef, you just perfectly described a bunch of the issues I ran into with trying to draw these sprites. Here's what I did:

I started off turning all of them towards the camera. Easy enough. But then at the edges of the screen, they lean a lot, "Smooth Criminal style" as you say. Also, if they're standing near a wall or something, their heads clip into it.

To try to solve the leaning issue, I tried moving the camera way out and zooming way in to approximate an isometric camera. (Unreal 3 doesn't allow for a true isometric camera in-game. You have to have some perspective.) That worked somewhat, but at great distances, Unreal's z-depth buffer starts to make approximations. I had rugs blending into the floor, curtains blending into the wall, and overall it just caused more problems.

To solve the head-clipping issue, I tried looking into depth bias. I thought I could just set the sprites' draw depth based on where their feet are, and then draw the whole sprite as though it were at that depth. But Unreal 3 only allows two depth settings: foreground and background. Foreground is meant for a 3D HUD or your first-person-shooter arms so they don't clip into the game world. Background is for everything else. They don't let you override the draw depth any other way. Because I shelled out for the full Unreal 3 source code, I could technically write that functionality in myself, but because I'm a team of one, I just don't have the time to try that now that I'm pushing to finish the game.

Eventually I decided to make the sprites face the camera on the horizontal plane, but keep them perfectly vertical. That looked OK, except along the edges: At the side of the screen, vertical is still tilted away, and along the bottom of the screen, the characters are short and narrow as you look at them from the top.

So to counteract that, I stretch and tilt the sprites based on where they are in relation to the camera. If they're at the sides of the screen, I roll them to counteract their heads pointing away. (The plane they're drawn on is still vertical, as in perpendicular to the ground, but "up" is rolled clockwise if they're on the left and counterclockwise if they're on the right. My daughter who watched me trying to get the formula right started calling them the "tilty people.") Also, the closer they are to the camera's plane, the taller I make them. That way, as they pass under the camera they get really, really tall so that their perceived height stays approximately the same.

That all looked pretty good, but you could see what was happening to their shadows. Their shadows went absolutely nuts.

So I made the sprites not cast shadows, and instead made a copy of the sprites that don't stretch and tilt. That copy is invisible to the camera, but it casts a shadow. So that way, the characters cast shadows that match what they actually look like.

And that's where we arrived at the current look of the game. I know it's not perfect. I wish I could have found a game engine specifically designed for sprites in a 3D world. But I kind of patched one together in the end.
 
If you want to cheat, drop your camera's FOV to a low number and move it outward, then they won't lean as much on the edge (at the expense of some perspective).

I forgot how limiting UDK actually was, we're kind of spoiled for engines these days as you can pretty much do anything. UE4 you can just go into the code and add polygon offset + align to camera and get it working in no time, if you have the knowledge of using that engine.

Unity supports camera aligned billboards and Unity shaders have support for modifying the depth, so Unity you can probably get it working rather quickly.


It's rather surprising just how far we've come since UDK

EDIT: I don't think it's worth you switching engines just for this one thing, stick with UDK
 
Thanks! I've been working on it all day. Unreal 3 doesn't like dynamic lights. If you use dynamic lighting, your performance drops significantly. So this is an unlit material that ignores lighting and I control it using some parameters. Basically I tell it to apply one of a few possible colors based on the normal and the direction to the camera--a lighting color, shadow color, or highlight color. And then I switch which set of colors I'm using based on time of day.
 
Two things I worked on:
Loaded a new tileset on my main project and made a way for the windows to switch between day and night versions (based on a switch I reserved for night)
45zfYTt.png
jJi9Fea.png

Ported an MV game to UWP both with Visual Studio's Javascript Project and Apache Cordova. There are issues, but it's almost an 1:1 conversion. Here's how it looks on mobile: http://imgur.com/a/jpz0d
 
I think The Way Forward for me is to just edit stuff and make stuff but not announce it or anything. Then when I've actually made something substantial I can call it an expansion pack and everyone's happy. I am a faileeuuer.
 

Jason

Awesome Bro

I think you suffer from the same thing I do, show and talk about stuff way too early... better off talking about something when you're closer to finishing it I reckon
 

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