/agdg/ + /vm/ Thread

Blueprints a shit edition

Last one went over 300 posts, so you know the drill.

>>>/agdg/ and >>>/vm/ are there for resources, famalam. We also have #8/agdg/ on Rizon.

Other urls found in this thread:

creativecrash.com/maya/script/cubemap-skybox-6-camera-setup
drive.google.com/file/d/0BxAUmolQ9DxLdmcwNDVFeWhORTA/view?usp=sharing
unity3d.com/legal/terms-of-service?utm_campaign=other_global_announcement_2016-07-Global-TOS-update&utm_medium=email&utm_source=Eloqua&elqTrackId=f8b55c2142cf4c6092b4c1a1d3e2098c&elq=8bbc6c6c81eb40c39495043eaf73e5ba&elqaid=1359&elqat=1&elqCampaignId=1848
youtu.be/RTWSEo4PL54?t=16s
en.wikipedia.org/wiki/Category:Freelance_marketplace_websites
spriters-resource.com/
store.steampowered.com/app/206440/
en.wikipedia.org/wiki/Virtual_memory
vocaroo.com/i/s0n9mnYH7RVa
answers.unrealengine.com/questions/384201/physic-asset-creating-bone-moves-far-away.html
homph.com/steam/
filedropper.com/3d-stripped
forum.unity3d.com/threads/creating-a-node-based-editor.91422/
drive.google.com/open?id=0B1laio2k4Hufd0FJMmFHZ1M1Njg
forum.unity3d.com/threads/simple-node-editor.189230/
drive.google.com/open?id=0B1laio2k4HufYVVleHF3TFFCSlE
github.com/doctard/Unity-Node-Editor
gameprogrammingpatterns.com/data-locality.html
gitgud.io/TheSniperFan/OpenGameConfig
stroustrup.com/Tour.html
stroustrup.com/Programming/
twitter.com/NSFWRedditVideo

Repostan:
What's a good game to steal sprites from?
I want to make a mini-beat'em up project to train a bit.
Preferable a character with a shield.

Sadly I don't have the time to learn how to properly code and blueprint has actually allowed me to get things done. Like just a few days ago I got short-hopping/jump height controlled by time button is pressed to work in the FPS template.
I'm a step closer to making a game in the same vein as Metroid Prime and if I have to do it all in blueprints, then such is my fate. Thankfully I can model competently.

In your case you might have no other option, but that doesn't mean using those tools shouldn't be widely discouraged and ridiculed.

You should at least understand why this is the case. There use to be a barrier that kept determined people in and half-baked attempts out, and now that it's almost completely eroded we have crappy unity games absolutely flooding the indie market making it a case of diving for diamonds in a sea of shit. In fact my personally favorite indie game is impossible to pick out as unique from some of these games by screenshot alone due to its low poly/texture style which is likely due to large levels, mutiple first person views, and 2 dev team

You might have legitimate reasons for using those tools and make something of quality, but as long as those same tools enable lazy retards to shit out SJW walking simulators and unfinished games then everyone will probably still bash the shit out of them. It's not your fault this is the case, just the fact that it is a natural law that anything accessible will be ruined by retards.

Repostan my Colt 733 from the last thread since I didn't notice it died. R8, h8, masturb8, etc.

And also what stock configuration looks best on it.

It looks pretty good for so few polys. Halfway looks best in my opinion.

DOES ANYONE KNOW HOW TO MAKE A CUSTOM SKYBOX IN THIS GOD FORSAKEN HOLE?

IVE SEARCHED EVERYWHERE.

Everything I can find online is only faggy children showing how to paste a pre-made cube map onto a cube. I dont want to do that. How do you make the scene in the first place?

render six views. not rocket surgery.
creativecrash.com/maya/script/cubemap-skybox-6-camera-setup

If you mean shit that's in the background and is actual 3d models, they use a skybox camera.

If you're talking about the actual skybox texture.
One way I was thinking of doing it is either pulling images off the internet or taking my own pictures of features you'd see in the sky. Then in gimp create the cube image layout minus the bottom, paint the whole background the color you want the sky to be and and add a gradient so it gets lighter towards the ground. Then start shoping your features in and messing with the hue/sat/value till it blends in. I haven't actually done this in practice though.

If the user asking about the size of a gun on a screen is still here, you might find this useful.
I did research for my game how much space the guns in various games take.

In modern games they are slightly bigger. Maybe because the modern screens are bigger.

Does anyone know how to use multiple sprites from the same spritesheet in an AnimationPlayer and/or AnimatedSprite nodes in godot?

...

as opposed to what

But unity requires coding. What does that have to do with blueprints?

It was sarcasm
As the best fidelity+dynamic visuals is implementing atmospheric scattering and volumetric clouds (recreating irl processes).
Which takes a lot of doing, but looks damn good.
Thou it's entirely unnecessary for most people's requirements.

A better alternative to static skyboxes are procedural skyboxes.
You still retaining a lot of control, they can change on the fly, but obviously it has less fidelity than my initially mentioned method.
They're relatively easy to setup, and there's plenty o' guides out there to get u started.

I kinda was making a blanket statement about all the convenient tools people constantly rag on. Even if Unity is suited for professional development it's convenient enough to attract retards. I mean shit, I even had some random guy join a server I frequented and say "Hey can you guys greenlight my game. I just reused a bunch of unity assets"

Got some penetration to show off on my trace projectile system, taking into account material type, thickness, and ballistic physics. There's also ricochet but it's not pictured here.

First screenshot is from an AK-47 firing soviet 7.62. Second is a Gepárd anti-materiel rifle firing .50 bmg. Third is a Sig Sauer p226 firing .40S&W.

Colour of traces is based on its speed. Blue means it retains >75% of its initial velocity. Green is >50% but 25% but

I did it a while back. I wrote my own animation system which was actually pretty easy if you know how. I forget the details so you can just have a look at the project files I made for reference.

Open the bear.scn file and look at the bear_sprite node's script. Then take a look at the Benisbear node to see how it uses the animation functions at runtime.

drive.google.com/file/d/0BxAUmolQ9DxLdmcwNDVFeWhORTA/view?usp=sharing

Map update

Has anyone here built and run OpenTDD on Linux? I'd like to play around with it from the inside and figure out how it works, maybe make some mods to it.

For example, I'm currently trying to figure out this bit of code from /src/linkgraph/mcf.cpp :
/** * Eliminate a cycle of the given flow in the given set of paths. * @param path Set of paths containing the cycle. * @param cycle_begin Part of the cycle to start at. * @param flow Flow along the cycle. */void MCF1stPass::EliminateCycle(PathVector& path, Path* cycle_begin, uint flow) { Path* cycle_end = cycle_begin; do { NodeID prev = cycle_begin->GetNode(); cycle_begin->ReduceFlow(flow); if (cycle_begin->GetFlow() == 0) { PathList& node_paths = this->job[cycle_begin->GetParent()->GetNode()].Paths(); for (PathList::iterator i = node_paths.begin(); i != node_paths.end(); ++i) { if (*i == cycle_begin) { node_paths.erase(i); node_paths.push_back(cycle_begin); break; } } } cycle_begin = path[prev]; Edge edge = this->job[prev][cycle_begin->GetNode()]; edge.RemoveFlow(flow); } while (cycle_begin != cycle_end);}

Forgot to mention that materials shot here are 10cm of wood, 5cm of concrete and 1cm of steel. The .50BMG has much better penetration.

Pic is an example of ricochets. They currently don't lose too much velocity, and can bounce anywhere from 1-11 times. You can also shoot yourself with ricochet if you aren't careful or shoot flat surfaces head on.

Thank you man, I won't be able to check it out now but I'll try it tomorrow then I'll tell you.
I was worried that I'd have to loop through a bunch of sprite textures to make it work, but I think that from your words, this is what you did.

Anyone remember the shmup I was working on and posted about?

It's released on Steam today! A huge milestone for me.

Big thanks to everyone who played the demo and provided feedback and support!

Congrats man.

Why the agecheck, is there lewd? $10 for a schmup, well, ok. Played a premium schmup before years ago, was okay. Yours looks more hardcore.

You might want to give review copies to the usual game journalist suspects.

About advertising on Holla Forums, I tried that once, the clickthrough rate is phenomenal, however I got zero conversions. That's why I suggested gaming sites. I got a high conversion from Lewdgamer, and the rest of my customers occurred naturally through "You may be interested in…" automatic suggestion feature.

Anyways, congrats man. I feel an affinity, since agdg, especially the small 8 agdg, feels like the real basement coders.

May you find shekels.

Thanks, guys.

Agecheck because of the slight gore, I guess. I chose the price because that's pretty much the average for shmups, some are more expensive. I've been contacted by some lets players and gaming sites for keys, so there should be some reviews soon.

I don't expect a lot (if any) sales from Holla Forums, I just post here because I posted about the development of this game here too and hope this announcement will inspire and motivate fellow devs to not give up and keep making the games they like. I can share some experience about the whole process, so if anyone has any questions I'll try to answer them.

Holla Forums would be great if you were making a free game to troll people with. For example, having something called RACE WAR or WE WUZ and having banner ads on Holla Forums. But otherwise I can confirm no one here really buys shit.(Well I do, but not directly from this board.) It's mostly to say, he look, watch this tinfoil hat video.

It's good that you have key requests, that's one good thing about youtubers and streamers, they always need new content for their channel, so anything new that pops up on steam is guaranteed their attention.

unity updated their terms of service
anything worth noting?
unity3d.com/legal/terms-of-service?utm_campaign=other_global_announcement_2016-07-Global-TOS-update&utm_medium=email&utm_source=Eloqua&elqTrackId=f8b55c2142cf4c6092b4c1a1d3e2098c&elq=8bbc6c6c81eb40c39495043eaf73e5ba&elqaid=1359&elqat=1&elqCampaignId=1848

When you think about it for a second the internet world is beyond fucked up. People make a fortune by consuming someone else's content and then they have the balls to ask for that content for free.

You have a demo right?
Run a competition to see which lets players can get the highest score, dish out free keys to the one that wins; ask them to make a video showing their run.

i dont think thats a good idea unless all of the letsplayers that asked are not that big or very clearly only in it to get free games.

What engine did you use?

Its funny because yesterday I was thinking bout designing and making my own shmup, also with waifubait, you just gave me the confidence to maybe make something of myself sometime, someday. I would like to congratulate you on getting a finished release and I hope you lots of sucess with you game, user!

I think I'll just try filtering which press to give keys based on my judgement, I doubt that higher score means better visibility for my game.


I wrote my own engine for this in Haxe using OpenFL. I recommend using that, or an engine made on top of that, like HaxeFlixel or HaxePunk.

Thanks for the kind words.

Nice to know. Also how did you deal with thickness? The rest of the properties of what you hit are mostly obvious, but thickness seems pretty hairy.

My solution so far has been to simply trace from the other side of the hit starting at an acceptable distance, and seeing where it hits the same mesh.

This weekend is the weekend I finally fucking make time for gamedev.

In the last thread someone said that he didn't have much success with using Substance Painter alone.

If you're here user, read this.

You absolutely need both, Designer and Painter, and use them together. You import your low and high poly model into Designer, bake all the important texture maps (worldspace-normals, tangentspace-normals, position, ambient occlusion, thickness, curvature), import them into Painter and assign them to the appropriate slots. Painter needs this information for the main tools to work to the full extend. It doesn't know where to put dirt on your UV, if it doesn't know where openings/creases are. It doesn't know where to put edge-wear, if it doesn't know where the edges are on your UV.

Not really working on since it's all finished. Replicates perfectly and everything too.

I have a second collision channel that overlaps everything for getting thickness. I do a multi trace by channel from the original hit location + projectile velocity to the original hit location. For each of the overlapped objects, if it's the same one as the object originally hit, it'll get the overlapped location minus the original location to get thickness.

Is there no (out-of-the-box) way in UE4 to replicate events from a client A to all other clients except client A?

I'm trying to create a gun's muzzleflash (and any other cosmetic only thing) clientside, then tell the server to replicate it to everyone else. The problem is I can't find any way to tell the server to replicate the event to everyone except the client that triggered it (and if I don't the clientside event will run, then the server will run it again, so you get two of them).
As much as I search, I can't find anything on the matter, what's more Epic's own shooter example goes client->server->clients, which means their cosmetic stuff is delayed by the latency (heavily noticeable even at 100ms). I did find a way to replicate variables to all but owner (COND_OwnerOnly etc.) but still nothing for events.

While OnRep variables will probably do fine and are mostly a better idea than events as I was told last thread, it feels weird there would be no such system for events since it's so extremely basic and vital, especially that it's not present for C++ either, not just BP.
I could assign a playerID to every controller at start (they already have that, but clients seemingly don't get it and will always have playerID=0, so I'd have to have the server assign and replicate it) and use that to decide who called the event and won't need it replicated, but that will be a waste of bandwidth, as the replication would still happen, it just wouldn't do anything once it hits the client.

I'm mostly surprised Epic's own examples have the cosmetic parts not client-side.


Ah I see, we're doing more or less the same thing then.

The only thing I can think of is more of a hack. When you fire your gun, you basically set a local flag that makes sure that the next server side event to trigger the cosmetics is dropped.

Jesus christ, some people i work with are fucking retarded

Details, user. Details.

Yeah this is basically similar to the player ID in theory, just set some variable on the specific client pawn/controller then use it to determine if it should actually do the cosmetic stuff.

Still, doing that for everything seems like an unnecessary pain, luckily for the moment OnRep with COND_SkipOwner calls will do fine, but I'm still amazed there seemingly isn't an inbuilt solution and Epic's own examples delay the response to your mouseclick by the latency.

Probably. My approach to weapon position is to just take how people actually hold rifles and other weapons, and try to replicate it. My camera setup is not what you would find in most games nowadays. I don't have viewmodel hands, weapons and animations, separate from worldmodels, a la Counter Strike Source/Half-Life/CS:GO/et cetera. There are a few games that do away with this, meaning, that the weapon models and animations of your character are the same as the ones other players see when they look at it. One of those games is Ground Branch.

The first placement pic is what I initially had, when I had to whip up an animation quickly. I recieved some feedback on that one, regarding the weapon's direction. Apparently, it seemed that it was pointing too much to the left. Later on, I polished it some more, I really didn't like what I had there. The fourth pic is what I have right now.

First pic, Holla Forums is eating my images.

Apparently I can't post more than one image per post, since I'm getting error messages.

Third pic.

Fourth and last weapon placement image. Here's the character setup as well.

Weird that the only FPS I know with a "realistic weapon position" is the shitty Jurassic Park game.

Ayy.

I'll pick up a copy you marvelous bastard.

friggin awesome. you're an inspiration to everyone user.

youtu.be/RTWSEo4PL54?t=16s

I think Squad nails the weapon placement. Especially with high FOV, it looks amazing.

Yeah pretty much just On_Rep with COND_OwnerOnly is the only way out of the box.

So, I can work half a day every week doing freelance programming and live modestly. I don't take any gibbs. There's pretty much no motivation for me to do better.

Will it be like this until I die of a heart attack, or will I become obsolete first?

Pretty sure several guys here would like to be in those shoes. Part-time employment tips would be appreciated I'm sure user.

I have a few hard-earned pointers. I use upwork, but they turned into even bigger jews and started taking 20% on all jobs, even the ones they don't provide mediation on. Try something else.

never work with Indians under any circumstances, their culture considers working for peanuts until you drop noble and they'll expect you to do the same. Also, they smell.

if you don't mind working with russians, and you're morally flexible, you can do their programming homework and make like $10-15 an hour. I don't do this, but I'm sure you could build up a good amount of clients and increase the price, or start modifying projects and reselling them instead of writing them from scratch.

there's also a bunch of smaller shit you can do. If you're a native english speaker (fuck off pajeet) there was a job for 2000 one sentence phrases for $80. Took me about 6 hours.

over time I found some good customers over time who didn't try to fuck with me, or threaten my profile ratings to get free work out of me, or try to withhold pay.

Rent will always be the biggest expense, so consider moving in with your girlfriend :^)

PHP/SQL/Javascript is where the work and money is. Today, I'm converting someone's excel formula into a webpage. Uses a bit of PHP to send him an email when someone finishes the quiz, javascript to handle the quiz. Would use SQL if he needed any persistence.

C# is for nodevs; I'm working on someone's game part time for a few shekels, but I enjoy it and it's consistent income.

This is just until I reach my ultimate goal of not being a hungry skeleton. This programming shit is too stressful.

maybe I'll join the police academy

to clarify, NEVER FUCKING WORK WITH INDIANS
EVER

+1

I have been considering going into freelancing and I see this shit everywhere.

thanks user. good advice.

here's a list:
en.wikipedia.org/wiki/Category:Freelance_marketplace_websites

I would imagine so, especially for online contract work. Personally, I make pretty good money in C++, but for me it's always been 'regular' salaried work.

kekd

Thanks again for the good advice user.

This is the most goddamn frustrating issue I've ever run into. I'm generating some tables using javascript, real simple, and the print dialog keeps appearing. There's nothing on google. I can't stop it. But every time I load the page on my local client it tries to print it out.

What the fuck is this

how do I even google for such a stupid bug? Goddamn. I've never heard of a stupid fucking print dialog showing every time I refresh a page filled with basic HTML and javascript.

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Try posting your basic javascript.

I feel like a retard but I still hate dynamically typed languages

eh?

painter bakes all that shit too.
mine does anyway. you just go to the maps tab and import your high resolution mesh (or if you're a lazy faggot and didn't make one just add your original mesh again) and tick all the boxes. bazinga. Maybe it's new in SP2

unreal has always been that way and I think it's by design. how are you supposed to lead your shots when you don't know where they're actually hitting? Source games are infuriating in this regard.

kek

picking up my copy now, m8

You could try helping me with my FOSS engine for you know what

sorry it's right above the maps, a big "bake textures" button

I do software dev as a day job, and holy fuck, I will never work with another Indian again if I can ever help it.

Can confirm
My half-finished engine is beautiful

So how do you guys usually take notes on your ideas and plans for games? Every time I attempt to plan something out that will never get off the ground I feel like I need to go more in-depth on how game mechanics and the like are supposed to work, but I don't know how to properly do it.

It looks nice user, congrats, hope you the best!
Linux when?*

Lots of animations still left to finish

I really, really hate dynamically typed languages like javascript.

The + operator can add numbers or strings together. JS seems to prefer adding strings. So adding three variables, "2", "0", and "5" would you get "205". It ends up giving you a lot of nonsense like this scattered around.

var score = +getFormValue(curEntry.a - 1) +
+getFormValue(curEntry.b - 1) +
+getFormValue(curEntry.c - 1);

The + sign either converts it into a number, or forces it to interpret it as an number.

You could just make them all floats or something. Just 4.0 and all that - it would be hard to get that switched around.

That'd solve one problem, but then I'd be dealing with floats :^)

Turns out javascript's function to round to a certain decimal place doesn't work on some browsers. people told me this shit was to go away

correction, it works differently on some browsers

hmm, yeah. In my own code, I've been using something like this

parseInt(v["lead"])

wherin lead is the variable to get my numbers. I think there's some shorthand for it around here. Just v["lead"] maybe? I certainly wouldn't call myself an expert at Javascript (I've done more work in C# than anything), but you could give it a shot, maybe it'll help.

Thank you, Linux version in about a month probably. I'm waiting for more issues to appear to fix before making a port.

Javscript adds them if they were integers/floating numbers in the first place.

If they didn't then they were strings when you made them.

Streets of Rage, Double Dragon, Cyber Ninjas, or just pick something from the SNES era off that one video game sprites website I can't remember the name of

That's entirely possible, as I haven't used Painter 2 yet. I paused my Live payments till I get more time to actually model. Right now I have lots of programming to do.

Number(myvariable)

Making buildings is very tedious.

Last one had like 6 different texture maps, took me a whole day to model and UV unwrap, then another half day to position the textures.

It would have taken longer if the concept art wasn't orthogonal.

They still look pretty cool

All the professional hard surface modelers I know have their own bag of scripts that help expedite tedious details like doing proper edges. Using professional tools can really help with UVs.

how do I seek in a fast way an element of a list without having to loop for every element?

I need to check the ball collisions with the walls without iterating for every wall in the list.

You don't keep them in a list, because that's exactly their downside.

What do you mean by "seek an element inside a list"?
Do you have a set of objects and want to know, if it's already inside? For example, to make sure the same object can't spawn twice? Then you'd keep the objects in a hashset. Their strength is that you can check whether a given element already exists in the set very fast. They only give you a true/false answer though.

If you actually want to search for the object itself (by means of some sort of key like an ID or name), you want to use a dictionary or map (same thing, different name).

You should learn the individual strengths/weaknesses of the basic data structures (array, dictionary, hashset, arraylist, linked list). It's extremely useful to know these.


For collisions you typically use different data structures entirely (spatial data structures like quadtrees).

I want the solid objects to be not transpassable by the blue ball.

I guess I'll read a book on data structures then.

You should read something on BASIC 2d collision detection? The comparison of the simple data structures is something I'll write up for you and other interested anons. I'll post it here later.

Please do fam.
Are you the guy that wrote up about garbage collectors some days ago?I love your explanations fam

Possibly.

Dictionaries are usually lists of KVPs where key is a hashed value, no? That's how C# seems to work at least

That's one way of doing it. The object oriented way. Very easy to understand and very inefficient.
There are other, faster approaches. When you follow data oriented design for example (which competent AAA developers do), you store all the keys in one array and all the values in another.
The reason for this is something I mentioned in my garbage collection post: CPU caches and not using them efficiently making things really, really slow.

It's not even difficult. I'll highlight this approach in my post.

I think I'm going to start a 'The /agdg/ guide to xxx' series. Whenever I explain something, I'll write in up in LibreOffice then export it so it's easy to repost in case other anons as the same question.

Actually lists in c# are implemented as arrays that resize as needed rather than the node/object model so it's plenty fast

I know.
Arraylists in C# are called List (which is fucking confusing). They did that because they already have an ArrayList class, which sadly isn't generic. In C#: List is a generic version of ArrayList (which you shouldn't use anymore).

Oh, and about that: It's fast on average, because of how the array is "resized" (hint: it's not). But I'll cover all of that.

spriters-resource.com/

it's been a fun morning so far

part organizing code
part breaking it
i might even make some more progress

It defaults to 4 and allocates and copies the elements into a new array of 2M. It's as fast as a flexible array can be and have contiguous allocation without wasting space

And that wasn't even my issue it was quad trees

But it does waste space. If your current capacity is 10k elements, you are full and add one, it creates an array big enough for 20k, thus wasting 9.999 elements worth of space (assuming you don't need them).
You can resize arrays in-place btw. I won't cover this part as it falls under "Carmackian Sorcery" and not under "anything /agdg/ will ever make".

Does this satisfy you? It's meant for real beginners, but I hope you get something out of it.


Here's the first one.

Cool, it reordered my files.

...

Nice writeup, but it's a bit too formal not to mention that HUGE image size.
Why not just do this on some blog, agdg wiki, or something so we can just link there in the OP.

I think I know what I'll do.
I'll make a thread on our board and post them as pdf files.

good idea

Finally, a new Touhou game.

When are you making more fam?

In C#, that sounds like it involves manual memory management. Scary.

First attempt at a menu.
Not the final title of the game for sure.
going to clean it up and fix the fonts and whatnot, but here is the basic rough of what it should look like

I have bad news for you user

user…
store.steampowered.com/app/206440/

Yeah I know. Its not the title like I said.
Just something I thought of to put there to fill up a space temporarily.

im gonna bullshit someone, wait in here for the screencaps

Today I'll make another one. Since I've got many other things to do, I'll limit my output to one per day.


In C# it's flat out impossible to do in the first place.

Resizing them in-place isn't that complicated…in theory. Basically what you need to do is manual manual memory management. Usually manual memory management as in C/C++ means that you control when resources on the heap are allocated and when they're freed. What you need to do now is also control where they go exactly, which is a job your operating system usually does for you.
If you start your application and one of the first things you do is malloc(absurdly high number), you can allocate a block of, for example 4 GB of memory. You know where it begins and you know where it ends. Inside of it, you can do whatever you want.

Basically, rather than allocating memory on the heap as you go, you allocate all the memory you could ever need up front, and then manage the rest by yourself.

what about muh quadtree?

I wanted to cover the basics for that one user. I'd like not to go into spatial datastructures because they require you to know all of this, what trees are, how they work and more.

I REALLY need to get back to work on my game, you know?

What I can do is give you a short run down of why they are so fast for queries like "Give me the nearest neighbors". I can explain the basic principle of them to you, because it's really easy to understand.
If you want to know how to actually implement them, you'd have to google.

Writing your own memory allocator isn't THAT hard. I've never read it but I think it is one of the last exercises from K&R.
You can also easily resize an array in place if you allocate it on the stack manually, that's how variable length arrays are allowed in C11, but since the stack memory is very limited you may get a stack overflow, at which point you may have to ask for more stack. It also obviously grows downward in most architectures.

Also the operating system can use paging to extend an array limitless. It just does page sized (or more) allocations and every time you need more space it maps another page continuous to the previous one. Hell you can even swap unused pages of the array to the disk and it will still work. Or even initialize a 4000TiB array but only define like three pages, and as long as you use only those it will occupy three pages of physical space, plus the page tables. That's the magic of virtual memory: en.wikipedia.org/wiki/Virtual_memory

Also nice work here user.

Making textures, trying to figure out an art style

haha
you fell, noob

Like I said, it's not *that* complicated in theory. When making a game, you're applying those things at scale however. Games tend to be rather complicated after all. It adds a whole lot of extra work that's not something /agdg/ needs to worry about.

I have a question about the use of paging to extend an array for you though.
Is that really a growing array, or is it a linked list of arrays, abstracted away so it looks like an array for the programmer? The point being that it's not how the code looks, but the actual, physical representation of the data that defines the performance characteristics of your data structure.
Think about the most extreme example of this. For some (dumb) reason the page size equals the size of one element and the OS maps every element to a different physical location (very contrived example, I know). The programmer might be accessing the data using an array syntax and, to him, it will work just like an array would normally. However, it will perform and behave exactly like a linked list. If someone were to look at the memory, it would even look exactly like one.

To me "resizing an array in-place" doesn't mean being able to keep adding elements to the array in my code, it means a a growing array in memory, with its physical layout (one solid block of memory) intact.

...

It's okay user, I'm in serious shit too. I gotta make an entire HTN planner in c++ and then get it working in UE4.

Every time I have to add a significant new feature I spend two weeks obsessing about the cleanest way to program it, implement it wrong, and spend even more time on gradually axing and debugging everything that doesn't work.

OK user, what the name of your game?

OUT

haha
you fell again, noob

vocaroo.com/i/s0n9mnYH7RVa

Im just starting on making music. just recently made this but it feels like somethings missing.

kek
can't even beat his own game

They look like some kind of computer chips.

You need to git gud.

This appears to be over complicated, and way specialized for something like massive particle simulations in a statically sized space.
I've never coded one so I'd rather not comment further.

The octree is pretty easy once understand the main reason it works (even subdivision of your nodes using "splitting" rules, i.e. rules for if you subdivide into 8 children), and how you can dynamically subdivide or collapse the tree after initial building.
As the rest of the features of the octree are just icing on the cake, and understanding of those concepts are essentially inherited once you understand the above processes.

It's also quite easily specialized into your own variations quite easily.
There's also A LOT of variations to the applications, and design implementations due to the widespread use of octrees across game dev.
F.e. I implemented a specialized octree (or an N^3 tree) on the GPU using a 3D texture for surface construction (mixed a few approaches into my own specialized version, as only certain properties of the octree are needed).

Even a bit of progress over months is progress.

Can someone tell me the proper structure of a design document? one thing is having ideas for mechanics and all, but I heard a design document is very important for development.

Check out the book by Paul Schuytema, is the only reference I know.

How would you guys handle projectile replication on non-owning (everyone but the guy who fired the gun) clients? The way I see it, there are two ways:


First one is lighter on the network and probably will look smoother unless prediction is added, second one ensures it's the "real deal" and clients won't see a bullet hit a target when it actually didn't.

Figured I should post the answer to this if anyone else is interested:

Turns out in C++ there is a variable on all actors called Role (it also turns out it's in the basic documentation, but I must not be the only one to have missed it as I've seen others ask this question and not get this answer). The short of it is there are 3 main roles: ROLE_Authority (listen/dedi server), ROLE_AutonomousProxy (locally controlled, client 2's pawn is this for client 2), and ROLE_SimulatedProxy (all the other clients, client 2's pawn is this for client 1, 3, 4, n, and the server).
With this you can quite easily filter out stuff, like not running a multicast function on the owner of the actor it is called on and allowing you to run a similar cosmetic function purely clientside on the owner (e.g. not running the multicast muzzle flash function on the owner of the gun and running it clientside instead, so the owner sees the muzzleflash immediately and when the multicast from the server hits, it is skipped so the owner won't see it twice).

Here's the official GDD of the cancelled Saint's Row PSP game. I structured mine using this as a template.

Thanks, I'll check it.

With the understanding that I've never once coded a multiplayer game over a network…

It seems to me that the smoothest way would be to inform the network whenever a bullet is fired, then having the network inform each client, and having each client handle the projectile physics. Then, whenever a player is hit, have that client inform the network which then informs all other clients?

That just seems like the way that requires the least back and forth between network and clients.

Here you go guys: >>>/agdg/27222

For me gamedev has been 20% implementing shit that is actually interesting, 80% implementing shit that is a gigantic pain in the ass that has no obvious effect but makes it easier in the long run.


Did this so much. When I first wrote my GUI I had to move it around like 2-3x because I couldn't figure out how to not have it too dependent on the graphics engine for output or the game engine for input. Now I am starting over from scratch (basically due to what you where talking about), and ported the GUI over and now it's fairly independent.


I was considering R*tree for terrain data because I'm using maps that are a quarter mile in diameter and thought it might make collision detection with the ground faster, although typically terrain data is fairly gridlike so an Octree might be good enough. I still would have to do R*Tree for path finding I feel though. I have no clue what I should use for dynamic objects though. Probably a sphere tree.

Paging doesn't work like a linked list. They are hierarchy tables with a constant amount of levels. They basically split the address in little chunks, for example in x86 32 bit paging 10|10|12, they use the first 10 bits as an index of a table to get the second table, and the other 10 bits as an index to the second table to get the page frame, then the later 12 bits are just the offset inside that page. That takes constant time, in comparison to a list which takes linear time. They are more like tries, but since they have bounded depth, it is constant access.
If you had smaller chunks there would be more table levels (or bigger tables), but it would be still constant time. Arrays have constant access thanks to RAM, virtual memory maintains that constant access allowing you to shuffle parts of memory using tables.
You could argue that a list has constant time access since it's length is bounded by the amount of memory you have, but these tables are bounded by any amount of memory up to 48 bits currently, so it is 5 access always (9-9-9-9-12 in 64 bits).
What I'm trying to say is, you can't just say paging makes for a different underlying structure, because in the end arrays are allowed to have constant access time thanks to RAM, they are basically a hardware hack. It's a "Two can play this game" kind of thing.
Even then, whenever you make a big malloc, you DON'T KNOW if that memory is continuous, virtual memory might make it seem like so, but it is very likely to have fragmentation. More so if you have swapping enabled, since the OS will swap pages to disk that are not being used, and you will end up with a mess of memory. The OS doesn't give a fuck about what malloc does basically, or anything userspace for that matter, it will shuffle physical memory conveniently.

Top post. Thanks.

I need to do an AABB tree. I forgot they existed.

Is there a list of games made from /agdg/? I feel like taking a look so I can see if any is worth a buy. I'm probably not going to buy just yet, but more down the line when I got the money.

Going from 27,000 triangles to 5,000 triangles thanks to some workarounds I suggested to my client, I know it doesn't look like much but this is certainly something I didn't know I was capable of.

I hope he stumbles upon this picture.

Looks really good. Personally I strive to be fairly low poly. I guess it's because I find low poly but realistic models to be more elegant.

I've been noticing a lot of models are fucking huge. I make mine fit well within the grid. Probably a bad habit I inherited from hammer and SL. I guess it would be better to make them huge then scale them down since you're less likely to get bugs from float inaccuracies.

Okay, so what's this game about anyway? Do you just play as a peg or are you going to be a marble or something that rolls around?

Anyone have any idea how to fix this problem? When I try to simulate ragdoll in the physics asset, the bones jump to a point really far away from their parent bones.

The only thing I found online was answers.unrealengine.com/questions/384201/physic-asset-creating-bone-moves-far-away.html but the proposed solution did nothing.

Is the scale factor correct while exporting?

Never do important physics on the client or it'll be desynced between machines.


My system has the bullets spawned only on the server side, every client just has the projectile graphics simulated on each client, and then when the server bullet hits something, it'll do impact effects and decals for everyone where it hit. I haven't done extensive testing but there aren't any issues so far.

That's only true if you want to keep things in the order they were in.

For example, in my particle system, it's common to kill a particle at position N, then grab the particle at Size-1 and copy it to N, then decrement the size.

How would I check that? In blender everything looks right and when I export scale is set to 1.

Maybe there are some advanced setting, in Maya there is custom scale and then there is this thing called Scale Factor which basically scales everything as "1:1" according to its scale inside the program.

Imgur had something useful today

You making good progress on your video games?

...

Not even slightly

I was until I had to figure out how I'm going to manage data in 3d space. Now I've been constantly researching trees. Finding the tree I need (R*) is a fucking nightmare, and am bouncing back and forth between "I should just do a octree" and "I'll end up needing an R*-tree eventually anyways"

Just use an array

I would have like 1 fps.

Nope. Just stuck in a rut and frustrated.

im at a roadblock right now
im trying to make my collision code work, but to no avail

i followed a tutorial pretty closely, but i cant remove the enemy from the ipairs

collision does work however, because when the enemy hits the player it triggers a bool value

for the once i get the collision working fully i have a great idea for how to make levels and everything

guess ill go bang my head against the wall a bit longer and see if i cant fix it

No idea how to Lua, sorry

Had a fun idea for a card game, that's something between Warmachine/Hordes, Yugioh, and Magic.

I used a shitty template I found on Google, but I'm not sure if I've got a good use of space/layout or not

Not my thumbnail obviously.

Sometimes I also wanted to make a card game template, even if it was for animu stuff and the like, if anything you should think about how many types of cards your system would have, for example in YGO.


MTG unlike YGO has unlimited "slots" for all permanents on the field, but if you ask me, the most important thing that also fucked up YGO was the need of a mana system.

To get rid of lands I thought of an idea, all cards would have an upside down symbol on the bottom, creatures would have element symbols which amount to 1 of said element while spells/traps/whatever else would have non-elemental numbers from 1 to 9, the rest is of course easy to imagine, except maybe for the field itself.

I have a lot of rules sketched out, but nothing completely finalized.

The gist of it is that you need to accumulate Victory Points to win, and most creatures you control add anywhere between 0-3 per turn. A typical game needs about 100-150 to win. It's played on a 7x7 field and cards may be played face up or face down, and either in attack or defense position (giving +2 to hit/dmg or +2 dodge/dmg reduction). Only face-up cards generate victory points. You can only play a card on your closest row (the Command Line) or adjacent to your leader (which modifies the VP you need to win and a few other things)

The key element is that you have a maximum of 7 (5?) cards out at a time and can only take 3 actions per turn, whether its setting a card, changing its orientation, moving them, or attacking them.

7x7 for two players or 7x7 per player? isn't it a bit too much for player space anyway? that's 49 slots total.

One move action would let you move the card a number of spaces equal to its MOV stat, usually 2 or 3. Plus, there might be other effects that generate tokens and the like, and a bigger field might allow for terrain effects

I would reduce it to 7x3 per player maybe, a combined field would cause some issues, assuming the game had a physical format (as one could try to emulate) it would mean cards from both players could end up mixed up.

I wanted the cards to have a physical presence on the field so you could strategically play some to block movement to your weaker cards

Like I physically playtested it with playing cards and some other shit on 5x5 and it felt too small, it was basically a rush from one player to the other, and then they just kind of sat there until one of them attritioned the other to death, and I think this would be preventable if it was larger, giving the defender more time to set up.

if youve done your unit setup correctly you should be able to create it at the scale you need for export without having any trouble.

I'm procedurally generating land around the player. Real simple, just unity terrain based on perlin noise. I'm having trouble figuring out a decent way to decide when to spawn and remove tiles.

Anyone got an idea?

The alternative would also be to have two rows, maybe 9x2 per player but have the ability to place your cards in any row, that means your boss or master could be either front or back and certain cards could do certain stuff next to one another depending on their position.

I'll have to figure out how important movement is. Although doing a _x3 setup might work, could have a front/middle/back row with different attack ranges. Maybe.

you could put a value on every card edge, that would still work for 2 rows.

I gave up at the first roadblock and picked up yet another book which I just know that I'll read the first 2-3 chapters then drop it forever.
Fuck me

I posted yesterday without any explanation because I finally managed to unfuck basic movement after porting it to a new animation engine, and will probably implement more planned movement options next to see how they feel.

Finally finished solving and implementing how to handle the back faces of cliffs with depth buffering and all that garbage.

There's a minor glitch with the darkness of the shadow, but that has to do with other stuff.

Looking good.

Super nit-picky, but it feels a little weird to have the grass sway(i spotted some interaction when you move through it, which is an excellent touch), but the trees don't move at all.

I just observed a lot of models tend to be gigantic compared to the grid, and was trying to guess if there was a practical reason.

someone help me out with some unity bullshit
i've got a scriptableobject class that works as the base for my node class
then i've got other classes that inherit from the node class
now when i'm working with objects of those types, i want to be able to convert them from one another
how do i do that?
let's say i have the object b, which is a class that inherits from the base class
and i just made an object a, that's the base class
how do i convert a to b's class, without knowing exactly what class b is, just that it inherits from the base class
when i'm doing this in unity, i'm getting the error that i'm missing an explicit cast. i tried doing (type) CreateInstance(type) but then it tells me that i'm using "type" as a variable and not a Type
System.Type type = b.nodes[i].GetType(); Node temp = CreateInstance(type); a.nodes.Add(temp);

oh boy, a whole nother thread of shitty unfinished games!
how is this different from greenlight, again?

well it wouldn't be a very long thread if we were actually posting finished games

We actually do development here.

oh nevermind, i was supposed to cast it to the base class
System.Type type = b.nodes[i].GetType(); Node temp = CreateInstance(type) as Node;

homph.com/steam/

As for Hatechan devs, there's Hypnorain and One Thousand Lies (a VN)

Early particles…

Help, it burns!

needs multiple colours

You're right, but I'm not going to keep this, just a particle emitter test

why are they rectangles and not actually particles

Particles are just quads, in this case it's a solid orange texture. Here's one with a texture from an image file.

You work fast

Well so far I have everyone spawn the bullet, but the client's bullet is really only cosmetic, it will spawn a hit effect wherever it hits but the server one is the one dealing damage and actually doing things.

I don't use physics for the projectile anyway, I trace over each frame based on speed, gravity, etc. which should be almost the same on both client and server. Only issue I have is if I implement ricochets and such in the future, any random values will throw it all off.

That works fine then. Different to how I do it, and it'd be interesting to see both side by side at different latencies. Anything with physics will be different on each client if it's replicated, so it's best not to do that for anything important.

Thanks. I added an option to make particles axis-aligned (billboards), and I think that's it for the particle system…

That's not removing an element. Particle systems aren't the general case, but a very special one. When dealing with a string of characters for example, you want "user" to become "Aon", if you remove the second element, not "AAn".

When I say "remove" I mean remove. Imagine a wordlist. Yeah, the word might be gone, you have the previous one twice now. What about a set of numbers or, even better, a set of booleans? You can't even null them or have a specific value defined as "deleted".

Mine:

Yours:

That should be the only real differences, as far as I understood it the only real differences is how we handle the impact effects (we both spawn a cosmetic version of the bullet on the clients). Just depends on what you prefer really, quite sure AAA games have done both types.

personally i would go with the second one
the game showing bloodspray when you miss can be quite frustrating
plus it would allow you to notice when and how much latency you have and allow you to correct for it

Yeah it comes down to preference more than anything. I personally prefer the latter so that's what I'm going for.

Wrong, user descibed a perfectly valid form of removal for unordered sets, and did specify that he was talking about unordered sets.
Shit reading comprehension detected. The method that user described would result in turning ABCD into ADC if you remove the second element. Like he said. Unordered.
Ordered lists aren't "the general case" either. Lists are generic.

He actually didn't he just said something about particle effects
And why he would reply to a post about basic data structures with something vague about his specialized particle system data structure i don't know
but was talking about arrays
and that is how arrays work

Look at the following line, from that guy's post.
If you don't need to keep things in the same order, that's called an unordered set. Arrays do not have to be ordered.

Well, fuck.
I'll update this when I post Linked Lists today.

Dust clouds

Is this a terrible idea? Maybe I should wait until the end and free it all at once?

No, you should free them as soon as you're done with them.

If you want to free them all at once, then you'll have to create something to store your list of executed events, which in turn will incur more allocations. You're just wasting processing power and memory if you do it that way.

I should have probably specified between ordered/unordered
But you're right, particles are kind of specialized, but removing an element is pretty trivial if you don't care about the order.

It was my mistake. Probably because I was stuck in a specific way of thinking due to your particle system experiment. Even the retarded algorithm that was the result of me misunderstanding you, would have worked. With particle systems it doesn't matter if you just create a duplicate of another one.

In unrelated news. The next chapter (LinkedList) is about to be uploaded. It's rather short because they're so simple. I added an additional page about accelerating random access (if you're forced to use them, but still need it) by using an array to quickly index certain elements.

i'm trying to rework my Node Editor systems in unity, except that this time i'm actually using class inheritance and virtual/override functions
started out fast and now i suddenly realize how annoyingly complicated this is supposed to become
like, trying to do simple math stuff in here, and now i need to start checking if i'm connecting the correct type of nodes
i'll probably abandon things again in a few days since i won't have time
so far the only improvements over the old system is that i have a right-mouse button menu for creating different nodes, resizing the window won't fuck up everything, no single class with over 60 different variables

boxing user?

yes

There's quite a few ways to do this.
The basic method is a chunk loader using the player position as the center, w/neighbor checking per chunk.
First, you grab/load the chunk closest to the player (i.e. to get position -> round to the statically spaced grid position), and then you check if it's four neighbor chunks aren't loaded yet (i.e. consistent spacing between chunks so u have a simple method to check if a chunk is at that position for the direction… so check for chunks at north, south, east, west) and load them if they're not already loaded.
Next, for each chunk loaded check if it's neighbor chunks are loaded or not, rinse repeat.
During the neighbor checks to determine if they are/aren't loaded yet, do a preventative step as to avoid loading unnecessary chunks… i.e. a distance check from neighbor chunk you're checking, and the player (abs it for always positive), and only load chunks below your load distance.

You also probably want to have a queue or a stack for only loading a certain amount of chunks per tick, as to not go over the 16.6ms budget, and you may want to use simplex noise instead as it's faster than perlin noise (just don't use 3D simplex, as it's patented, and the unity terrain can't properly use 3D noise anyways as it's a heightmap).

If you want a dynamic, and fast method plus you want to avoid the eventual issues that pop up with the above system; go with a spacial data structure, like a quad tree.
It makes things like LoD (Level of Detail), culling, and occlusion culling of terrain a whole lot easier.
However, this whole data structure in itself is a bit of a pain to fully grasp, but once you do get it, it can be highly specialized for your needs.
Such as dynamically moving with the player, culling the chunks the player can't see/occluded by other chunks, and internal logic for each "quad" (cell in the quadtree your chunks will be contained within) depending upon the LoD, and potentially handling in addition to the above generating the colliders (use the heightmap colliders of the unity terrain, it's faster than the normal mesh colliders).

Question

Suppose each chunk is a 16x16 grid of tiles (so that they are indexable by a byte or whatever). I've always had issues with checking things via crossover from one chunk to another (eg with lightmaps or terrain tessellation) … is it common to rebuild a new grid out of currently loaded chunks, or does that create too much overhead when things change often?

Does anybody have any clue how do cloth physics work?
Is it really complicated to make something look like cloth in UE4?

I'm using modo and blender

In a turn based combat game, how would you implement critical hits and dodging without resorting to RNG.

My first thought for crits would be a legend of the dragoon series of timing based button prompts or the dodging in paper mario but it strikes me as too much like a quick-time event and also flies in the face of being turn based.

It sounds like you're talking about this in reference to something other than procedural generation; which is essentially the only area in game dev I'm extremely confident in.

Could you be more specific? As it's a bit to vague atm…

NOTE: Just got off work, and am exhausted so that's probably dumbing down my reading comprehension.

nVidia PhysX maybe, but I use Maya, also, I think there is no plugin for Blender.

I don't have an answer, I'm just here because I like hips.

Path of Exile has RNG with an "entropy" system (as they call it)

Suppose you have a 30% chance to crit (or >0.70 on a roll). When you make your first attack against a monster, a value is generated. Let's say you rolled only 0.18 - you didn't crit. However, your next roll now has a +0.30 to crit.

Your second roll came up as 0.34+0.30, or 0.64. You still didn't crit. Your third attack has a bonus of +0.60 to crit.

The way it works is that your 30% chance really is a 1-in-3 guarntee of a crit

In FF8 you had a 1 second window where you could press R1 to do additional damage with squall. I don't even remember if it was mentioned or explained at all in the game.
Worked well for that imho.


Should I just torrent maya? I know a lot of Modo and Blender, but I guess it wouldn't be terrible to start over if a program offers me more than the others.

In my case, I'm using a light source and a flood fill algorithm to determine the light levels of nearby tiles. It becomes tricky near seams. That's all

There was a game that gave critical hits a meter system. So you'd fight, build up a critical hit and use it when you needed it. You could also upgrade a stat so you could store more critical hits.
As for a dodging system I'd make it so that you can dodge the attack as long as anticipate what element it is. IE: You select "dodge fire" enemy casts fire, you've dodged it taking either no damage or severely less than if you merely guarding. To stop abuse, make dodging consume units from your SP pool

You could make it a reward system instead - if they called the attack successfully, they build up towards a crit. Players like feeling rewards instead of paying a price.

oic, makes more sense now


This can be solved with a proper data structure, or indexing of tiles.
You could use Z-ordering for the tiles, i.e. maintain 3D or 2D ordering but converted to a 1D linear array.
Which would allow for extremely easy accessing of neighboring tiles/chunks/etc.
If you want overkill, then a quadtree would work, but it doesn't seem entirely necessary here.

If you can use the already supplied data, and prevent additional allocations of memory/redundant steps then you should do your best to avoid rebuilding.

As the problem in itself is a spatial one.

I torrented it, but for the purpose of using UE I recommend using Maya 2014 since 2016 doesn't support some plugins which include UE Maya Auto Rigging Tools and the like.

That's what I meant by 16x16 tile chunks, it'd be a linear array. So if I had Chunk1[N], how does it "know" to check against Chunk2[N-1]?
Would the chunks themselves be better represented as a container for the array, plus a position?

Part of a balanced diet.


So long as it is adequately explained in game it might do while still clamping down on it.


As I said, it's essentially a quick time event within the confines of a turn based system.


I like this idea a lot and gives the player another resource to manage that won't bite them in the ass through no fault of their own. Also opens up possibilities to moniter enemy crit power.

Dodging in that fashion might work, perhaps link the effectiveness of a declared dodge to the number of attacks received. This way a faster dodgy archetype would be able to avoid more attacks when set to dodge.

Thanks for your input.

are niggers made of jelly?

If you want to use no RNG whatsoever, the only option is to give the player the control.
For a turn based game, this would mean implementing a mini-game for example. For games that have guns like XCOM it's easy: You let the player shoot.
>compensate for sway, possibly gravity and wind (

Pretty much, for example, Final Fantasy 8 had Squall's weapon do criticals at will at the press of a button depending on the timing.

no, but i haven't bothered to change any of the default settings
aside from the fact that the spine and head react harder when they collide with hands

God damn I'm a faggot

That sounds an awful lot like QTE.

But critical hits really are RNG. If you can control them by skill then why would you bother with them at all?

Well, aren't headshots basically critical hits?

Maybe I misunderstood I read critical hits and turn based and thought rpg. But I guess headshots, backstabs etc are critical hits too.

personally I don't mind the idea of "timed hits" in a turn-based RPG, and it's not really a QTE in my mind if it fits certain factors.

For example, QTEs are usually frowned upon because they detract from the action in a cutscene, because they do not add depth to the game, and because they are arbitrary in their sequence just to make the player pay attention.

But "timed hits" are usually very consistent with showing the player when they come up, and they need to be precise (think the active reload system in Gears of War, which was satisfying). Also going for a timed hit is a risk/reward system, because if you fail a timed hit, perhaps the player receives some penalty, like reduced damage. This adds interest to the admittedly bland turn-based formula.

but those are my thoughts as a player, of course if you don't like them you dont like them

There was no button prompt, you were just told that on the tutorials, besides, other RPGs do it and is quite better than stuff like auto battles like Final Fantasy 13 for example, not to mention you could add different timings for different critical levels, apply that to defense as well.

Non-serious suggestion: if a creature's HP contains the number 4, you crit if you hit it (no HP counts over 99, add more defense to later enemies instead). Hell, you could make different numbers important in more cases. Add some numberology-bullshit plot over it and you have half a game idea.

Use a world position for chunks (explained below), which is the new rounded grid position (for CHUNKS), and then use edge cases (x or y == 7 or 0) per the direction you need to check for edge tiles (simple bit mask XOR operation to get the correct key, per the case, to get the correct morton key).

Humm, that could work.
Like a dictionary with the world position of the chunk as the key, and the value being the array of tiles for the chunk (local position, so 0-7)
The only issue would then be determining which tile to check against in the neighboring chunks array of tiles (as finding the neighbor chunk is easy).
Which could possibly be solved by edge cases (quick switch case), and just using a bitmask to set the necessary bits to match per the direction you're checking… in the z-order index code.

I don't see where the Z-ordering is coming from, though.

Drawing them in an arbitrary order is fine, but figuring out which ones is the troubling spot for me

ok, so figuring out which one will be arbitrary too; PER CASE.

that's where z order comes in, it makes ordering static, and retains 2D ordering in a 1D array. hence making finding the correct tile a matter of a few switch cases when transitioning from chunk -> chunk

I need to eat and do stuff now, be back later thou

Well for example, if the player is at [50,50] and the can see 7 tiles in each axis (for a total of 13x13) and they're in the corner between 4 chunks, how do you handle this?

Here's an example. If the red dot was to be a light source for example, how would I best determine that the node at the seam in the top right chunk should check left, and then move into the top left chunk? This is why I mentioned rebuilding, since having nodes jump back and forth across regions seems quite intensive.

OOBs = out of bounds
Morton key, mKey = synonym for Z-order index

Say you're on that [50,50] tile within the upper right chunk, and you want to cast light in the direction of -X, i.e. one tile over [49,50], which ends up in the upper right chunk.
A midstep in this process is to check if you're OOBs of the original chunk (the chunk the [50,50] tile is in), if it is… then find the new chunk.
You can do this via a method to get the world position rounded to a statically spaced grid position, i.e. evenly spaced chunks so you have something to round by.
Chunk0's MIN is at [0,0], its MAX is at [7,7]
Chunk1, to the right of Chunk0, MIN is at [8,0], its MAX is [15,7]
ETC.
Now you know which chunk the light is being cast into, and is the system I'm working from in my head.

Next, is to find the matching tile.
To do this using the z-order indices, you would either need to OR in an axis, or XOR out an axis depending upon the specific case; i.e. adjusting the morton key, per the EDGE CASE.

So, returning back to your example picture.
The local coordinates of the bright red tile, within the upper right chunk, is at [0,0]
In otherwords, within the CHUNK's local space, the left bottom corner of the CHUNK is the TILE origin for the x/y axis.
The new coordinate for the tile in the neighbor chunk (upper left) would be: [7,0] for this specific case (i.e. minus on the x axis where x is [0] in the original LOCAL coordinate case, when the previous check to determine if OOBs of origin chunk returned TRUE).

Going from [0] on the X-axis, and subtracting on the X-axis, ALWAYS equates to the maximum for the adjacent chunk, hence [7] on the x-axis.
This is, if your chunks go from [0 -> 7] and [7] is the maximum.

So… morton keys:
Structure: yx … yx yx yx
2D Index: [7,0]
X axis: 111 … Y axis: 000
Converted to morton key: 01 01 01
Morton key 1D: 21, 2D index: [7,0]
Summary: converted from 2D index to 1D index, and via z-order retaining spatial ordering.
For the primitive edge case of going from [0,0], and subtracting on x axis, and hence getting the maximum of the adjacent chunk's X axis:
[0,0] mKey = 0 //(00 00 00 00)
xMaxMASK = 0x15; //01 01 01
Get the maximum:
mKey |= xMaxMASK; //result: 01 01 01

This also works the same for if the y is 1,2,3,etc.

Similar cases would be used for transitioning down on the y axis (to the the bottom right chunk… the tile LOCAL coordinate would be [0,7], since you're subtracting on the Y axis, and the origin coordinate Y is [0]).
Also same type of case logic for if X/Y is the MAX.

OOBs checks, and then if OOBs returns TRUE, you have edge cases.

fug

When discussing data structures arrays are always ordered

Those sprites are 10/10


nigga what the fuck


That's pretty cute


But how's the butt?


Beautiful. Like that other user said, would be neat if the trees slightly swayed

okay agdg, here's what I've been working on. I've got to refactor some code so that I can put in some extra gameplay, but the base game is there.

what do you think?

filedropper.com/3d-stripped

In the works, I am reducing a lot more and I am going to smooth the model, it will end up being like 6k anyway.

In DoTA 2, some skills proc based on a chance that is pseudo-rng or true-rng. Like you said, PRNG increases the probability of the spell proc'ing each time it fails to proc and it ends up proc'ing as much as advertised.

so thanks to the help of one beautiful person i got my collision code to work, and now im coding levels as timing based spawn scripts

recoded my timer twice, this time its doing second long count downs and adding one to my seconds var to count out in whole numbers(gif related is the same problem with the previous timer function)
i need to find out how to spawn a single instance of an enemy, but that probably means i cant use my timing based script, so maybe ill have to take another approach. sad but ill make it
nighty
currently having the s

In theory but that's far from the truth.

She should get 1 crit every 6-7 hits, but it's more like 1 crit every 3 hits

working on castle walls that can be deformed or destroyed by attacks. Trying to figure out the best way to minimize how many triangles they use.

What's your issue with a mini-QTE for determining crits? There have been plenty of JRPGs that had a similar system, many of them quite well-received for having a system that wasn't just "choose attack option and then wait for animation to finish."

Super Mario RPG, Legend of Dragoon, Final Fantasy VIII, etc.

Reminds me of doom

...

i got my bool working
==,>,< should be next but i'm thinking i'm gonna have to make some kind of search menu for the nodes, since there's already 9 different nodes on a single menu and it's gonna end up being too much to fit into the window in no time

well i got the search menu working
but for whatever reason, string.Contains(string) is case sensitive, and i can't figure out how to get it to be unsensitive
i guess it works though

transform both strings into lowercase before the call

yup, i'm dumb, that worked

So is that supposed to be a Indiana Jones type of game?

k, got GreaterThan and Less than working
EqualTo also works, currently only supports Float and Bool nodes. if you try to connect a different type than the first connection you get an error

"If" node also works

Any idea if the code they use to create the "Noodle Graph" UI is open source user? I'm interested in making something similar to it.

you mean unity devs?
it's out there but it's not really in the official documentation much. you're usually just gonna find a few forum posts about node editors
like this forum.unity3d.com/threads/creating-a-node-based-editor.91422/
i can just give you what i have so far, but be warned that nothing is commented/documented yet
drive.google.com/open?id=0B1laio2k4Hufd0FJMmFHZ1M1Njg

actually this is a better example, there's more complete stuff in here
forum.unity3d.com/threads/simple-node-editor.189230/

hold on, here's an updated version of my node editor
i forgot to make all the float/bool nodes have a recursive function to get their results
so now it's actually usable
drive.google.com/open?id=0B1laio2k4HufYVVleHF3TFFCSlE

You might consider adding some background noise effects and also maybe some bass tones into the chord hits or possibly even the melody. I like it tho even without that stuff if you want to just make it fuller sounding.

fuck it, made a github for this, don't want to spam here too much
even though i'll probably abandon it in a few days
github.com/doctard/Unity-Node-Editor

I asked in /agdg/ but it's a dead board.
I want to start programming games on my spare time, but my knowledge of programming is very limited because of real life obligations taking most of my time.
I figured starting out by cloning simplistic games like snake is a good idea to get a grasp of what i want.
I have some understanding of programming from high school (nothing that can display graphics on screen though), but i want to start from absolute scratch to be on the safe side.
What are some good sources for learning programming from zero?
I'm talking about videos of lectures, reading material, stuff like that.

from my basic understanding, there are 2 bits to programming:

So what you want to do is spend a month or two (assuming it's like weekends, or an hour or two here and there) learning basic C. along the way you will learn the importance of types and memory usage, compiling from the command line, how the heap + stack work, how to be efficient, how pointers work, how to be modular, etc. Aim for something like pic related, which I go back to every now and then and try whatever interests me.

Once you've grasped how to make shit work, you then get yourself a library (SDL is what I used for pic related #2), look up some tutorials and the documentation (as you get better, more of the latter than the former) to understand how the pieces fit together, and begin using these extra tools to build your systems (using input, setting up vectors, collision detection, game loop, rendering what you want, rudimentary AI), and then you just try a project you think you might be able to do (pong -> breakout worked for me, and snake's not a bad idea either) and apply yourself.

If you're looking for actual resources, startpage & stack overflow work best. Good luck

When describing arrays, I find it much easier to visualize the index as being between elements, rather than "over" the elements.

thanks for all the effort user. didn't mean to put you to all the trouble haha.

cloning now..

Is there a reason to start with c instead of c++?

imo, it kind of boils down to performance and cache-line efficiency. almost no one does it right (at least beginners heh). but it's probably simpler to get it right using C, than relying on OOP in C++.

However, it can easily be done correctly in C++, and all the other benefits can be had as well. Here's how:
gameprogrammingpatterns.com/data-locality.html

Most developers don't take the time to learn the basics of modern hardware and so never really gain the benefits of modern software design approaches.

anyone got a clue why this isn't working
it keeps telling me that par is null, while parent isn't
public override float GetResult() { //parent is ScriptTemplate //par is AIScript. AIScript inherits from ScriptTemplate AIScript par = parent as AIScript; Debug.LogError(parent == null);//returns false Debug.LogError(par == null);//returns true if (par.reader != null) return Vector3.Distance(par.reader.controls.mainBody.position, par.reader.enemy.mainBody.position); else return 0; }
i did the same thing with my different nodes that each inherited from the Node class and it worked, no clue why this is different

oh wait, i forgot to override the function that creates the parent
parent was just a ScriptTemplate and not an AIScript

I see.
What's a good resource for learning? Something like Coursera or a specific book?
Also, what's a good platform to start with?

Here's a question that's not really related to vidya development
Is it possible to change graphics settings for a unity game from inside a file if the game's only options are "Settings: Fast/Beautiful"? Like a config.ini file or does unity not allow that?

Failed casting operation
A normal explicit cast like (int)myVar will fail on compile time if there's no implicit conversion and at execution time if there is an implicit conversion, raising an exception

In the case of "as", it returns null instead of am exception
Tldr check your object types you fucked up

Just about everything you lean in C will carry over to C++. It can't be a waste of time.
Plain C is a whole lot simpler than C++ (to be honest: most languages are a whole lot simpler than C++).
If you've never programmed before, C is an excellent language to get started due to its simplicity. People will usually go on about how memory management and all those low level shit is difficult, but here's the thing: You don't need to touch any of it. You can just use C to get used to thinking like a programmer and learn the basics:


Learning what?
C? Google "The C Programming Language - Second Edition" It is »the« C book. Use that an maybe online tutorials/lessons to git gud.
It really depends on what you already know and how good you are. If you want to make your own game from scratch on top of your own engine (good god, use C++), then you need a whole lot more than just knowing how to program. Well, at least if you want it to be good.


I programmed something for this before switching to Unreal.
gitgud.io/TheSniperFan/OpenGameConfig
Sadly I was retarded and deleted the BitBucket repository before copying the wiki over to gitgud. Luckily I still have the files so I can upload them.

well the AI script reader works
we start from the third node (the If)
it backtraces to find the result of the bool, after which proceeds to either walk towards the enemy, or stop walking and attack the enemy
however
all my node classes use UnityEditor, since they have minor stuff that needs to be shown in the editor, like values n shit
but if i do this, these scripts have to be in the Editor folder
and anything that wants to references objects of these types also has to be in the editor folder
and classes that are in the editor folder can't be used outside of the editor, meaning that i can't have my AIReader class on my boxer, since it would have to be in the editor folder
all my neat organization is ruined because unity is raping me in the ass again
now if i want to fix this, i'd have to take all the Editor related functions in my node and put them in one giant editor script, which is exactly what i didn't want to do

yeah, as it turns out, when i'm creating the "parent" i made it a ScriptTemplate, rather than it's inherited class, since i forgot to override one function.

only if the game is coded to support it
i usually make a settings.txt and write/read all the info into it, but if the guy making the game hasn't done that you're fucked

ah nevermind, i just have to put
#if UNITY_EDITOR//code goes here#endif
everywhere i need to use something related to the editor

Note though that a lot of C++ features were motivated by things that were awkward to do in C, so a lot of stuff that makes sense in C are pointless in C++ (or worse, since a lot of idioms were trade-offs).

That said, C is a smaller language, which IMO is better than a huge one for learning to program.

That's exactly why I recommend C for starters. You don't have to do all the low level shit, but can still enjoy a small, clean language without a boatload of features.
It's easy to wrap your head around.

Also my bastardized card game of YGO/Chess/Warmachine is coming along good I guess

I haven't even touched code yet, but I bought $25 worth of stationary and cards and made some mockups to test out the mechanics. It's kind of fun so far.

I did make a thread on >>>/tg/251330 though, with more detail into the mechanics for feedback

I'd reccomend Kochan's C book for learning C actually, K&R is good but it's meant for programmers and not newcomers.

updated the github with all the new shit if anyone's interested
github.com/doctard/Unity-Node-Editor
because technically you won't be able to build the game if you don't put checks in each script for UnityEditor usage

I don't want to make anything on c that's above snake, but i would very much want to learn the lower-level programming and how it works before i move to higher level object oriented stuff like c++, i don't want to just use various functions, i'd like to have a general grasp of what they do and how.
Speaking of which, does starting out learning c and after a while.moving to c++ to make 'bigger' projects make sense or am i just going to overload myself with irrelevant nonsense?

If you really just want to make a game quickly, you should learn the language of one of the easy to use pre-made engines(Godot, Love2D and, as much as I hate them, Gamemaker and Unity).
Then learn C I guess, if you want to go even lower level than that you could learn assembly.

Lower level and higher level programming languages mean very different things.
Lower level is about how a machine actually works and so it's very technical and if you are wrong you crash/get seg faults/corruption etc. Higher level is about how a theoretical machine works and so it's very conceptual and if you are wrong you get lost in maze of hacky code and confusion.
Benefit of lower is you learn about reality, the drawbacks is it is tedious and mistakes can be huge.
Benefit of higher is you learn about concepts and can ignore a lot of the tedious problems, the drawbacks is they don't necessarily work in reality.

You need to learn both. Doesn't matter which you start with just remember they often have almost no connection with each other.

made minor changes to the If node
if you connect a Bool to it, that bool will become the condition for the If
if you connect a Branch to it (a node that has a next step) it becomes a regular connection
if you try to connect anything other than a Bool/Branch you get an error
if you already had a condition and connect a new one, the old one gets disconnected from the If

if you wanna move to C++ you might as well start with it
there isn't really a big difference when you are just learning a language

It makes perfect sense. Refer to the Venn diagram I posted earlier. There's very few things you can do in C that the C++ compiler won't accept. You can (and maybe even will) write C code in your C++ program. All the basics are exactly the same, as C++ was built on top of C.
If you're really new to programming, starting with C rather than C++ is a smart idea because it's so much simpler. There's less shit you need to know about (i.e. OOP). If you were to reduce C++ to just the basics that a newbie should learn first, you would pretty much end up at C again anyway.

Things like
are things you will need to program, regardless of which programming language you use. In the case of C and C++, they are literally the same. You can copy and paste your code from a C into a C++ project and it would still work.

You should tackle these things one step at a time.
Learning OOP and learning how things work at a lower level aren't mutually exclusive. The reason I like to stay away from OOP at the beginning is that OOP, while not terrible complicated, is a truckload worth of concepts to digest. It takes some time to understand that shit. Meanwhile, I am confident that anyone would understand every last detail of a Hello World program written in C in an hour or two, if I sat down with them.

Going from a lower to a higher level is all about abstraction. It's about getting rid of those pesky technical details so you can focus on what's important. As a result a lot of work is done for you and you're able to develop applications much faster. On the flip side, you loose control. There is no one size fits all solution to problems, so high level languages make compromises. They make compromises that work really good for as many cases as possible, but they still make compromises.

Whether you choose to start with C or C++, make sure that you don't give up just because things start to get rough. Really learning programming takes time. A lot of it.

You might want to check out my /agdg/ guide over on our board. I will cover some basic topics there. Things like data types are on the list. Why can heavy usage of strings cause performance problems? Why shouldn't you compare floating point numbers using ==, when checking whether they're equal? Why do we need so many different data types for numbers?
Basic shit like this, explained in a hopefully easy to understand way.

Thanks everyone, you've been very helpful!
Last question: what's a good development environment (or whatever they're called) for c on linux?
I used visual studio in high school but i would like to know of some alternatives.

Are you used to using a terminal, or are you looking specifically for an IDE?

don't use IDEs man they just add more abstraction and another point where things can go wrong
I mean if you're gonna use an IDE why even bother with c
just learn how to use MakeFiles and get sublime or some other text editor

A basic texteditor & G++ scripts is how real autists do it.

At the beginning you don't need to use an IDE.
Any text editor (with syntax highlighting, we're not in the fucking stone age) will do. My favorite is Kate. If you're using Ubuntu or some other distribution that uses GTK by default, gedit is probably already installed.

That being said, my favorite IDEs for C/C++ are QtCreator and Visual Studio. Both have their strengths and weaknesses. Visual Studio's debugger is as amazing as its intellisense (code completion, auto correction, syntax highlighting) is sucks balls. QtCreator is really fast and has a clean UI, but it's debugger doesn't get close to VS.

Still, for starters:
Text editor + terminal.

new bread soon?

We're still at page 6 buddy

but we past 300 bruh

We can't create a new thread until page 13.
Well we can, but pray that the mods don't find out and purge the new one

if the creator of this thread is still around he could delete this one and create a new one.

Yeah but will he?

I mean if he his still around i don't see why he wouldn't

His last post was 2 days ago though

well shit i didn't even think this thread was more than a day old

Should I use blender for modeling
If not preferably something for linux

Yes.
A bit of a bitch to learn (unless you speak German), but totally worth it.

I speak a little german

The reason I why I point this out is that there is an excellent book on Blender, but it's only available in German.
Unlike most of what you find on YouTube, it basically doesn't leave unanswered questions and is actually complete (no: "We will cover this in a future video that never gets made" bullshit).
This probably has to do with the fact that the guy who wrote it is also a Blender developer, so he knows what he's talking about.

Attack node now stores a list of possible attacks, the AI does a random one whenever it can
Weave node weaves depending on which direction the enemy is attacking from
EnemyAttacking node checks if the enemy's current punch is null or not
There's also a node to rotate the AI towards his enemy

well its fine im following a tutorial right now
I do like the fact that it seems you can do almost everything with the keyboard in quick way

i fucking HATE this
tell me what it does
if i dont get it you're not explaining it right or im too dumb to get it
at the very least you give a summary of what it does, never leave something like that, EVER

Blender's UI was designed so you can use it only with your mouse, only with your keyboard or using a hybrid workflow. The latter the the best one by a long shot. A lot of what I don't like about YT tutorials is that the people who make them seem to be worse at using Blender that I am. That's evident by how they rely on the mouse.

New stuff for people who want to git gud.
>>>/agdg/27246

writing what you want and getting it regardless of shortcuts, if only it had a list of last used ones.

F3

Is it a procedurally generated mesh, or is it a pre-made mesh?
Also, if it's proc gen'd, what approach are you using to generate the mesh?


Good stuff.
I have yet to read it, but I will as a good review is always nice.

vim + gcc works for me

Looking for someone interested in coding C++ for a Holla Forums project.
If you're interested, then just drop us an email and we'll discuss the details.

[email protected]/* */

are you using anything else besides C++? SFML? or is everything from scratch?

We've been in pre-development with RPGMaker, but we're interested in doing something from scratch.

also, we haven't been doing anything with SFML.

dumb question, but is it something that will require more than what game maker offers?

we haven't looked much into game maker, so we can't say for certain.

i've used game maker quite a bit, so i might know

shoot me an email soon, im currently hacking my 3DS so i might not get back right away but ill check once in a while

I'm using unity's terrain and now realizing my horrible mistake. My terrain edges don't line up when you zoom in, and I think it's because of floating point errors accumulating before I actually finish generating it.

I guess I could force them to line up once I'm done generating it, but that sounds like a pain in the ass.

I know Java, C, Lua and Shell fluently and I'm trying to pick up modern C++, ie C++11 and C++14. Can anyone recommend me a book or resource?

I haven't learned that much but there are already some grating parts of the language, a few being:

- There are like 4 ways to declare and initialise an object.
- Having classes split between headers and source files are a pain in the dick
- Some of the decisions made about which symbols to use for what are questionable

Sure, if you're a professional developer with long experience in another language, then Bjarne wrote just the book for you–Tour++:
stroustrup.com/Tour.html

On the other hand, if you've really only just dabbled here and there, then you owe it to yourself to go through PPP2:
stroustrup.com/Programming/

It's the single best textbook on programming for beginners, period. Regardless of language.

For a beginner? PPP2 hands down:


Not sure what you mean exactly, user. If you mean OS, then Linux is the best accessible OS for developers if you're serious about. Wangblows otherwise. If you mean computing platform, then again, the PC offers you by far the most choices. If you mean "What toolchain/IDE should I use?"
(Basically) All Linux' come with everything needed to start writing software immediately. Just find an editor you're comfortable with and go. If you choose to work on Wangblows, then Visual Studio is the obvious choice.

Good job user.

This is very important. It really doesn't matter which editor you use as long as you can use it productively. Vim, Atom, Emacs with foot pedals for Ctrl and Shift, Nano, an IDE, an editor customized to work like an IDE, whatever.

Thanks user, quality stuff.

The average C++ book is.

My advice is read every C++ book backwards.

got the Wait node to work, and it's a lot less convoluted than before
case "Wait": Wait temp3 = curStep as Wait; //check if this is a different Wait node, if so we need to reset the counter if(WaitNodeID!=temp3.ID) { WaitNodeID = temp3.ID; WaitTimer = 0; } //increase timer or reset it if it finishes if (WaitTimer < temp3.duration) { WaitTimer += Time.deltaTime; return; } else { WaitTimer = 0; } break;

New thread, with dubs.