Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1309275 Posts in 58589 Topics- by 49731 Members - Latest Member: Kannagi

August 19, 2017, 06:54:40 am

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogs5734L3R
Pages: 1 ... 25 26 [27]
Print
Author Topic: 5734L3R  (Read 100541 times)
Canned Turkey
Professional Otter
Level 10
*****


Always The Devil's Advocate


View Profile WWW Email
« Reply #520 on: April 06, 2017, 08:25:53 am »



Factions

Factions exist as just groups of robots with different functions, but at the same time they constitute a single whole, i.e. the System. At some point of time System was unified and all robots were serving one great purpose. But the recent failure in System's inner working caused a split. After this, the System Advisors began to pursue different global purposes. How story event will develop going to be, based on which side 5734L3R will stand. So game will have several endings.

Each faction will have unique types of robots (beside standart types, like guards, loaders etc) as well as the visual style different from the others. Therefore, player can always distinguish between different factions (in any case, I will try to achieve this). In addition, the factions will mark their territory with unique signs (check the post picture - signs on the left from robots).

These are not just signs on the walls, but objects that provide certain information for player.


Social chips

Belonging to one or another faction is determined by a social chip.  By default, 5734L3R doesn't have any chip, so he is not belong to any faction.  So if he steals this item, he will not only have a new identifier, but also enjoy all basic privileges of the faction to which the social chip  belongs. 

Also inside faction social chips will have different levels of access. Thus guard will have access to more  privileges  and locations than loader.


Faction puzzle example

However, there can be confusion here, despite special faction signs. As in the case of this location:



There are still conflicts between two groups, so it's impossible to unequivocally attribute the territory to either of factions.

Let's take a closer look at the situation depicted on this gif. As I said earlier, this location has an undefined membership status. Therefore, here there are robots of both factions, as well as lasers with different colors.

These lasers are  harmless for members of a certain group - emerald lasers harmless for red robots and red lasers  harmless  for bugs.

As you can see on this screen, the path of the red robot is longer than what it is shown on gif. It's because of the emerald laser blocking his path. 

To solve this puzzle, player must find a way to turn off one of the lasers and set the elevator in such a position to provoke a conflict between robots.

The task is complicated by the fact that at the moment 5734L3R  doesn’t have a social chip and this means that the robots of both factions are hostile to him. Another difficulty is that it’s necessary to somehow preserve the functionality of the robot of one of the fractions. After the 5734L3R finds a social chip, intact robot will cover him from other faction robot attacks.


Interesting update Smiley

Are you planning on having advanced movement options for the player? Watching that GIF it was my gut instinct to think 5734L3R was going to duck underneath the laser shot at him.
Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #521 on: May 06, 2017, 11:49:40 pm »

Are you planning on having advanced movement options for the player?

What you mean on "advanced movement options"?
Logged

Canned Turkey
Professional Otter
Level 10
*****


Always The Devil's Advocate


View Profile WWW Email
« Reply #522 on: May 07, 2017, 07:09:04 am »

Crouching, wall jumping, anything like that.
Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #523 on: May 08, 2017, 08:50:56 pm »

Crouching, wall jumping, anything like that.
Maybe, I'm not sure now.
Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #524 on: May 09, 2017, 07:16:27 am »

Algorithms

Here is some raw prototype gifs, technical info and links to something you can touch with your hands right now. Today, let's talk about algorithms. Specifically, external tools I use to test/prototype stuff for the game.

Welcome to OpenProcessing. It's a minimalistic site where you can test things out without much overhead on top using JavaScript. I will cover several examples via several posts and today it'll be pseudo-3D effect.

https://www.openprocessing.org/sketch/408645

That's the sketch that was made before integrating into the game code. Simple, messy, but works. Idea behind pseudo-3D effect was to render the object 2 more times with according matrix distortions so it look like a side of the object. That's why I call it pseudo - there is not really a lot of 3D math involved. Just some 2D matrices. In-game implementation a bit different, but idea still the same.

Entire function fits into:

    
    1. Start at [scaleX*.33, 0, 0, scaleY*(sin(angle) or cos(angle)), 0, 0] matrix. sin used for first, cos for second texture.
    
    2. Multiply it at [1, 0, tan(-angle % PI), 1, 0, 0] matrix.
    
    3. Translate matrix to new anchor depending on rotation angle. (formula depends on texture and angle)
    
    4. Translate matrix on front texture x/y position minus camera position.
    
    5. Apply parent matrix and render.
    
    6. Repeat for second texture.

But just throwing in link and talk a bit about it is boring. Let's show some examples.

That's how it looks in-game. I don't even know if this effect will be used at all in the end, but hey, experiments!



But what if we mess with the code a bit?

First, let's tint textures in different colors, so you can see what actually gets rendered where. Red texture is first rendered side, green - second.



As you can see, it's just same texture drawn with different parameters (disposition, rotation, skewing and scaling). But what if I will use something with transparency, not just simple rectangular shape?



That's... Interesting. This effect does not work well with complex shapes, obviously. To mimic 3D effect in that case, we'll need at least minimal 3D math involved, polygon data (vertex/UV + textures for sides) at least. I'll throw in a few more examples of messing with parameters and breaking algorithm, because why not?

Let's remove scaling. Originally sides are scaled to 33% of texture width.



This actually produced interesting result of side visually appearing wider than front part. In reality they are identical. Go figure. And why not disable readjusting of translation anchor to accomodate for rotation of object?



And we got all rendered sides snapped onto single point, without actually rendering all sides.

Oh, and let's add this to every object on scene (well, except lasers as they use different rendering routine), because again, why not?



Apparently this shown that I did a lazy job implementing algorithm and it ignores sprite origin and flipping state. But as long as this intended to be used on rectangular shapes without transparency, we don't have to introduce too much complexity anyway.
« Last Edit: May 11, 2017, 04:07:12 am by 08--n7.r6-79.84 » Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #525 on: May 30, 2017, 10:38:47 am »




Yes, we still working on this!

Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #526 on: August 09, 2017, 06:06:31 am »

Yet again system proven to be not good enough to solve arising problems. This time it was Input-Output module that lies at the core of every object that have interactivity. Lifts interact with buttons, push-buttons interact with lasers, terminals interact with AI. Problem is, it was one-sided event system without ability to know what connected to what.
Rewritten system behave more like "Wires". If object wants to interact with another object it creates output wire to that object and sends both events and state via said wire. This wire is always attached to both objects and provides more robust interaction between objects. I was struggling with implementation of smarter AI that can operate lifts and lasers in old system, because I had no way to know which button would lower the lift or what box to push in order to disable laser. With new system it's as simple as looking at the connected wires and implementing behaviour like "If laser blocks the way - just remove the box from the button" becomes trivial task of path correction.
But not only that system got new additions. AI movement state obtained quite a rework to support advanced paths, and not simple linear movement to avoid state overcomplication. Now they use a command list which is a stepping stone for in-the-work pathing based on level geometry.

Below is an example of on-the-fly path correction based on environment (in that case - laser blocking the path).



And same situation in the debug view to showcase both wiring (white/red lines that connect objects) and internal AI decision making in case of obstacle.



What happens here is injection of new list of commands directly to current command pool (in that case "walk to the next patrool node") and can be descibed in that way:

AI sees laser -> calls path correction routine -> inserts new commands before current command and proceed to execute them.

After correction just one command [WalkTo(node)] expands to [Wait(0.3s), WalkTo(button), WalkTo(node)]. In the future second command will be replaced by action of actual pushing object from the button with animation, but for now AI just walks onto the button to ensure the crate will be moved aside.

Bonus round, small parallax for the city in background:



AI now pretty much in working order and ready for implementation of new robot types as well as other gameplay systems. And I want to start piecing together first global map piece that would be used for first tech-demo build. That would perfectly show how systems will tie together and will help a lot in testing core systems in the real situation and not enclosed testing environment.
« Last Edit: August 09, 2017, 10:05:51 pm by 08--n7.r6-79.84 » Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #527 on: August 17, 2017, 05:30:45 am »


Logged

fireboy
Level 0
**



View Profile
« Reply #528 on: August 17, 2017, 06:53:38 am »

The project is very good ...
Blink I'm watching. Blink
Logged

Pages: 1 ... 25 26 [27]
Print
Jump to:  

Theme orange-lt created by panic