Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ranzear
Jul 25, 2013

I started a 'quick' prototype for my major project that in four cracked-out days turned into almost a standalone game in itself.

Now I need to find like 100 people to play it at once to see if my server can handle later plans.

http://streamsnipe.me/BeamDuel.php

Adbot
ADBOT LOVES YOU

Ranzear
Jul 25, 2013

SnowblindFatal posted:

Plz patch in more features. We gonna lan this mofo in like a month or two.

E: Could you give sources or something so we can run this locally? :D
It's possible I could put some code out if you know how to get Node.js going. I keep as much of it shared between client and server as possible using a symlink to the libs directory. It gets a little funny when I change something in the player class and don't restart the server and they start arguing what the state is, but the server has authority outside of the input and position properties (and quite a bit of enforcement on the latter).

It'd need a small tweak to generate its own client IDs, as those come from PHP on page load and embedded to the page to be passed back through the websocket to authenticate, meanwhile half the client ID becomes your object ID.

I feel like a lot of people see the login screen and balk at giving a password, even though my db is more secure than most forums'. Maybe I'll just make it optional.

And yes, Thunderstruck, I do keep the console open and watch for people connecting to play with :3

Ranzear
Jul 25, 2013

ZombieApostate posted:

Your game is fun even though I'm bad at it :v:. I'm apparently permanently dead now, though.

I've set it up to be more fun with a ton of people, sniping each other from the fog and whatnot, but even mano a mano is pretty interesting.

Still haven't seen more than five players at once, and that was classmates.

Still not sure what to do about >150ms ping. If you have too much forward-simulation (lag correction) the firing cycle gets really glitchy, but I've used NEWT to play pretty well up to that.

Like I mentioned, this thing kinda turned into its own beast now, but it's been really helpful for finding major issues (Safari hates mp3) and working out minor technical things viz. not applying latency to the forward-sim of your own (local) ship.

BillyJoe here? You were really jittery. Platform? Browser?

Ranzear fucked around with this message at 00:07 on Feb 24, 2015

Ranzear
Jul 25, 2013

Yeah, forward-sim is the simulation since the last frame, and for non-local objects it also adds half your ping as latency compensation.

Aside: This is in comparison to 'reverse-sim' on the server where the game state is rolled back to the client's and pretty much retconned with their inputs. I've avoided this for being too :pgi:

To solve some of the major sync issues above 150ms ping I tried capping that addition of half of your ping at 80ms, so once you're over 160ms you start seeing the usual latency effects. It's a tradeoff against inconsistent firing cycles. I could stand to raise this to 100ms.

The lazer jumping back is your aim direction getting locked at 3/4 charge which is more for consistency, but that might be removable now that lag compensation is far better then it was. Do note that the final firing direction is very consistent across clients though. I'll try getting rid of the aimlock and see if it stays consistent.

So that >150ms consistency might not be coincidental in being 1/4 the firing charge time, but it's more likely related to the 144ms major tick rate (minor tick rate is 24ms). Tick rate shouldn't really affect positional authority though.

So the aimlock could be reduced down to the minor tick rate of 24ms if final firing direction isn't consistent without it.

Ranzear fucked around with this message at 01:58 on Feb 24, 2015

Ranzear
Jul 25, 2013

What I should do is get the hell on with it and give rotation rate towards the aim direction which slows as you charge and is also coupled to the energy bar. This would give more purpose to forward movement having more thrust and whatnot. To go with that, I'd grab the thrust direction instead of aim direction for applying dash.

Ranzear
Jul 25, 2013

OneEightHundred posted:

I think the rotation isn't wrapping around properly. i.e. if the mouse position is just below straight left, and you move it just above straight left, then the ship will do a very long counter-clockwise rotation instead of a short clockwise rotation.

Yeah, I was still working on it when you dropped in. That sign flip is a bitch and it took me too long to remember how to do it right.

All good now, though needs some tuning.

Fun times: I like to put <!doctype html> at the top of my php files so I can preview them with a drag into chrome, but this causes the window innerWidth and innerHeight to be wildly misreported and cause scrollbars to appear. So stupid and weird.

Ranzear fucked around with this message at 05:07 on Feb 24, 2015

Ranzear
Jul 25, 2013

xgalaxy posted:

Unless you need the extra features of Json.Net the community made MiniJSON outperforms it in every imaginable way. Surprising for a 1 file json (de)serializer that exists in a github gist instead of a proper repo. Json.Net is slow and eats a ton of memory, just fyi.

Definitely JSON for anything you don't have to use human eyes on. Can be a lot smaller too. BeamDuel was made just to have a handle on how much JSON I could cram through a websocket. Answer: A lot.

Ranzear
Jul 25, 2013

Centripetal Horse posted:

Are you familiar with Subspace/Continuum? It was/is the best free online space shooter of all time. It had an enormous community for years, and years. To this day, there are one or two active servers, which is impressive given that the game came out nearly 20 years ago. I ask because your game looks like what I imagine an early alpha of Subspace might have been. It would be super cool to see something like Continuum make its way into the world of browser-based games.

gently caress me sideways! That's what it was called!

I played that a long time ago, but it kinda got replaced in my head later on by uhhh ... that other SoE game* on the same engine as Infantry, and I was never able to remember what the prior was. (Aside: Toutat.us will someday be my Tanarus successor.)

But really, most of BeamDuel came from having a Gravitar cabinet in the living room.

Speaking of games from 1997, I'd never heard of Tibia (practically a UO clone), but apparently it's still around too and there's even private server developments. Some guy was streaming it over the weekend. Lots of very pure RPG mechanics in the midst of very pure 1990s interface clunk. They were working on a boss that required you turn his own pets back on him to kill him to match the official version..

Edit:
* Cosmic Rift

Ranzear fucked around with this message at 07:10 on Feb 25, 2015

Ranzear
Jul 25, 2013

I'm thinking to turn BeamDuel into a multiplayer Gravitar sort of thing. Couple of planets, dynamic zoom-in and rotation to ground tangent when you approach one. Regenerating energy consumes fuel which you pick up from planets.

I'm still getting used to top-left origin and left-handed rotation though. Has really thrown me on what should be a lot of simple math that I should have learned well enough from messing with SuperTanks.

Ranzear
Jul 25, 2013

Ah YAML ... I forgot about that one.

Probably for good reason.


I figured out why BeamDuel still has little inconsistencies: While it's using delta-time, some events like firing are still just happening on tick because it's simulating past their trigger point and resolving them on the next update. This means the server will simulate turning for the whole tick before finishing the firing cycle immediately on the next pass. This isn't too much to do with 'we're at full charge, fire the beam on the next frame', because it also means player movements aren't being simulated in proper step with the firing cycle

I now have to implement what I'd call 'delta splitting'. Maybe someone will have a more standard name for it. It would happen on both server and client.

Pre-pass all objects for events like spawning a bullet or otherwise resetting a cooldown, and turn the delta step into two delta steps split on it. On each split, update the object that caused the split first. This also means that any new objects are added and simulated on proper time instead of the next whole frame or step. This shouldn't get too crazy but I can also keep a minimum delta time of 6ms (because 144hz support) by combining closer splits, with the interesting implication that any events within 6ms of each other are considered simultaneous. With the current 24ms updates it should only cram three extra passes in at worst. This should also help beautifully on the client side when lag correction is added to the delta time.

If I'd gotten to spawning bullets before working this out they would have been wildly inconsistent because they would be created 'late' on the server every single time because of the relatively low update rate (42/sec vs 60/120/144). Maybe some of this stems from my server update step being tied to the network rate, but I later want to be able to step both up or down within a single instance depending on PvE and PvP scenario, and with multiple instances on the same server I don't really want or need it running simulation any faster than network updates.

[/livejournal]

Ranzear fucked around with this message at 23:47 on Feb 25, 2015

Ranzear
Jul 25, 2013

It's 4:30am and I just finished a thing in three weeks.

It only looks right in Chrome, because Firefox doesn't understand using more than one canvas.

There isn't a lick of balance on anything yet.

You'll have to go dig into the types file to learn what poo poo does.

Sounds will go in over the weekend. I think I still have to do the dirty left-right hack for panning.

http://caliber.online

:getin:

Ranzear
Jul 25, 2013

ZombieApostate posted:

So ramming is apparently pretty effective? If by effective, I mean your health bars both expand until they're off the screen :v:

Also, the LC model seems to have issues with actually firing. If you don't shoot the whole burst it takes forever to reload/recharge/whatever, it seems like, and you can't finish shooting off the rest of that burst.

There is indeed collision damage, but I have no idea why it'd be healing tanks nor why the damage function wouldn't be keeping it positive...

There's supposed to be a partial cooldown reset on a canceled burst.

Also, you can totally shoot down missiles with bullets (but not shells). You would have trounced me with LC vs HK.

Edit: Ramming fixed. Burst reload is scaled in a better manner.

code:
if (adjdam <= 1 && pen > 0)
		adjdam = 1;
'penetration' of collision damage is 0, hence why tanks under the requisite size aren't getting pulled back to positive damage due to the 'and'. Fixed now, and all damage is minimum 1 again.

Ranzear fucked around with this message at 13:33 on Oct 8, 2015

Ranzear
Jul 25, 2013

ZombieApostate posted:

I still got stuck where I couldn't shoot anymore with the LC and I think you saw what happened when ramming :v:

Maybe the shooting problem has something to do with trying to shoot before the recharge is finished?

It fires in a burst of five, and now just refunds a proportion of the (really long) cooldown based on how many you didn't fire.

Time for more armor on LC, and Harasser's damage was pathetic (I think it hadn't been touched since armor values all got roughly doubled).

The minelayer might be the gooniest tank...

Ranzear fucked around with this message at 14:02 on Oct 8, 2015

Ranzear
Jul 25, 2013

ZombieApostate posted:

I'm really curious to see how hectic this would get with more people.

Goddamn, as am I.

It can scale to 16 teams, but would need more than 225 players to spawn the last one. I could dial this back to less than 1:1 players per team to teams.

It can cut back the tickrate (it's probably too high to start with, as good as my forward-sim is.) to reduce load enough to maybe handle that after some good optimization passes.

It might need some final objective to 'win', like 10k energy or something. Tank costs include 4% of your team's total energy and half of that is lost.

You can steal 20% of a team's energy (once a minute) by getting close enough to their base (almost touching) and deposit energy in your own base just the same.

Tank and module costs might need to be leveled out a tiny bit, since all that energy is dropped when you die.

Ranzear
Jul 25, 2013

ZombieApostate posted:

I still got stuck where I couldn't shoot anymore with the LC and I think you saw what happened when ramming :v:

Maybe the shooting problem has something to do with trying to shoot before the recharge is finished?

You were right. I wasn't resetting burst to maximum when I set the cooldown.

Letting off the fire button with a partial burst was causing it to continuously reset the cooldown to the 'adjusted' amount, and then you had to hold the fire button down for that length of time for it to fire again and empty the burst, else it would keep resetting it.

Missiles, Mines, and Energy sprited. Tomorrow might be sound.

Ranzear fucked around with this message at 09:10 on Oct 9, 2015

Ranzear
Jul 25, 2013

Rocko Bonaparte posted:

Does anybody have an existing, nice little angle calculation helper? I'm dealing with shenanigans like testing if something is rotated to -90 degrees, and finding out instead it's rotated to 270 degrees. I'm scribbling it as a I go, but I am willing to shamelessly draw upon some helper code if there is some.

atan2(sin(A-B), cos(A-B))

AFAIK this always gives the smallest angle (not sure if always positive though) between angle A and angle B. Just absolute value it to test for a 'cone', divide by absolute value for a turning direction, etc. I now live by it for Caliber stuff (though still normalize all my angles).



Caliber now has:

Chat. Teamchat. (Dis)Connection messages.
Sounds (Server even sends some from the fog).
New modules, which now have costs.
Some little menu descriptions on tanks and modules.
Drop pods (as spawning delay).
A server-cpu-saving adaptive tickrate.
Reload bars.
The major Firefox bug (white tanks) fixed. (Also, FF never liked BeamDuel's sounds, but the Web Audio API works great)
A bunch of tweaked energy mechanics.

and a bunch of other crap I can't remember.

Ranzear fucked around with this message at 10:33 on Oct 12, 2015

Ranzear
Jul 25, 2013

Sex Bumbo posted:

If you use this, make it really clear in the function name or whatever that it's calling three trig functions and should probably not be in a tight inner loop.

I use it in feedback mostly. "Turret needs to aim at x,y, which way does it need to turn?"

I'm coming from JS/Node though, where math is cheaper than lookups.

Ranzear
Jul 25, 2013

Screenshot Saturday?



I'm rewriting Caliber.Online's bots in C++ for a CompSci final project (node.js overhead per process is a bitch). Got the barest of barebones put together already with a janky websocket library but man is this gonna get stupid.

Then I spent like six hours making the whole game less poo poo and simplifying my AI magnitudes so I can actually enjoy this quarter.

Ranzear
Jul 25, 2013

rarbatrol posted:

Yeah... Definitely profile first, and then make performance optimizations. There's almost always a #1 most expensive function that you can attack - and actually get something tangible for doing so.

Turns out generating 300x300 to 900x900 pngs of various circular gradients on demand and then drawing them per frame can be expensive. Who knew?

Ranzear fucked around with this message at 22:08 on Aug 24, 2016

Ranzear
Jul 25, 2013

Rocko Bonaparte posted:

I just hate having to declare one-shot stuff like that. Another place where I have to do it is in-game GUI stuff. If the player is opening their inventory with the inventory button, and the same button possibly closes it, I have to do a frame-to-frame check if they let go of that button at least once since they opened the inventory. Otherwise, it just immediately closes the GUI on the next frame. I'm finding that kind of temporal stuff to be messy.

Just compare current key state to a stored last-frame keystate.

Short version:
code:
// 1 = pressed, 0 = not pressed
if (keystate > lastkeystate) {
	// Just pressed
} else if (keystate < lastkeystate) {
	// Just released
}
lastkeystate = keystate
I prefer callbacks on key state change rather than per-frame polling for this very reason, but whatever you gotta do.

Ranzear
Jul 25, 2013

Mercurial handles binary files rather well. I had it pushing a whole UDK install around a long while back, and currently shove all my sprites and MP3s through it. Dunno about checkout though. I've only barely graduated from making it auto-Update on every Push.

Ranzear fucked around with this message at 05:10 on Aug 25, 2016

Ranzear
Jul 25, 2013

Because we're dirty heathens who don't need no web-front for our repos.

I might have to try SourceTree over Tortoise though. I assume it's better than a glorified GUI for Putty.

Ranzear
Jul 25, 2013

MrBadidea posted:

It's just absolute poo poo on Windows and rapidly getting worse.

Noted. Tortoise Workbench is basically a bigass 'push all this crap to the server' button for me at this point, so I can skip having cmd open. I have a bit of a *nix allergy for my main box too.

Caliber was never a big enough deal to worry about pushing broken code, but on my next project I plan to push to a test server/repo which automatically re-pushes to (but not updates) the live version and resets its own server. The hgrc hooks for this are so stupid simple:
code:
[hooks]
changegroup.a = hg update
changegroup.b = hg push live
changegroup.c = supervisord stop elimtest
changegroup.d = supervisord start elimtest
So then, with supervisord set up and a little json config file defined in both test and live, I'll just go to test.elimination.zone to see my latest junky code running on its own port, but regular elimination.zone will churn right along. Then the live version gets:
code:
[hooks]
update.a = supervisord stop elim
update.b = supervisord start elim
So as soon as I manually hg update it to some stable version (without ever needing to push twice), the live server also auto-restarts. All because I don't want to deal with running a local version of this monstrosity of a stack or deal with detached screens anymore.

That's Mercurial in a nutshell to me. I use it more like version keeping (as in "oh poo poo, I need the old version of that function to fix this") rather than version control. This setup will let me do my usual code flogging in peace and give me a reason to make descriptive commit messages so I can sum up a proper update.

"Which VCS should I use?" depends more on you than the vagaries of each.

Ranzear
Jul 25, 2013

leper khan posted:

The GUIs are all bad and either missing useful features or make doing simple things really complicated.
One reason: Editor behavior on Windows when writing a commit. gently caress that noise. Being able to scroll down a couple hundred commits and immediately see the diff is nice too.

I'm all command-line on the server (Ubuntu), but hgrc hooks do 90% of the work there.

Ranzear
Jul 25, 2013

So it's been a full year :toot: and my dirty horrible HTML5 prototyping game has reached a point that I need to move on from it. The controls are unintuitive poo poo (keyboard aiming is completely broken), it will probably roast your browser, the energy game is swingy as hell, but I loving love how murderous and smart the bots are now...

The bots I wrote because nobody wanted to play my stupid tank game the first time I posted it here. :psyduck:

Most of the goal was writing a Node.js server that could do game state and bots across multiple processes, but then I came to find out Node.js has a ton of per-process overhead, so I had to roll as much stuff back together as I could. Then came a ton of really hackish optimizations on the sprite generation to make it run better client side, and a bunch of distance-tracking horseshit to save cycles serverside, all on top of a version of the terrible, terrible energy system I co-opted from an entirely separate concept of mine to find out how garbage it is. The bots are a crazy vector system I came up with last year that can be entirely stateless. The bots do each remember their general strategy and a tank ID if you ask them to follow you, but nothing else between server updates, so really I could pare this code down to just one single bot process that receives an update for each team and sends inputs for each bot on each team rather than each bot having its own silly loopback socket, but :effort:

One appeal of these bots is that you can learn how to play by watching them, at least if you're sensible enough to not suicide-ram into enemy tanks on capture points anyway. They will respond (sometimes) to 'change' or 'switch' to shuffle their strategy from attacker to scout to fire support, and 'help' or 'follow' to latch onto you like a puppy but still mostly play the game, capturing points and self-preserving. That's the trick with the vector bullshit I came up with: they're just following an equilibrium all the time and a vector will usually have some exponential scaling factor like their HP or the size of an energy capsule to make them drive home to repair or snag the energy respectively.

If enough people join, the bots will eventually drop out entirely, but I would dare posit it a challenge to get >30 people on here and crash the server outright.

So here, get wrecked by my turbonerd bots because nobody else can stand this game for more than five minutes: http://caliber.online

Ranzear
Jul 25, 2013

LegalPad posted:

If I do it in Javascript/HTML5, there would be a lot of overhead code in working with the 'canvas' or whatever right?

Canvas games are a dark pit of despair and flipped y-axis from which there is no return and/or avoiding writing a ton of bullshit code to do simple things like draw a sprite.

Ranzear
Jul 25, 2013


This is a really nice writeup. I'm rerolling my Caliber netcode into EZ right now with an eye on resolving multiple client inputs per server frame.

Assuming I don't bludgeon my collision detection for another few hours...

Ranzear
Jul 25, 2013

Twelve days of fury so far:
http://test.elimination.zone/login.php

Just gotta get doors working (opening and closing at request of room on either side) and ... then I get to do art. :shepicide:

At least I don't have to mess with draw order due to my Nɪɴᴇ Cɪʀᴄʟᴇs Oғ Cᴀɴᴠᴀs Hᴇʟʟ and the drop shadow stacking is going to be loving fabulous.

Ranzear
Jul 25, 2013

Polio Vax Scene posted:

Not sure what I'm doing but I found your dot or something!
My movement was really not-smooth for some reason. I went in the direction I pressed but had lots of very tiny jumpiness.
That's all there is right now. Multiplayer dots in an infinite (within reason) maze. Movement is jumpy because there is zero smoothing or even latency correction yet.

I think it takes issue with Chrome 52 by the way. 53 is okay. Firefox seems solid, which is kinda bizarre.

Polio Vax Scene posted:

And that Twitch login support is rad!
It's super handy. I don't have to manage poo poo, and can even require a verified email. Plus it's relevant to the actual intent of the game, which I'll save detailing for later.

Ranzear fucked around with this message at 22:58 on Oct 12, 2016

Ranzear
Jul 25, 2013

roomforthetuna posted:

camera freaking out in I think one-frame-lagged positioning, resulting in the camera jumping up when the 'me' dot jumped down and vice-versa.

Good catch. The view update was running before the room step. Noticed when trying to fix room transition sliding.

Ranzear
Jul 25, 2013

I still think Dishonored has the worst art direction of any modern era game.

Every guard looks exactly the same, and not even to really benefit game mechanics. Everybody wears exactly the same clothes, which all look bolted on because of absolutely no cloth physics (notice all the women wear pants or less because of this, even the hookers and maids). Everybody has the same gaunt cheeks and flat dark hair except maybe Samuel, and they're either clean-shaven or chinstrapped. I get that it's a parallel to industrial age London, but that still gives more options than navy blue wool and/or off-white linen. Oh wait, that guy in the brothel had a red vest, because he was important I guess. That's about where I stopped paying attention.

The lore, story, and gameplay is great. The art is loving bland and actually ruined the game for me, because it's like half their art team quit or were fired six months into development. Normally art is a non-factor to me, but holy poo poo the characters are about as differentiated as chess pieces, except those at least come in two different colors.

I set aside the thought of Dishonored actually being a Thief homage far before it actually came out, so my expectations were low. You don't have to tell me my opinions are poo poo, because all I've seen of this game since playing it at release has been speedruns and I didn't touch the follow-on DLCs and whatever. It's the only game I have this problem with.

I could take screenshots of most of the characters in the game, blur them a bit and cut out the background, and you could not possibly tell me which was which with any consistency...

Ranzear fucked around with this message at 23:58 on Oct 14, 2016

Ranzear
Jul 25, 2013

Yeah, I know the DLC is really good. It's an opinion built long after actually playing the game and while watching my brother play it or speedruns. It's much harder to ignore when you're just a spectator. It's the crazy disconnect between intent and result that gets me in one particular instance: The maids. They're in black with white frills like the intent was 110% French Maid, but they're wearing loving breeches and working in a bar.

That the gameplay is good enough to distract from that is nothing but praise.

Unrelated:

I just chased the dumbest thing in circles for about an hour. Let's see if anyone else can spot the issue:

A player entering a room is put in a queue stored in the room object for whichever door they're coming through with a 500ms countdown.
The room simulation step subtracts the 'last run' timestamp stored on the room object from the current time for a delta and steps the room that far, which also counts down the room entry queue.
When their entry queue reaches zero, they're placed in the room at the door they entered via.
Rooms can be unloaded from the worker back to the head when all players leave, and dispatched back to a worker when a player reenters that room.

Why was the entry queue getting skipped on room reload, breaking my nice zelda-slide transitions?

Ranzear fucked around with this message at 02:33 on Oct 16, 2016

Ranzear
Jul 25, 2013

You hit everything I thought of at first.

roomforthetuna posted:

"Reaches zero" might exclude "already passed zero".
Most of my decrements use a Min(value,decrement) pattern, but I was checking <= anyway.

roomforthetuna posted:

If the only player in a room leaves and enters simultaneously (as "reload" might describe), unloading might occur after dispatching to a worker.
Rooms stay active, simulating frames, for ~1.25 seconds when the worker has zero players assigned to that room, the issue only happens at least 500ms after this timeout.

roomforthetuna posted:

It's unclear whether "all players leave" includes players in the entry queue, or just players actually in the room. (Similarly unclear, whether "reenters" refers to the post-queue entry or the pre-queue entry.)
That's actually something I'll have to look into, if a room can get unloaded while someone is in an entry queue, but each player object stored in the worker has a room assignment and it counts these room assignments rather than anything in the room, so I'm pretty sure it's safe.

It wasn't a problem with the entry queues (though I came to discover it when I shuffled the order of room sim and entry queue) More clarity: When a room is active, the main thread only tracks what worker it's assigned to. When a room gets unloaded back to the main thread, it gets put in an inactive set that stores the entire room object for dispatching to any worker later. The main thread doesn't run any room simulation on inactive rooms...


Edit: I won't drag this out - When a room was reloaded from inactive, it's last timestamp was from way back when it was first unloaded, so the room was getting simulated for the entire time since, including the entry queue timeout. I'm just surprised there weren't huge lag spikes as it did hundreds of frames at once. The solution was to set the last run timestamp to 'now' on reload.

Ranzear fucked around with this message at 22:19 on Oct 16, 2016

Ranzear
Jul 25, 2013


I was just thinking to do a stack of offset layers for my botes project last week, and now you go and post layery botes before me.

I'm still hung up on my water effect anyway.

Ranzear
Jul 25, 2013

RabidGolfCart posted:

It's fairly straightforward to implement with simpler objects. However trying to scale and offset the layers in a way that gives the scene perspective continues to be mind-numbing.

Also I want to look into creating a simple pipeline for this kind of art, so far I have to hand-pixel the layers. Ideally I would need a utility that converts vox files into image slices, but that's also difficult to figure out for someone like me with very little programming experience.

It'd be the very definition of orographic projection, yeah. I think trying to do perspective is just a few scaling tricks, but there's a maximum you can 'skew' an object (in z-axis) before it'll look weird.

I could bang something together using a JS canvas that'll spit out PNGs later today if you can link me the vox file format.

Ranzear
Jul 25, 2013

RabidGolfCart posted:

Well if you want to take a crack at it, I was planning on using MagicaVoxel to make the models. Much to my surprise, the creator of MagicaVoxel also provided the specification for the .Vox format.
I got stuck because I was expecting the data to be stored similar to a bitmap, but it actually stores the individual voxels as coordinate points with a pallet index. I couldn't think of an efficient way to read the data and plot it to a bitmap with my limited programming knowledge.

The RIFF spec was what I was missing to get anywhere on this. Now I understand what the chunking is about. I'll give it a whirl this weekend probably.

Ranzear
Jul 25, 2013

Time squared?

Ranzear
Jul 25, 2013

LLSix posted:

Not time squared. The units for velocity are meters/second and gravity is an acceleration which has units of meters/second/second so multiplying my time once to get meters/second is correct.

Right, when trying to get a velocity instead of a position.

BirdOfPlay posted:

DistanceY = InitialVelocityY * Time - (Gravity * Time ^ 2)/2

I knew it was in there somewhere though, for what he wanted.

I'd probably just sim it.

Ranzear fucked around with this message at 06:31 on Mar 31, 2017

Ranzear
Jul 25, 2013

oliveoil posted:

How do people handle save game switching between devices for single-player games where you don't care about player cheating and want players to be able to play entirely offline if they'd like?

All data is mastered on device, which is periodically serialized to one big JSON blob and stored in my butt?

That's about the gist of it. You'll want some sanity checking on the size, a lot of error checking if you every try to unpack it server-side, and maybe a solid identification system based on something that isn't just a random string of characters, or at least can be looked up via email address or something. Having to write down a code 'just in case' is silly, and if (in a mobile game) you lose or damage your device and didn't it's gone for good anyway and your restore system is kinda useless for anything but both-devices-in-hand migration.

After sorting all that out, I'd just throw them in flatfiles on the server, don't need anything fancy like a dbms. Overwrite each time or even keep the last three and increment/delete. Just don't host those files directly with apache or nginx for a bunch of security reasons, only serve them back with another script with the same 'real client' checks.

Adbot
ADBOT LOVES YOU

Ranzear
Jul 25, 2013

That has been expressed to me in my new company already: Players are dumber than you could ever imagine.

There is a bit of truth in that though. We ourselves are operating with prior knowledge and games have their own version/scale of literacy.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply