Interested in advertising on Derpibooru? Click here for information!
Ponies Online! - April 13-14

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Description

I didnt forget the project. I try to wake it up. More enemies, a.i., sounds, music, etc. coming soon I hope.

Source

Comments

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide

platinumdrop
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Chaotic Little Trees - 1000+ images under their artist tag
A Really Hyper Artist - 500+ images under their artist tag
A Really Classy Artist - 250+ images under their artist tag
An Artist Who Rocks - 100+ images under their artist tag
Artist -

Immortal spirit
the 2d box collision is the following:
 
if box a maximum x smaller than box b minimum x  
OR  
if box a minimum x larger than box b maximum x  
the boxes are away from each others, collision false;
 
if box a maximum y smaller than box b minimum y  
OR  
if box a minimum y larger than box b maximum y  
the boxes are away from each others, collision false;
 
if we are here, we have only one case left, collision detected, because the minimum x or maximum x is between the minimum and maximum x and the minimum y or maximum y is between the minimum and maximum y
 
how this looks as code? (just quickly, i hope its correct xD)
 
 
class vec2  
{  
public:  
float x;  
float y;  
};
 
class box  
{  
public:  
vec2 pos;  
vec2 vol;  
};
 
bool interBoxes(box _a,box _b)  
{  
if( _a.pos.x___a.vol.x<=_b.pos.x~~_b.vol.x||_a.pos.x~~_a.vol.x>=_b.pos.x___b.vol.x )  
return false;  
if( _a.pos.y___a.vol.y<=_b.pos.y~~_b.vol.y||_a.pos.y~~_a.vol.y>=_b.pos.y___b.vol.y )  
return false;
 
return true;  
}
Background Pony #C759
Nicely done!
 
Nice to hear you’re using A* for pathfinding.
 
Keep up the good work!
platinumdrop
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Chaotic Little Trees - 1000+ images under their artist tag
A Really Hyper Artist - 500+ images under their artist tag
A Really Classy Artist - 250+ images under their artist tag
An Artist Who Rocks - 100+ images under their artist tag
Artist -

Immortal spirit
@BitAssembly  
I wrote a 2d/3d library for practice years ago, so I had everything to make my own engine. I call it Code Pony game engine, and try to make it modifiable.
 
Drawing: OpenGL, sound: OpenAL + vorbisfile. Own math library and own physics, pathfinding: a-star algorythm implementation, own path map and a.i. implementation.
 
 
I recruit 2D artists, and a music producer in a hungarian group now, the following roles are open yet:  
-artists / animator  
-someone responsible for collecting sounds  
-dialogue writer (and designing / using ocs)  
-music producer  
-mapper
 
the project is non-profit.
platinumdrop
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Chaotic Little Trees - 1000+ images under their artist tag
A Really Hyper Artist - 500+ images under their artist tag
A Really Classy Artist - 250+ images under their artist tag
An Artist Who Rocks - 100+ images under their artist tag
Artist -

Immortal spirit
@Background Pony #5F93  
Its a complex question, First I save the positions, i detect separated the 2 axises (x,y), first trying to move at x, if i detect hit, i replace the x value by the wall and the players x volume. Same for the y axis.
 
I made different cases when the “box” y velocity is + (it goes up) or -, (it goes down) so i know if the player hits the ground or the ceiling.  
Then i apply onGround to the character if hits the ground. canJump=true, etc.
 
This repeats in normalized steps while the velocity x and y (separated) > 0
 
The engine is written in c____.
 
(i hope its clear, my english is bad, i learned it from video games.)
Background Pony #0DC8
I have a question. How do you handle hit detection? I’m budding programmer trying my hand at coding and I’m wondering how you in particular deal with hit and ground detection.