Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411492 Posts in 69377 Topics- by 58433 Members - Latest Member: Bohdan_Zoshchenko

April 29, 2024, 07:55:28 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsNYKRA
Pages: 1 ... 11 12 [13] 14 15 ... 20
Print
Author Topic: NYKRA  (Read 151764 times)
Bricabrac
Level 2
**


Fail again. Fail better.


View Profile
« Reply #240 on: May 20, 2016, 03:53:09 AM »

Oh, I know you! You're the guy who posted trippy music on Imgur months ago!
Following :3
Logged

Selling Sunlight - Wandering Merchant RPG
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #241 on: May 20, 2016, 03:55:52 AM »

Oh, I know you! You're the guy who posted trippy music on Imgur months ago!
Following :3

Hahaha hello fellow Imgurian! Yeah, I'm actually still making music :D my SoundCloud and BandCamp get updated every so often, and I have all my stuff on Spotify etc too Smiley
Logged

TWITTER    |    NYKRA DEVLOG
hyperduck
Level 10
*****

Music and Noises


View Profile WWW
« Reply #242 on: May 22, 2016, 01:47:04 AM »

I'll address the frakking incredible cubevolution first, I want a physical one for my office. If you can make it constantly evolve that would be great too kkthnx.

Secondly, you post trippy music somewhere? Can I hear this trippy music? Don't want to dereail your devlog (which I love) just had to ask!
Logged

ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #243 on: May 22, 2016, 02:47:44 AM »

I'll address the frakking incredible cubevolution first, I want a physical one for my office. If you can make it constantly evolve that would be great too kkthnx.

Haha woah man, you're too nice  Shocked Kiss Hand Thumbs Up Right And I only just realised... YOU'RE HYPERDUCK! You're one of my favourite game musicians! (I loooved The Blocks Cometh)
And yeah, the Boldemo is still being upgraded, pixel-tweaks here and there... Maybe I'll have to 3D print you one Wink

Secondly, you post trippy music somewhere? Can I hear this trippy music? Don't want to dereail your devlog (which I love) just had to ask!

> RIGHT HERE <
Logged

TWITTER    |    NYKRA DEVLOG
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #244 on: May 22, 2016, 06:14:06 PM »





(or at least, this is what I'm going by during the development)

The past few months have been a real eye opener, and I have realised that my original concept was far to ambitious. So, for those who have followed me for the past years, you have seen "NIKRA" go from a sandbox game, to an rpg, to the now renamed "NYKRA" - a game about the first galaxy in the Heptaverse. It's about discovering what it means to be alive, and learning true empathy in times of doubt.

And here is a track, half-connected to the lore: LISTEN TO CIRCUITBREAKER

« Last Edit: May 23, 2016, 02:26:02 AM by ENDESGA » Logged

TWITTER    |    NYKRA DEVLOG
hyperduck
Level 10
*****

Music and Noises


View Profile WWW
« Reply #245 on: May 23, 2016, 02:21:13 AM »

I enjoyed all of this music - followed.

Also, I didn't mention before but you have really went through an impressive transformation with NYKRA, and having seen some of the negative reactions you got when you first made the significant change to the artstyle, I say fair play for sticking to your guns. I feel like some of the people saying they would lose interest in your game because of the art changing (and it wasn't THAT drastic a change, really, so I don't see why), never delivered good reasoning as to why they'd walk away from supporting your idea.. so it seems a tad selfish on their part, imho. Glad you got through that patch though, and the game is really, really beautiful.  I especially love the UI interface you've shown.

The ability to adapt and evolve your inspirations and aspirations for the game on a whole shows good points of strength as a developer, I mean of course you're DEVELOPING! It's what you do, and it's been really enjoyable watching that up to now, and onwards from here!


I also love that lantern in the latest screenshare.
Logged

ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #246 on: May 23, 2016, 02:50:03 AM »

...

No words can describe the sort of happy reply I could write to your message <3
This whole adventure has been a rollercoaster Coffee
Logged

TWITTER    |    NYKRA DEVLOG
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #247 on: May 23, 2016, 05:11:05 AM »



Logged

TWITTER    |    NYKRA DEVLOG
kanabeach
Level 0
***



View Profile
« Reply #248 on: May 23, 2016, 06:01:59 AM »

Hello Endesga,

Very great,i love the album..

And you gonna do a demo of the game?a date?
Logged

ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #249 on: May 23, 2016, 06:09:50 AM »

Hello Endesga,

Very great,i love the album..

And you gonna do a demo of the game?a date?

Thanks! Smiley
A demo, probably not. And a date, no idea Tongue
Logged

TWITTER    |    NYKRA DEVLOG
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #250 on: May 26, 2016, 03:01:52 AM »



. . .

WELCOME TO THE SAT COLLISION TUTORIAL BY ME, ENDESGA!



Let's kick this all off with a little backstory...
I've been programming for most of my life - ever since I was about 8-9, when my father showed me his ZX Spectrum. Now, I'm not your typical 24+ y.o. Professional Freelance programmer, but thanks to my father being a computer engineer who can program in HDL and C, in 10 years I went from "How do you make games?" to "I'm going to make this game, and I'm going to try to teach people as much as I know.", despite my father wanting me to program in Hardware (which is cool and all, but Game Development is a lot more fun for me!)

OKAY! So, now you know a wee bit about me, I'm going to explain as well as I can a system often not looked at. The Separating Axis Theorem, which can be used in collision - if done right, it can be incredibly efficient.

HOW DO WE USE SUCH A SYSTEM?!
Well, before I begin, I'm going point out that I use GameMaker. I've programmed in C, Python, Unity, Java, and GML has got to be my absolute favourite. It's powerful, fast, and super efficient. 'nuf said.

Let's begin.

We're first going to cover what would happen if the object (or player) is going in the RIGHT direction. This is because, this system is the same in all directions, it just checks different sides.
MAY I ALSO POINT OUT, THIS SYSTEM WORKS FOR PLATFORM GAMES AND TOP-DOWN!

THE THEORY:

For this explanation to work, you need to understand that the yellow markers at the top left of the player (red box) and solid object (blue filled box), along with the corresponding purple markers; are the coordinates for the rectangle.
KEY: A RECTANGLE CAN BE DRAWN FROM ONLY 2 POINTS
Notice the green arrow and marker? This is where the player WILL BE ONCE IT MOVES IN THE NEXT STEP. Think "It's position, plus it's speed.", so in both cases, the player has not collided with the solid. BUT, in the right diagram, they will. This is because originally the player is closer to the solid (Think of the left diagram as the step before the right diagram!)
So, now you know what is going to happen in the next step, let's throw in some code!
Code:
/// CREATE EVENT
// let's get the width of the sprite, we can be precise with functions,
// but you can also just use "sprite_width*image_xscale" etc.
bw = sprite_get_width(sprite_index)*image_xscale;
bh = sprite_get_height(sprite_index)*image_yscale;
hbw = (bw/2); // half of the sizes, saves math later on
hbh = (bh/2);

//top left
x1 = (xstart-hbw);
y1 = (ystart-hbh);

//bottom right
x2 = (xstart+hbw);
y2 = (ystart+hbh);
// Those 2 sets of coordinates are VERY important!
// and make sure your Player's sprite's origin is centred!

co = noone; // collide object
co_d = 0; //collide distance

hsp = 0; // horizontal speed
vsp = 0; // vertical speed

As you can see, we now have x1 (left), y1 (top), x2 (right), and y2 (bottom). And using these variables, we can calculate a collision INDEPENDANT from pixels. Which is pretty neat Coffee

Now you need similar code for the solid objects:
Code:
///CREATE EVENT

// The origin is the top left this time, so co-ords are different!
x1 = xstart;
y1 = ystart;

x2 = xstart+(sprite_get_width(sprite_index)*image_xscale);
y2 = ystart+(sprite_get_height(sprite_index)*image_yscale);


AND NOW THE MAGIC BEGINS!


In the "Begin Step" event, we need to check if the player has pressed a key. Then we check for collisions, and adjust accordingly!

THINGS TO NOTE:
  • There are a lot of comments, so try to read over them!
  • This is only for the RIGHT direction, so make sure you understand this, and I encourage you to try to do the rest!

Code:
///BEGIN STEP EVENT
//Make sure to read over this code, I'll try to explain as well as I can without getting in the way!

vsp += gravity_speed; // this is a hint as to how you would have gravity.

// If you're pressing right, accelerate. NOTE THAT THE MAX SPEED IS A DECIMAL NUMBER!
// The crazy decimal is just a proof of concept. You can have ANY speed you want.
if keyboard_check(vk_right) hsp = min(hsp+0.1, 2.4984705112)
else hsp = max(hsp-0.2, 0);

if hsp!=0 { // if we're moving
co = noone; // reset collide object
co_d = abs(hsp); // the max distance we can collide IS our speed

// IN THIS NEXT CODE, WE ARE FINDING THE CLOSEST COLLIDING OBJECT!

with(parSolid) { // rename "parSolid" to the Parent Solid object
if ((y1<other.y2) && (y2>other.y1) && ((x1<=(other.x2+other.hsp)) && (x1>=other.x2)) {
// Check if it's in colliding height, and check if it's left edge is less than or equal to the PLAYER'S RIGHT SIDE + it's speed.
// Also check if the solid's left edge is more than the player's right edge, to eliminate solids BEHIND the player having problems.
var _d = (x1-other.x2); // distance between the left edge and the player's right
if _d<other.co_d {other.co=id; other.co_d=_d;};
        // If the distance is LESS THAN the collision distance, make the COLLIDE OBJECT = this Solid's ID
}
}

        // if it has gone through ALL the possible solids, and there is one...
if co!=noone {
x2 = co.x1;
x1 = x2-bw;
hsp = 0;
// Make the player's RIGHT edge EQUAL to the collision object's LEFT edge.
// Then make the player's left edge equal the right edge - the width
// Make hsp = 0, stopping future movements and checks ("if hsp!=0" at the start)
}
else
{ // if we didn't collide with anything, move the player by it's speed.
x1 += hsp;
x2 += hsp;
};
};

THERE YOU HAVE IT!




This may seem pretty intense for some, but the purpose of this is the fact that it is VERY reliable, and in fact a lot easier for the computer to handle rather than pixel-perfect collisions!

"What do I do next with this?"

Use what I explained, to do the left, up, and down directions. Remember that if it's going left, the colliding edges will be flipped. Try to imagine what it will look like, and imagine how rectangles' axis overlap.
With this, you can do Jumpthrough platforms EASILY! Just make the JT Platforms only count as a solid if the player is going down (and not count all together for horizontal) - it's as easy as that.
You can also do slopes with some simple trigonometry, and using the "Y = mX + c" formula!

To do gravity and jumping, the code I use is similar to this:
Code:
//Before everything I add a gravity speed to vsp
vsp += 0.31;

//For jumping, all we gotta do is:
if keyboard_check(vk_space) vsp -= 6; // 6 can be whatever speed
//Simple stuff, but super useful!

I hope this helped, and if you have any questions, feel free to message me on Twitter

-ENDESGA  
« Last Edit: May 26, 2016, 03:18:22 AM by ENDESGA » Logged

TWITTER    |    NYKRA DEVLOG
Zorg
Level 9
****



View Profile
« Reply #251 on: May 26, 2016, 03:29:27 AM »

I have a question: why don't you use place_meeting? Or other built-in collision check functions, like collision_line or collision_rectangle?
Code:
// modify hsp according to keyboard input here
// horizontal collision check
if (!place_meeting(x + hsp, y, obj_wall)) { x += hsp; }
else { // handle collision }

I'm not saying it's better or worse to use built-in functions (actually i have no idea), i just want to hear your opinion. I tend to be lazy and use existing functions instead of writing my own. Smiley
Logged
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #252 on: May 26, 2016, 03:33:34 AM »

I have a question: why don't you use place_meeting? Or other built-in collision check functions, like collision_line or collision_rectangle?
Code:
// modify hsp according to keyboard input here
// horizontal collision check
if (!place_meeting(x + hsp, y, obj_wall)) { x += hsp; }
else { // handle collision }

I'm not saying it's better or worse to use built-in functions, i just want to hear your opinion. I tend to be lazy and use existing functions instead of writing my own. Smiley

Simply? Because pure math is magnitudes-times faster than built in collision functions. These collision functions base around boundary boxes, and generally pixel perfect boundaries. Place meeting also checks a lot of the area rather than just comparing edges.

I did a stress test for comparison, and this system of mine did little to no harm to the frames with 200 players, whereas the "classic GML" collisions had an impact to performance Smiley
Logged

TWITTER    |    NYKRA DEVLOG
Zorg
Level 9
****



View Profile
« Reply #253 on: May 26, 2016, 04:13:02 AM »

Thanks! I have additional questions regarding 'edge cases':



Left: Do you always check horizontal collision before vertical collision? This way it would be possible to "miss" a corner collision. Do you ignore this? I guess it can be ignored, because of the high frame rate and velocity constraints.

Right: What happens if you fall into a jumpthrough platform from the side. Do you perform an additional check in this case? For example, checking if the position (y, bottom) of the player was (visually) above the JT platform position (y, top) before the collision occured?
Logged
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #254 on: May 26, 2016, 04:28:42 AM »

Thanks! I have additional questions regarding 'edge cases':



Left: Do you always check horizontal collision before vertical collision? This way it would be possible to "miss" a corner collision. Do you ignore this? I guess it can be ignored, because of the high frame rate and velocity constraints.

Right: What happens if you fall into a jumpthrough platform from the side. Do you perform an additional check in this case? For example, checking if the position (y, bottom) of the player was (visually) above the JT platform position (y, top) before the collision occured?

Left: Yes, if you think about it, having the horizontal and vertical movement separate prevents odd movements. Remember in the code I state that if it collides (horizontally or vertically), the edges are now equal. There is mathematically no chance for the object to move inside the solid objects. Even if you have the vertical movement before the horizontal movements. So nothing to worry about here Smiley

Right: As I also stated, JT platforms are incredibly easy. In the horizontal code you have something like "if jt==0", where for the parent you put in the Create "jt = 0;", then for a child JT object, put: "event_inherited(); jt=1;"
With this, it will not interact horizontally with the JT platforms. You also need this if the player is going up. Because you only want to collide with JT platforms when going down.

Hopefully this helped!
Logged

TWITTER    |    NYKRA DEVLOG
Zorg
Level 9
****



View Profile
« Reply #255 on: May 26, 2016, 04:39:57 AM »

In my sketch, X marks the collision. Horizontal movement does not produce a collision with a JT platform, of course. But if you move into a JT platform from the side (like shown on the right) you are moving downwards, thus causing a vertical collision, don't you?
Logged
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #256 on: May 26, 2016, 04:45:30 AM »

In my sketch, X marks the collision. I know that horizontal movement does not produce a collision. But if you move into a JT platform from the side, like shown on the right, you are moving downwards, thus causing a vertical collision, don't you?

Yes, but one of the major parts of this system relies on the fact that you have to check the correct things. In this case, what you're saying can be easily resolved by checking if the original Y-bottom position is less that the Y-top of the solid, and if the Y-bottom PLUS the speed is more than or equal to the Y-top edge of the solid. We're assuming the player will not be in a solid block at all at any point. So to summarise, it just requires specific checks of positions to see where the player WILL be.
Logged

TWITTER    |    NYKRA DEVLOG
Zorg
Level 9
****



View Profile
« Reply #257 on: May 26, 2016, 04:54:45 AM »

Ah, okay, i get it, my bad. I know that you were checking the actual position+vsp for collisions, but i did not see that you are already checking if the current y-position (bottom) is visually higher than the solid's y-position (top). So you don't need any additional check. Thanks for your answers! Grin
Logged
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #258 on: May 26, 2016, 04:57:42 AM »

Ah, okay, i get it, my bad. I know that you were checking the actual position+vsp for collisions, but i did not see that you are already checking if the current y-position (bottom) is visually higher than the solid's y-position (top). So you don't need any additional check. Thanks for your answers! :-D

No problem! Believe it or not, the main check code within the with() actually covers the positions of the player. When converted for both directions, the code acts exactly the same. Then when adding the little "if jt==0" bits, things become super simple Smiley
Good luck! Let me know if you ever use this, and I'm here to answer questions if you have more!
Logged

TWITTER    |    NYKRA DEVLOG
ENDESGA
Level 2
**


Located on the first galaxy in the Heptaverse.


View Profile WWW
« Reply #259 on: May 29, 2016, 09:55:27 PM »




Yo wassup guys!
A few things have been going on, like the development of the main engine. But I've also been working hard on some sprite work, since I have a LOT to do.

I didn't want to give away too much, so I decided to whip up a tree for everyone <3

After Eo is finished and functional, I will start showing off game features!

Have a look:




-ENDESGA
Logged

TWITTER    |    NYKRA DEVLOG
Pages: 1 ... 11 12 [13] 14 15 ... 20
Print
Jump to:  

Theme orange-lt created by panic