Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411511 Posts in 69375 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 12:37:19 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 206 207 [208] 209 210 ... 279
Print
Author Topic: The happy programmer room  (Read 678529 times)
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4140 on: July 13, 2015, 06:52:48 PM »

Found an article on how to properly program networking code architecture within RTS games:
http://www.gamasutra.com/view/feature/131503/1500_archers_on_a_288_network_.php?page=1
Logged

Photon
Level 4
****


View Profile
« Reply #4141 on: July 19, 2015, 06:08:38 PM »

Do you ever mess up and feel something like, "Yes! Another mistake closer to getting it right!"

Hehe. Cheesy
Logged
gimblll
Level 2
**



View Profile WWW
« Reply #4142 on: July 22, 2015, 01:06:03 AM »

Game update finished and I don't have to touch Apple APIs again for a long while! Wohooo! Beer!
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4143 on: July 23, 2015, 05:03:36 AM »

Do you ever mess up and feel something like, "Yes! Another mistake closer to getting it right!"

Hehe. Cheesy

excellent attitude Smiley

Game update finished and I don't have to touch Apple APIs again for a long while! Wohooo! Beer!

 Beer!
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4144 on: July 23, 2015, 05:24:08 AM »

Excellent attitude indeed, this Monday I was programming interpolation functions and I was making it more and more buggy until I got it right! Really goes to show that a good attitude towards a problem is half the solution.
Logged

Azure Lazuline
Level 2
**



View Profile WWW
« Reply #4145 on: July 24, 2015, 02:18:22 AM »

Implemented statistic recording for beta testing, so it uploads really basic data about every player's progress in the game. There's this one person who got up to the first new boss, beat it first try, and then... beat that boss 6 more times? And never moved on with the game?

I guess that means that new boss is good Cheesy
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #4146 on: July 24, 2015, 01:34:13 PM »

There's this one person who got up to the first new boss, beat it first try, and then... beat that boss 6 more times? And never moved on with the game?
Or that the game crashes immediately after the boss :D
Logged
indie11
Level 2
**


View Profile
« Reply #4147 on: July 25, 2015, 02:24:27 AM »

So i've been trying to make a platformer with Super Meat Boy like physics and I got pretty good result, anyone would like to give some feedback?

NOTE: Only Jumping(Not Wall Jump) and Horizontal Movement properly coded
https://dl.dropboxusercontent.com/u/70467204/P2d/P2d.html
V2

Its a web player build so won't work on CHROME

  
« Last Edit: July 25, 2015, 08:13:44 AM by indie11 » Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4148 on: July 25, 2015, 05:18:59 AM »

It works but it's slow as hell. Feels more like 30 fps than the 60 it tells you it's running at. Also, jumps seem convoluted. Almost feels like your jump arc cuts a corner.
« Last Edit: July 25, 2015, 07:03:10 AM by ProgramGamer » Logged

indie11
Level 2
**


View Profile
« Reply #4149 on: July 25, 2015, 06:28:33 AM »

It works but it's slow as hell. Feels more like 30 fps than the 60 it tells you it's running at. Also, jumps seem convoluted as hell. Almost feels like your jump arc cuts a corner.

Alright.. thanks.. any suggestions? Should I Increase the jump acceleration? And can you explain the jump arc part a bit?Are you talking about the cut felt when the player releases the key?
« Last Edit: July 25, 2015, 06:36:56 AM by indie11 » Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4150 on: July 25, 2015, 07:04:27 AM »

It's as if your gravity is super small and after a certain distance your velocity just... inverts. it goes in an instant from going up to going down, and it's very reminiscent of bad programmers not programming gravity properly, though I know that's not the case with you because you do have proper gravity. Also, it had no relation to how long you hold the key. I have no problem with stopping instantly as you release the key, but what I'm describing happens even as you're pressing space, near the peak of the player's jump arc. It's very strange...

Also, sorry if I said hell a lot in that last post, I wasn't meaning to be that harsh...
Logged

indie11
Level 2
**


View Profile
« Reply #4151 on: July 25, 2015, 07:43:00 AM »

It's as if your gravity is super small and after a certain distance your velocity just... inverts. it goes in an instant from going up to going down, and it's very reminiscent of bad programmers not programming gravity properly, though I know that's not the case with you because you do have proper gravity. Also, it had no relation to how long you hold the key. I have no problem with stopping instantly as you release the key, but what I'm describing happens even as you're pressing space, near the peak of the player's jump arc. It's very strange...

Also, sorry if I said hell a lot in that last post, I wasn't meaning to be that harsh...

The going up to going down is because of setting the yVelocity to 0 when the player releases the key, I made some adjustments to it, here's the v2 link:

https://dl.dropboxusercontent.com/u/70467204/P2d/P2d.html

It feels a bit odd probably because there's no sprinting?
The cutting part is also present in SMB, if the player releases the key before reaching the apex..

« Last Edit: July 25, 2015, 08:13:17 AM by indie11 » Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4152 on: July 25, 2015, 07:45:54 AM »

It probably feels odd because of the low framerate TBH, but that may be due to the computer I'm on. Let me test that again when I get home. Smiley
Logged

indie11
Level 2
**


View Profile
« Reply #4153 on: July 25, 2015, 07:46:59 AM »

It probably feels odd because of the low framerate TBH, but that may be due to the computer I'm on. Let me test that again when I get home. Smiley

Okay i'll wait for your reply :D, I edited the last post a bit.. check it out

**EDIT** I've just found out that the horizontal movement is jittery even though I am accelerating based on time ( Using Smooth Damp in Unity). Unity always gives me headaches!! This is the 3rd time trying to make a SMB like physics platformer but again getting stuck at a minor thing that makes the game look crap
« Last Edit: July 25, 2015, 09:19:05 AM by indie11 » Logged

Photon
Level 4
****


View Profile
« Reply #4154 on: July 25, 2015, 08:07:45 AM »

Since starting with ECS, I've kind of gone through multiple iterations of things with my design (to the point where it may not be an ECS in the purest sense,) but I'm hoping the one I've got going now is going to work. I really like it so far.

First, in typical ECS, you might have properties such as position, velocity, etc. that would get their own class (PositionComponent, VelocityComponent, etc.) But I noticed that this basically gave you several classes that accomplished the same data format, which didn't make much sense to me. It means anytime you need a new type of vector data, you need another component class. And what if data is interchangeable (for example: keyboard, mouse, and controller input?)

My solution was to unify components by data type (VectorComp for x/y, TriggerComp for Bool, etc.) and store them in the component map using Haxe EnumValues*. So now instead of identifying them by class, position and velocity might be identified by enum Player with values POSITION and VELOCITY. The idea was to let data be data and not tack baggage on to the component that wasn't necessary. And if something, like player input, needs to assume a different role between entities, assign it the appropriate ID (can't necessarily assign it a new class!) It does mean one could more easily subvert the system, but that's not necessarily a bad thing (more on that later.) Giggle

*Its worth noting here that I have to use ObjectMap instead of EnumValueMap because different enums may be used in the same map; EnumValues do not necessarily have unique values cross-enum.

I also decided not to use traditional systems; instead, I chose a function-based approach. This provides more immediacy and control to what is going on in logic as opposed to deferring it to a batched action chain later. There is an important interface in my design called an AurGrabber ("Aur" is the prefix for some of my base classes, derived from the engine codename "Aurora".) All it defines is a function for getting a particular component using an ID (EnumValue.) Entities that house component maps implement this interface, for instance. So a function for positioning a sprite might look like this:

Code:
public static function position_sprite(target:AurGrabber):Void
{
    var comp_sprite:SpriteComp = cast target.get_comp(Player.SPRITE);
    var comp_pos:VectorComp = cast target.get_comp(Player.POSITION);

    comp_sprite.sprite.x = comp_pos.x;
    comp_sprite.sprite.y = comp_pos.y;
}

Pretty simple, but there are some important things to note here. First, we assume that the object is following a convention by identifying things with the Player enum; there was no need to pass the components or the ids in question to the function (something that had been tried in one form before, which turned into mess.) You still get specificity to your data and logic with an easy-to-fire function. But on top of that, there's a flexibility here that can be exploited through AurGrabber. If something needs to subvert the normal identifiers for any reason, a specialized object could be designed and used to implement AurGrabber and pass the different data back to the function. It may not be the norm to need this, but it leaves the door open to tweak and potentially optimize later.

Finally, it doesn't necessarily try to shoehorn everything under a common structure; this was another thing I wanted (BATCH ALL LOGIC, RAWR) but I realized that choosing a (single) design brings... well, constraints! And if you limit yourself to one all-encompassing design throughout your coding, that's a constraint you choose to live with. So instead, I've got some basics: a way for storing data, a very basic interface for getting to it, and a simple and concrete way of executing on it.

And... designing stuff for this has been a whole lot easier. The codebase seems a whole lot better to work with than before.
Logged
cykboy
Level 2
**

ye


View Profile
« Reply #4155 on: July 25, 2015, 08:46:30 AM »

Managed to map 2d images to 3d objects dynamically (the tiles are full 3d, from flat 2d sprites)

Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4156 on: July 26, 2015, 08:59:01 AM »

How do the original graphics look like? O_O

**EDIT** I've just found out that the horizontal movement is jittery even though I am accelerating based on time ( Using Smooth Damp in Unity). Unity always gives me headaches!! This is the 3rd time trying to make a SMB like physics platformer but again getting stuck at a minor thing that makes the game look crap

This is why I hate physics based on delta time, they're awfully hard to get right. And yes, SMB uses a fixed framerate if you wonder.
Logged
indie11
Level 2
**


View Profile
« Reply #4157 on: July 26, 2015, 06:08:32 PM »

How do the original graphics look like? O_O

**EDIT** I've just found out that the horizontal movement is jittery even though I am accelerating based on time ( Using Smooth Damp in Unity). Unity always gives me headaches!! This is the 3rd time trying to make a SMB like physics platformer but again getting stuck at a minor thing that makes the game look crap

This is why I hate physics based on delta time, they're awfully hard to get right. And yes, SMB uses a fixed framerate if you wonder.

This is some problem with the unity engine. Recently I've found out that a lot of people are facing this issue, there's no proper fix, some say to change monitor refresh rate, play with the editor physics settings but nothing is working out for me
Logged

Will Sykes
Level 0
**


View Profile
« Reply #4158 on: July 27, 2015, 05:42:53 AM »

How do the original graphics look like? O_O

**EDIT** I've just found out that the horizontal movement is jittery even though I am accelerating based on time ( Using Smooth Damp in Unity). Unity always gives me headaches!! This is the 3rd time trying to make a SMB like physics platformer but again getting stuck at a minor thing that makes the game look crap

This is why I hate physics based on delta time, they're awfully hard to get right. And yes, SMB uses a fixed framerate if you wonder.

This is some problem with the unity engine. Recently I've found out that a lot of people are facing this issue, there's no proper fix, some say to change monitor refresh rate, play with the editor physics settings but nothing is working out for me



I had several issues with jerky movement in unity which I ultimately resolved, here is what I did in case it helps:

1 ensure that the jerkyness is not in your camera, i found that my camera was updating out of sync with the objects. I got round this by ensuring the my cameras follow code was updated in "FixedUpdate".

2 ensure my objects did not have velocity altering code inside a "FixedUpdate" function (put it all in "Update")

the reason behind this is that unity can update its physics and rendering separately, Unity will potentially call fixed update multiple times per screen refresh (update)

Hope this helps (and doesn't just cause confustion) Smiley
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4159 on: July 27, 2015, 06:09:49 AM »

Welp that redo of my websites design is done. I didnt bother with a mobile version at the end but I'm surprised it actually wasn't a complete mess on my nexus 5.

http://levelism.com/
Logged

Pages: 1 ... 206 207 [208] 209 210 ... 279
Print
Jump to:  

Theme orange-lt created by panic