/agdg/ - Amateur Game Development General

kissu edition

> Upcoming Mechanoid Jam itch.io/jam/op-mechanoid
> Next Demo Day 16 (4 days left) itch.io/jam/agdg-demo-day-16
> Play Demo Day 15 itch.io/jam/agdg-demo-day-15

> Helpful links
Website: tools.aggydaggy.com
Weekly Recap: recap.agdg.io
AGDG Steam Games: homph.com/steam
Fanart and stuff: drive.google.com/drive/folders/0B6j4pcv3V-vfb3hKSlhRRzlLbFE
New Threads: Archive: boards.fireden.net/vg/search/subject/agdg
AGDG Logo: pastebin.com/iafqz627

Previous Thread: Previous Demo Days: pastebin.com/JqsQerui
Previous Jams: pastebin.com/jAByvH3V

> Engines
GameMaker: yoyogames.com/gamemaker
Godot: godotengine.org
UE4: unrealengine.com
Unity: unity3d.com

> Models/art/textures/sprites
opengameart.org
blender-models.com

> Free audio
freesound.org/browse
freemusicarchive.org
incompetech.com/music
fantasymusica.org

> How to Webm
obsproject.com
gitgud.io/nixx/WebMConverter

Other urls found in this thread:

docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/maths/date and time/delta_time.html
docs.yoyogames.com/source/dadiospice/002_reference/date and time/delta_time.html
youtube.com/watch?v=17jw14EvnCQ
docs.spring.io/spring/docs/2.5.x/javadoc-api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html
twitter.com/SFWRedditVideos

fuck anime

first for nothing

also 3 days to dd16 left
rude

so i was waiting for anime thread but looks like it's not coming up eh? so this is new thread....

>tfw going to get hit by Irma during Demo Day

It didn't have to be anime, but I'm getting tired of that style of OP Pic. I want to at the very least have some of the in others being rotated in & out

>That one idiot who uses OOP in game programming

Here's a (You) just because I feel bad for you.

>That one idiot who uses OOP anywhere

b-b-b-but user, it's so simple! All you have to do is create an AbstractGameFactoryBean then create a concrete GameFactoryBean Then use the GameFactory to generate a Game object!

Only if you're inflicted with a Twitch Streamer in your game

aren't most popular engines oop?

Holy shit i'm a dumbass, metals were real dark because all the maps you need to set to linear color manually, jesus christ.

Unity and UE4 are more ECS, which is far superior for gayming

>tfw i want to make a 3d cel shaded model but sketchup shuts down my pc whenever i try to start it even if more complex programs run without problems

>Shadman.jpg

but the c in ecs is oop

>but muh children tho
That's actually a big concern. While not quite the CS:GO scandal, I can believe this is a shitshow waiting to crash

>I can but optimization takes a day for each level so i rather do that when I'm done with each level so I can sell the game on early access first to my kickstarter backers.
>so I can sell the game on early access first to my kickstarter backers.
>to my kickstarter backers.
Are you sure about that?

I'm slightly confused about delta time.

My game is 60fps top down action shooter. I want to implement delta time so it runs smoothly for everyone, but also so that I can implement slow motion / bullet time.

I understand how to use delta time, something like this:

var seconds_passed = delta_time/1000000;
var move_speed_this_frame = move_speed*seconds_passed;
x += move_speed_this_frame;

But I don't understand for what all should I use it?

Movement sure. Enemies, player, bullets moving. But what about other stuff? Do I need to multiple it with delta time? Timers? Alarms? Counters? For loops? State machine timers? Any kind of statement that is calculating numbers every step? Doesn't that too need to be adjusted when lag spikes occur or not? I'm clearly not understanding it exactly. Seems a bit annoying to multiple practically everything with delta time. Can anyone please help me understand what all should I apply delta time to?

Same question as this guy here. I'm migrating to delta-time shite.

Realized this spot can be used for blogposting, so: the plan is to use dd16 as a base for a kickstarter demo, and ask for ~5k and dev through the winter

----[ Recap ]----
Game: HACK the FBI
Dev: vestigial
Tools: Unity
Web: @vestigialdev
Progress:
+ Tryn'a demoday
+ Added "guest account" vulnerability
+ 802 wishlists
- Obsessing over small/unimportant things
- Scenario development constantly exposes broken things

use it when something must use real time instead of number of updates: movement, rotation, animation, timers-counters-alarms when needed.
i don't use alarms but i think there's no nice way to use built-in alarms when you need them for real-time things since gamemaker updates them itself and so you'll have to first revert changes made by gmand then subtract time elapsed from alarm (i bet it's something like alarm[x] += (1 - seconds_passed) in step event). you can just set up timers yourself in step event.
if you're using a shitty collision algorithm that allows things to go through walls be sure to clamp your delta_time because when game pauses like if you're dragging the game window, delta_time can get pretty big.

The grass is confusing me. Are you completely invisible in grass? There's 0 feedback. Some suggestions:

>Fading the player to translucent when in grass
>Highlighting grass edges when entering
>Rustling the grass around with vertex displacement

what...
engine...

for counters you just add delta unless you have a different speed for it, delta is just the time between frames, so at 30fps you would have twice delta as 60fps.
for the slow motion you multiply delta by another variable, call it time_dilatation, at normal it'll equal one (as if you're using only delta), but at 0.5 it will make delta half it should be, so anything affected by it will run at half speed (moving objects, counters...)

>migrating to delta-time
>what engine
My own, dummy

>var seconds_passed = delta_time/1000000;
what the fuck are you doing m8

zero gameplay

yeah but those wishlists tho

>draw something at night
>think it looks good
>go to sleep
>look at it in the morning and it looks like shit
>flip canvas
>kill myself

You can now walljump from enemies. Who the fuck needs weapons anyway.

You use it any time you need to know when a second has passed. Character movement uses it because the units of it's speed is pixels per second. If you have a timer that displays seconds then you should use it there too, though it would be better to use an actual timer (get the unix time at the start, each frame query the current time and subtract the start time)
for loops don't need it because your loops are measured in ticks, not seconds.

ask gmdevs why they decided to make delta_time use microseconds
also just make room_speed really big and if something is too fucking fast you'll know that you have to use delta_time for it.

Lack of progress posts or lack of game gameplay?
You're right either way

loops aren't getting any ticks, they are measured in iterations and are always executed in one tick

No m8, microseconds is what you want, delta_time is the amount in seconds that a frame took. If you add up delta_time for one second then it will sum up to 1.
Right now you are dividing an already tiny number by 1000000 for no reason.

Delta time is used in basically every commercial game engine. You're saying you wrote your own game engine without knowledge of any other game engines? Did the thought that ~maybe~ you shouldn't write an engine without first experiencing other engines to understand what an engine needs never occur to you when you started your project?

you're asking for bugs mate, if multiple enemies are heading for the player they would fuck the collision and send him to a pit and also will break any movement abilities you have.
how about you disable collision on enemies (aka damage on touch) make proper attack frames, then let the player use a grappling hook on enemies (even if they're moving), this way you can have a platforming section with flying enemies where the player use them to access new areas and secret, like if you don't kill that one flying enemy it will fly into a place where you can use it to access a secret.

No, it did not, you jaded cunt. I program for my own pleasure as a hobby, and as I program, I learn, like I just did right here. Don't bother responding.

wow wait a second, delta_time in GM is not a float but actually an integer? Why the fuck do people still keep using this retarded fucking engine?

you don't know what you're talking about
docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/maths/date and time/delta_time.html
docs.yoyogames.com/source/dadiospice/002_reference/date and time/delta_time.html

I think you should assume that any game logic runs instantly, and you only want to use delta time when you want to apply the results of that logic over time. Lots of logic you want to apply instantly (eg damage values), but some logic should take longer (eg player movement. The game can do the logic for the player movement instantly, you just use delta time to apply the results of the logic over a period)

Most popular engines use a combination of OOP and data-driven paradigms like ECS. Almost all of them try to keep traditional OOP staples to a minimum, as games share little in common with other types of applications where OOP is commonly used.


For example, Unity's ECS uses very little inheritance, but also combines systems and components into a hybrid E-C/S paradigm. Components control their internal state, and also implement logic that manipulates it. However, complex behavior is composed from many component-system MonoBehaviors, instead of complex inheritance hierarchies.

Unreal's ECS is very OOP inspired. Individual components must inherit from base classes (Actor, Pawn, etc.), but can also be extended with composition by adding sub-components.

Godot's ECS is a bit like Unity, combining component and system together, but also treats individual nodes in the scenegraph as component-systems. It doesn't have the same concept of "entity" as most ECS implementations (where an entity is a bag of components), because nodes can only have exactly one component-system at a time, and complex behavior is built by creating tree hierarchies of many component-systems.

Here's an original thought: Why not program a game before you program a game engine?

I'm sorry for assuming GM was even slightly competently programmed.

there are no ints in GM, all are floats and are called 'reals'

i'm going to have to agree with the frogposter, you are retarded

i told you ask gmdevs why they decided to

youtube.com/watch?v=17jw14EvnCQ

Well, the sign does say "Tall grass is safe" and you are basically forced to go through it in front of a wolf.
You are pretty much invisible, unless the wolf gets really really close.

What I always wonder about ECS is how they create a specific kind of Entity. Do they create a subclass of Entity where the only code in it is a constructor that adds the necessary components to itself? Do they just have a create function in global scope? Do they use some kind of Factory object? I can see why ECS is useful when you're throwing something together using Unity's gui, but I think you lose a lot of compile time safety.

Whirlwind ability, better HUD, better colors, crab enemies are DONE and going to work on the fireball spell next.

I'm having a weird problem with hitboxes though, not sure why either. The regular attack hitbox is perfect but Whirlwind's is pretty odd and buggy.

>early access
m8 why

this

do something like letting them bounce off certain enemies

Actually, the shown enemy is the only enemy in the game with attack frames (the charging attack) instead of always damaging. I don't get your point though. I design the game so player can completely break it if he is able to. Having movement, attack and way to sequence break in one is just perfect.
That example of puzzle is kinda obvious, I just want it integrated into system instead of level design. Moment like "I don't know what the fuck I just did, but it was awesome" (and I have a lot of those even as the developer) is what I'm aiming for.

>Do they just have a create function in global scope?
Usually this.

I prefer to do it less dynamically and have a different type (struct) for every combination of components into an entity. It allows me to be more flexible, too, like an entity could have a list of a particular type of component or an option type for an optional component. The systems are their own functions and only take components. Then it's just a matter of getting the components from the entity to call the systems on.

>sell an unfinished, buggy game
>become a wagie and keep working on it
I choose neither

do you really think you'll make enough?

You become a wagie for a year or two WHILE working on it and then give your two weeks and live on the wagebux lad.

>do you really think you'll make enough?
30k would be enough, but even 5k might be unrealistic. But having a shipped game would be enough to get on someone elses dev team. OR, the game is set up so its easy to add content, so maybe one of these a year would be a living. I hope Steam opens up paid mods to anyone so I can get a cut of User Generated Content people sell :^)

I tried to work and dev, its too hard.

Thanks everyone.

Still not entirely sure, but to me that sounds like almost anything that counts things over time.

So stuff like AI chase_timer, AI rest_time, finite state machine timers, reload timer, spell cooldowns, projectile movement and air time, anything that counts over time, etc?

>I hope Steam opens up paid mods to anyone so I can get a cut of User Generated Content people sell :^)
is this a false-flag or something?

If you make one thing delta-timed then you will have to make everything delta-timed unless you like things running at different speeds depending on the framerate.

>hope Steam opens up paid mods to anyone so I can get a cut of User Generated Content people sell :^)
...Insane poster....?

It might be worth using CCD or dropping hurtboxes for raycasts

>lock game to 60 fps
>since game is pixel platformer with female protagonist it doesnt slow down too much
>nobody notices that half the things are delta-timed while others are not

Which to me sounds a bit tedious, to have to multiple practically every single value that counts over time. But I guess if I want slow motion that's the only way to go.

>not wanting to make easy money

That sounds more like data-oriented than object-oriented.

If it's locked then why are you even using delta time? Half-assing shit is literally worse than not using delta time at all since your game will completely break if it runs at a different framerate instead of just running slower.

...

i fix it with one line
>delta_time = clamp(delta_time, 1, 1);

Not at all.

Going off what I said here
Timers are already logic applied over a time frame, so delta is unnecessary.

reminder that your 60 fps game in a 144hz monitor looks as bad as a 30 fps game in a 60hz monitor

You are getting things backwards. The entity is your traditional OOP class. An entity might be a PlayerCharacter, NPC, Landscape, PhysicsActor. They are children of engine's base class: I.E. actor->character->playerCharacter in Unreal or GameObject->playerCharacter in Unity.

Components are "code blocks" that can be added any class. For example, you make a HealthComponent with internal variables currentHealth and maxHealth. Then create:
>A function to deal damage or heal.
>A function to drain x health over y seconds
>A function to set the health regen rate
>A function to increase the max health (level up)
>A healthChanged event that fires when currentHealth changes
>A maxHealthChanged event that fires when maxHealth changes
>A onDeath event that fires currentHealth = 0

So you add this component easily to any entity, and use the events to drive changes to the entity. For example, a playerCharacter that receives healthChanged should update its healthbar. onDeath should transition into ragdoll. You could also add the health component to a wall and set onDeath to trigger a mesh explosion.

It also makes object communication easier. If you have a bullet class and you need to write an "onCollide(collidingActor)" function, you just call collidingActor.getHealthComponent.DealDamage(amount);

>use ue4 4.17.1
>there's always a 5% chance the next click will crash the editor
>there's always a seemingly rather high chance that whatever you delete from the content browser will keep reappearing no matter how many times you save and reload the project, requiring manual intervention on the filesystem
>corrupted projects sometimes
>crash reporter itself even crashes occasionally
How does anyone get anything done with this professional quality engine?

Any non-brainlet strips the shit out and only uses the good.

The only issue I'm running into is running out of video memory and the engine suddently exiting without any warning. But that's because I'm on a laptop that soon won't take long before it dies on me, not because of the engine.
I must be the luckiest UE4 user.

Upgrade your computer poorfag.

Nah, that's enterprise Java OO. Here's a real world example:
docs.spring.io/spring/docs/2.5.x/javadoc-api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html

>AbstractSingletonProxyFactoryBean

I know all this, but where are the entities constructed? Which bit of the code calls myEntity.AddComponent(myComponent)?

Here are the WIP game menus. The demonic blood tentacles are harmless, but only if you whisper sweet nothings to it.

The "under the hood" functionality is done, stuff like stat upgrades and inventory, now I just need to connect the game manager code to the world events so you can pick up items and things like that. A lot of the tabs need more work and polish, especially the Lore tab. I want to expand on it, yet I don't want to bore the player with too much. I'm thinking of splitting the Lore window into sub-categories like: Locations, Creatures, Legends and NPCs.

Do you guys enjoy "encyclopedia/bestiary" sub-menus in games?

I'm on UE4 4.16. No problems here.

It doesn't work that way. The components would either be passed into or themselves constructed by the entity's constructor.

>Convenient proxy factory bean superclass for proxy factory beans that create only singletons.
>Convenient

I think it should be a rule that if you have to describe your code as "convenient" in a comment in case people don't notice by actually using it then you should probably rewrite it.

So if I have a PlayerCharacter entity, how does it add the components that it needs? Does it derive from Entity then have a constructor that constructs all the components that it needs or does it have a factory that does it? I know C# has no global scope functions. Can you give me an example of how you compose an entity in code?

In Unreal and unreal, you click "addComponent" on the add component button. You can also do it programatically in the construction script.

What are you on about? This is crashing sometimes doing the simplest little thing. My last crash was when I deleted a variable from a blueprint which was still referenced in the event graph. That's not the correct behaviour.

4.16 was the same.

Don't expect enginebabbys to know any of this. They just click the add component button in their gui and think it happens by magic.

[code]
class Prop {
private Transform transform;
private Model model;

Prop(Transform transform, string asset) {
this.transform = transform;
this.model = Assets.LoadModel(asset);
}
}
[/code]

Fuck, forgot there were no code tags outside of /g/.

Note that this is not how Unity does it. I dunno about UE4. But this is probably the best way.

Java itself has a beautiful class called BeanContextServiceProviderBeanInfo in the java.beans package. Glad they took the time to add that functionality to the standard library.

>tfw can't stop fapping to mechs.

in Unreal and Unity*
>So if I have a PlayerCharacter entity, how does it add the components that it needs?
What engine?

If you're writing your own engine, you must have a Base class from which all game classes derive and a Component class. The Base class has a List of Components. The Base class loops through all Components on construction and calls their constructor scripts.The Base class loops through all Components on update and calls their update scripts.

Must is a strong word, user.

an entity is just a container for components, it can literally be a table of components that just iterates over them to update them

>yet another shit jam is made
>absolutely abhorrent posts like quote related appearing all the time
>but now for 3 months!!

I have that version running most of the day without a single problem.

are you even planning on making a game or are you just going to do these unrelated posts for the entire duration of the jam
posts like this are why people hate on jams nowadays