Philomena open beta / breaking API changes New software powering Derpibooru. Read more
The 2020 Community Collab has begun! Join in for round four of our massive group collaboration image! Click here for more information.
Interested in advertising on Derpibooru? Click here for information!
Pony Palace, a Pony community that offers roleplay, games, voice chat, music, Art, etc. We are active and we appreciate having you. SFW and NSFW.

Derpibooru costs over $25 a day to operate - help 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:

not provided yet

Comments

Syntax quick reference: *bold* _italic_ [spoiler]hide text[/spoiler] @code@ +underline+ -strike- ^sup^ ~sub~
14 comments posted
platinumdrop's avatar
platinumdrop
Artist
An Artist Who Rocks - 100+ images under their artist tag
A Really Classy Artist - 250+ images under their artist tag

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;
}
Posted Report
platinumdrop's avatar
platinumdrop
Artist
An Artist Who Rocks - 100+ images under their artist tag
A Really Classy Artist - 250+ images under their artist tag

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.
Posted Report
platinumdrop's avatar
platinumdrop
Artist
An Artist Who Rocks - 100+ images under their artist tag
A Really Classy Artist - 250+ images under their artist tag

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.)
Posted Report
Background Pony #AF2A
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.
Posted Report