Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / What basic engine would people like to see developed?

Author
Message
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 12th Dec 2019 21:00
I wonder, why there is no GetSpriteHitSprite(SpriteID) returns the first SpriteID that is hit, or 0 if non Sprite is hit

We have:
GetSpriteHitTest(SpriteID, x, y)
GetSpriteHit(x, y)
GetSpriteHitGroup(group, x, y)
GetSpriteHitCategory(categories, x, y)


If we have a grid, it would be no problem, the question is, would it be possible, to have a rotated Sprite surface and maybe a player without the need of Box2D or somewhat, and be able to check, if a collision is there and when, with what Sprite?

For a Mouse-Pointer it is possible to use GetSpriteHit(x,y) and I would get the SpriteID, what if my MousePointer, would be a Circle. Can't I ask, if my Sprite on position X, Y is hitting "something" and please tell me, what ID this colliding Sprite has?

We have some other commands:

GetSpriteCollision (SpriteID1, SpriteID2)
GetSpriteContactWorldX ()
GetSpriteContactWorldY ()
GetSpriteContactSpriteID2()


Maybe I am looking for GetSpriteContactSpriteID2()
"Returns the ID of the other Sprite involved in this contract."

But in which contact? It is under 2DPhysics, so I guess, it works only with Physics-ON.

So I guess, I would use a combination of a Grid-Array and ask for integer GetSpriteCollision( iSprite1, iSprite2 )
If I am in a specific Grid-Sector / field.

But still don't know, if a rotated Sprite could be detected acuratly this way.





Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 15th Dec 2019 19:53 Edited at: 15th Dec 2019 20:21
Used an array for collision.



Arrow keys to move. Tried to solve the collision with an array. (like here in C++ Code-It-Yourself! Simple Tile Based Platform Game #1 from javidx9)
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 19th Dec 2019 04:48
I know I am late to the party. Have been working, and that kinda bs.

I need help with AI movements. I can't get it down. Honestly, its made me stop programming, altogether. There is so little info out there. I have no idea what I am doing. I get the macro part. But, I can not perfect the minute important stuff. Its got me really down. I haven't touched AppGameKit in like 6 months, because I can't figure this out.
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 19th Dec 2019 23:21
I'm going to take a break from the world builder over Christmas, so will have a bash at a per pixel, shader based sprite collision checker. I've thought it out in my head, and it should be plenty fast enough for multiple checks on a mobile I think. So for me theres two types: how far below point Y is the ground, and has one sprite collided with another for bullets etc.

Golelorn, what kind of AI movement? Tjeres a couple of A* payjmapping style algorithms in the forums already, and sure someone did flood filling aswell.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 20th Dec 2019 12:53
@Golelorn
Yeah, sometimes it could be very hard. I also miss some examples for easy games like Platformers, and there is Game Maker Studio a little bit better also with YouTube tutorials.

@Santman
Would be nice, to have some basic Platformer, maybe with an enemy, or some ladders or what. I know, it is all possible with arrays and block-tile-based layouts.

And seeing *A in action in App Game Kit would be also very cool. Could be used for so many game styles. Puzzles, Strategy and others.
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 20th Dec 2019 13:19
A basic 2d platformer? I did one before and uploaded the code, will dig it out.

I also have an A* routine in two flavours that I can upload, one is a single process, the other works like threading so that complex routes can be done over multiple frames if needed.

Will try and do them later.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 6th Jan 2020 20:25
@Santman

I saw that. Maybe that could inspire us. But it is tilebased.

Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 6th Jan 2020 20:52
Is that your game Xaby? That's awesome - I especially love the sound effects of the torches being lit.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 7th Jan 2020 08:18 Edited at: 7th Jan 2020 08:20
@Santman,

no, is not mine. But would be nice, to have a blue-print for such game. I started out with some tutorial in C++ and got it also working in App Game Kit Tier 2 C++, and also tried to re-do it in AppGameKit Tier 1 Basic. An RPG and a Platformer are nearly the same, if you only add graivity.
At the moment I will finish my Bomberman-Clone and after that, I will try a platformer, also tile-based.

My dream would be something like "Rayman Legends", I could create some graphics in photoshop, and also placethem with my own "leveleditor", but still don't know, how I would do the collisions in the best way. It is much more easy in a grid, where you know, that you only have to check some of the moving objects against the 4 directions.
But maybe it would be the same with free-rotated Sprites. And my moving NPCs and and Player-Characters would need about "8" colliders, or maybe only 4 without the edges. Or the best way for that would be, to use Box2D build in functions. Can't tell. I guess, slopes are also possible with tile-based collisions.

That was my project
https://forum.thegamecreators.com/thread/225169
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 7th Jan 2020 08:50
Well, over been kinda busy with the world builder but now that's been shelved I'll come back to this thread, and have a look at my platform game code. Something like Rayman would be fairly easy now I think.....I'd use 3D and just make a shader to reduce the Z buffer to flat (I have one alreasy), sonit would look 2D but would give perfect 3D collisions.
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 14th Jan 2020 23:54 Edited at: 15th Jan 2020 00:02
A* is just the beginning.

The mobs have to travel around each other, travel around obstacles in a sensible fashion, and surround a target that might be changing position constantly. I have some videos on here of what I have been able to do, but its not good enough.
https://forum.thegamecreators.com/thread/224645

The bottom one is pretty much where I am stuck. I took a break form it, and can't get motivated to get back to it.

Login to post a reply

Server time is: 2024-11-25 16:59:58
Your offset time is: 2024-11-25 16:59:58