Spherical forums

General Discussion => Off-Topic Discussions => Topic started by: DaVince on August 19, 2013, 02:43:32 pm

Title: Ludum Dare
Post by: DaVince on August 19, 2013, 02:43:32 pm
It's a 48 hour solo game creation competition that actually happens rather frequently (4 times a year I believe?). Thought I'd join in for a change.

The compo starts next weekend. Anyone else in? I'm thinking it could maybe make Sphere a bit more well-known out there, too! :)

http://www.ludumdare.com/compo/
Title: Re: Ludum Dare
Post by: Flying Jester on August 20, 2013, 08:01:44 pm
I just might. The themes all look quite interesting, and I'm always up for a game making competition!
Title: Re: Ludum Dare
Post by: Radnen on August 21, 2013, 06:01:50 pm
I might, I am busy this weekend, but I might do something for a change. I see in the rules that you can use a personal library; but I might not this time since it's not complete and you must share it with the community, and I don't want to share anything incomplete without promising I'll finish it - which I may not anytime soon.

I'm thinking of a rogue-like presentation, ;)
Title: Re: Ludum Dare
Post by: Flying Jester on August 22, 2013, 07:33:35 pm
There's also the jam going on there at the same time, you don't need to release the source code to anything with that. I think I may do that instead, depending on the theme. It really depends on what I choose to do, and if it could be done in 2 days or not.
Title: Re: Ludum Dare
Post by: Radnen on August 22, 2013, 09:05:21 pm
Jest: It's two days; so lower your expectations and make something simple, there is definitely not enough time to revolutionize a genre or theme - unless your the guy who made evoland. But, hey, your first time through would of course give you the insight in just how much needs to be done or how much you can do. I won't possibly have time squared away to do everything I want for me this may just be a 10 hour compo, there's no way I'll be active all 48 hours of it. A game that was made with a total of 48 man-hours would be rather nice, however.
Title: Re: Ludum Dare
Post by: DaVince on August 23, 2013, 08:30:13 am
10 hours, hm? That's could be quite pressuring. Luckily you can get good ideas outside the time you're working on the game.

Me, I'm going to dedicate my weekend to it! Wake up early (because the compo begins at 3am for me) and spend a good amount of that making something. :)
Title: Re: Ludum Dare
Post by: Radnen on August 23, 2013, 09:15:08 pm
It has started, I think. The website isn't responsive. Possibly due to the overload of people. I saw on Wikipedia, that the # of entries have gone up exponentially.
Title: Re: Ludum Dare
Post by: Flying Jester on August 23, 2013, 09:33:39 pm
Yes, I believe it has started. Very laggy for me too, but eventually it loaded. I suppose the theme will be "10 seconds".

A nice excuse to make a very, very short game!  ;D
Title: Re: Ludum Dare
Post by: Radnen on August 23, 2013, 10:52:18 pm
10 seconds here we goooooo!

Please don't do 10 seconds playtime, unless it's a fun repeatable skill-type game. :P
Title: Re: Ludum Dare
Post by: Fat Cerberus on August 23, 2013, 11:09:44 pm

10 seconds here we goooooo!

Please don't do 10 seconds playtime, unless it's a fun repeatable skill-type game. :P

Indeed, I could never get into the WarioWare series for that exact reason.  I honestly don't see the appeal of the "microgame" concept, but apparently it was successful enough that they ended up making like 5 sequels I think.
Title: Re: Ludum Dare
Post by: DaVince on August 24, 2013, 03:46:28 am
Lord English: might be different from person to person. I'm crazy about Wario Ware. But I'm not going to make something like that.
Also, I expected the theme to be 10 seconds, after those voting rounds... It was tweeted right on time too, so you didn't even need to check the site! Already made up a good idea before the compo even started. :)

Let's exchange profile URLs:
http://www.ludumdare.com/compo/author/davince/
Title: Re: Ludum Dare
Post by: Radnen on August 24, 2013, 04:08:39 am
I've been working hard-ly on this. :P

http://www.ludumdare.com/compo/author/Radnen/
Title: Re: Ludum Dare
Post by: Flying Jester on August 24, 2013, 11:26:46 pm
I too highly expected 10 seconds to win...it was pretty likely given the number of votes.

I like Wario Ware. FASTEST GAME EVAR!

I'm working on a maze-game based on my very vague (and after even the smallest amount research, completely inaccurate) recollection of the Atari 2600 game Reactor. In fact, I pulled out the ol' 2600, and realized I don't even know how to play Reactor for the 2600. I don't understand it in the slightest.

http://www.ludumdare.com/compo/author/flying-jester/ (http://www.ludumdare.com/compo/author/flying-jester/)
Title: Re: Ludum Dare
Post by: Radnen on August 25, 2013, 02:09:50 am
Currently I'm brick-walled by a gigantic sphere bug. When I reload the same map to reset entities their ON_CREATE is not being called a second time, even though it should (I'm forcing the calls). This is code that should work.

Edit: my issue has been solved. It was not a sphere issue, but a weird wrapping issue on my end, lol.
Title: Re: Ludum Dare
Post by: Radnen on August 25, 2013, 06:23:29 pm
Winding down now and ran into another issue. Sphere is definitely not made for fast competitions. This time my character is dying on one map even though another is loaded. I have never seen this issue before. This is the strangest thing. It's as if the last map was still in the background where the player is roaming around and dies, but I'm not on that map anymore.

Edit:
SHIT. In Sphere you cannot use SetPersonX/Y in a talk script, nor use the ChangeMap call. If you do use them in  a talk script you change map but the obstructions are not the same (still the old maps obstructions) and you are placed in some random corner (IDK how). My workaround: Put them into queued person scripts.

EDIT2:
shit. Still more issues. Now when I try teleporting you are sent back to the damn default start position. Nothing I try is working. SHIT.
Title: Re: Ludum Dare
Post by: Radnen on August 25, 2013, 08:25:02 pm
My submission has been made. :) Gosh I ran into a lot of strange sphere issues. Jesus!

Tell me when you are submitted, also what will make this work in Linux/OSX?
Title: Re: Ludum Dare
Post by: DaVince on August 25, 2013, 09:42:18 pm
I'm done:

http://www.ludumdare.com/compo/ludum-dare-27/?action=preview&uid=25741

Fun fact: I didn't run into any Sphere-related issues. No inexplicable bugs, just me goofing from time to time. Though tracking down my own bugs could take a while as some code really goes around. :P
Game should work in Linux, by the way... Well, Sphere 1.5 games do (made mine entirely in Xubuntu and the default editor, and I'll be checking how well your game works!)
Title: Re: Ludum Dare
Post by: Radnen on August 25, 2013, 09:54:50 pm
I updated my submission with bugfixes. I saw the 1 hour time to upload and thought: heck if I could fix an issue or two that'll be great. I don't think I broke a rule since these fixes are either cosmetic or small. I did fix an obstruction error that could happen that made the game somewhat unplayable (until you died). So that has been fixed.

Anyways I've put you guys on a blog post of mine. BTW DaVince, I loved your game. But I was right, you didn't have enough interesting stuff to make both modes enjoyable. It was kick-ass cyber-guy all the way... except for the start where the old man was indeed quite useful. ;)
Title: Re: Ludum Dare
Post by: DaVince on August 25, 2013, 10:10:29 pm
You're right about that. I wanted more old man gameplay, but alas, time constraints... The plan was to make his side really more puzzle-based and the other really more action-based. I also just think you have to wait for too long at times. :(

Just tried your entry. Holy crap is it hectic and difficult! Love all the little things the player character spouts, though from time to time it's unreadable.
Title: Re: Ludum Dare
Post by: Radnen on August 26, 2013, 12:29:59 am

Just tried your entry. Holy crap is it hectic and difficult! Love all the little things the player character spouts, though from time to time it's unreadable.


:P It's hectic because I try to turn some RPG elements on their head by giving the player 10 seconds of hp. Seriously had thoughts of using you as the boss monster again. It's not too hard though, you just got to be calm and try to use your death as an advantage. The save-stones are like the checkpoint saves of RPG's that use such a system. I try to show you how they can be (ab)used to further your game.

I'm definitely going to try and continue this game some day. :)
Title: Re: Ludum Dare
Post by: DaVince on August 26, 2013, 01:54:56 pm
I have uploaded all the submitted entries to the Downloads Drive (https://drive.google.com/folderview?id=0Bw-4UFVty4u1OFNSV2RJdnBuRzg&usp=sharing&tid=0B-5bW82jK5Z5UGZaS0c1OFJZZDA).

Hey FJ, what happened? In the end, you never submitted your game... Didn't have any more time to work on it?
Will you be releasing your maze game at a later point? And if not, it would be interesting if you shared what you have...
Title: Re: Ludum Dare
Post by: N E O on August 26, 2013, 04:01:56 pm
@Radnen - those Sphere bugs you encountered are exactly the kind of bugs we should hammer out of the official Sphere 1.6 beta so that 1.6 can finally leave beta status. Stuff like SetPersonX/Y should really be doable in a talk script (assuming the person being set is neither the input person nor the person being talked to), but I'm not sure about ChangeMap.

Please write a small demo where either or both of these are happening so that we have it around for posterity, file an issue on the GitHub repo, and I'll see what I can do about restoring the Sourceforge bug tracker as well, thanks! Maybe one where the ON_CREATE thing is happening too.
Title: Re: Ludum Dare
Post by: DaVince on August 26, 2013, 05:04:42 pm
Ooh, development and fixing of the official engine? That'd be nice! :)
Let's not forget the issue that apparently exists where calling GetPersonList() each frame crashes the engine! I remember something like that happening some time ago.

By the way, Radnen, how far would you say Sphere-SFML is along? Is it possible yet to compile it as a HTML project and see if our games will work in the browser? That would be super neat, I think.
Title: Re: Ludum Dare
Post by: Radnen on August 26, 2013, 05:10:51 pm

By the way, Radnen, how far would you say Sphere-SFML is along? Is it possible yet to compile it as a HTML project and see if our games will work in the browser? That would be super neat, I think.


It's not too bad right now but it won't be compiled to html yet. I can try to do a quick JSIL translation of it and test the waters so to speak. :)

Actually, running my game in it is showing some errors, so I'll fix those soon. Sphere-SFML was kinda put on the back-burner as I was busy, but now I think I'll try to tinker with it a bit more.
Title: Re: Ludum Dare
Post by: Flying Jester on August 28, 2013, 08:50:54 pm

Hey FJ, what happened? In the end, you never submitted your game... Didn't have any more time to work on it?
Will you be releasing your maze game at a later point? And if not, it would be interesting if you shared what you have...


I had to move back for college just yesterday, and I needed to prepare over the weekend. I got about halfway through making the game (it is, in fact, playable, but extremely difficult to understand and has only a quarter of what should be there), and then I just couldn't take any more time away from real life.

I do plan on releasing it pretty soon. It's pretty close to being done, and the tiny bit that is playable I actually find surprisingly enjoyable.


@Radnen - those Sphere bugs you encountered are exactly the kind of bugs we should hammer out of the official Sphere 1.6 beta so that 1.6 can finally leave beta status. Stuff like SetPersonX/Y should really be doable in a talk script (assuming the person being set is neither the input person nor the person being talked to), but I'm not sure about ChangeMap.


And also make it not overwrite SGM files? If TurboSphere, Sphere-sfml, and Radnen's editor could put more information in the file and not have it wiped out by the official engine, it would be very convenient (at least I know it would for TurboSphere). It would mean that I could elegantly make TurboSphere switch to a compatibility mode for games that do not use the constructor-style engine object functions--among other things.
Title: Re: Ludum Dare
Post by: N E O on August 29, 2013, 03:04:58 pm
Re SGM files - I'm thinking source/common/configfile.[ hpp|cpp ] and I originally thought about the game_information object in CGameEngine::Run in source/engine/engine.[ hpp|cpp ] but that's loaded as a standard CConfigFile and I'm not seeing any save or flush call of any kind on it. CGameEngine::Run does only actually load four of the six basic SGM keys (screen_height, screen_width, name, script) but description and author remain unaffected on engine close. More research seems needed here, I guess.
Title: Re: Ludum Dare
Post by: Fat Cerberus on August 29, 2013, 03:27:59 pm

And also make it not overwrite SGM files? If TurboSphere, Sphere-sfml, and Radnen's editor could put more information in the file and not have it wiped out by the official engine, it would be very convenient (at least I know it would for TurboSphere). It would mean that I could elegantly make TurboSphere switch to a compatibility mode for games that do not use the constructor-style engine object functions--among other things.


What I want to know is why someone thought it was a good idea to have the engine rewrite the .sgm file like that in the first place.  There's literally no reason for the engine to even open it in writable mode let alone rewrite the entire file.
Title: Re: Ludum Dare
Post by: Radnen on December 13, 2013, 09:25:05 pm
Should I start a new topic or no? The next LD is live the theme: You Get Only One.

Whose in it? I'll be, if I figure out something.
Title: Re: Ludum Dare
Post by: Flying Jester on December 14, 2013, 12:37:35 am
I'm out.

I'm just no good at quick compos. I need about a week to warm up and form my thoughts, and about two more weeks to flesh things out. It's not that I work slow...OK, yes it is.
Title: Re: Ludum Dare
Post by: Radnen on December 14, 2013, 03:33:14 am
Well I hardly had time to prepare too! I've just decided this last minute. Got my brother involved as prat of a jam team. :)
Title: Re: Ludum Dare
Post by: DaVince on December 14, 2013, 01:27:31 pm
Wow, time flies! I was planning to make a thread, but the compo is in full progress already? Too late for me and I have no time for it this time! Wish it was next week. :(

Good luck with the jam, though! I'll definitely vote for your entry. And I think making a new thread is fine, but at the same time, keeping it all in here makes sure all the old ones are easily accessible! So uh, you decide!
Title: Re: Ludum Dare
Post by: Mooch on December 14, 2013, 06:53:47 pm
Just played Flippin' Matrix. That's a really neat concept (switch realities every ten seconds) that could easily be drawn out into a complete game. I can see in my mind's eye all sorts of ways to expand the core gameplay element.

Can't wait for your zombie game, Rad.
Title: Re: Ludum Dare
Post by: Radnen on December 14, 2013, 06:56:21 pm
I won't split this thread since it seems I'm ythe only one in it this time, so I'll just hijack this to talk about my game.

Here is a screenshot of the progress thus far. My brother and I wanted to go for a LoZ styled theme, I think it's pretty good. The room is free for you to set up traps, and for you to fight the zombies. The idea is to survive.
Title: Re: Ludum Dare
Post by: DaVince on December 14, 2013, 06:57:16 pm

Just played Flippin' Matrix. That's a really neat concept (switch realities every ten seconds) that could easily be drawn out into a complete game. I can see in my mind's eye all sorts of ways to expand the core gameplay element.

Thanks. :) Not sure if I will ever turn it into something full-blown, though... (But feel free to take the idea if you want to!)

Edit: oh, new post as I posted this! Looks neat, very much like ALTTP! Do zombies just keep rushing at you, or is it more like Zelda in that regard that there's a fixed amount of enemies in the room?
Title: Re: Ludum Dare
Post by: Mooch on December 14, 2013, 07:07:11 pm

I won't split this thread since it seems I'm ythe only one in it this time, so I'll just hijack this to talk about my game.

Here is a screenshot of the progress thus far. My brother and I wanted to go for a LoZ styled theme, I think it's pretty good. The room is free for you to set up traps, and for you to fight the zombies. The idea is to survive.


How do you fight, melee or guns?



Just played Flippin' Matrix. That's a really neat concept (switch realities every ten seconds) that could easily be drawn out into a complete game. I can see in my mind's eye all sorts of ways to expand the core gameplay element.

Thanks. :) Not sure if I will ever turn it into something full-blown, though... (But feel free to take the idea if you want to!)


Even more useful, I'm gonna look at the code to see a complete, if basic, platformer done in Sphere. It's easiest for me to learn from real code than from piecemeal examples.
Title: Re: Ludum Dare
Post by: Radnen on December 14, 2013, 08:49:30 pm
So, the game, you fight by laying down traps. There may be projectiles soon, but for now that's what's planned. The enemies are not a set amount, they keep going until you die. So you need to set up the traps in a good way, get a good routine going and just survive. The top scores are kept in a highscore table.
Title: Re: Ludum Dare
Post by: Mooch on December 15, 2013, 04:18:32 pm
Sounds fun. Not enough games have "Endless Mode" anymore.
Title: Re: Ludum Dare
Post by: Radnen on December 16, 2013, 02:38:53 am
Check out our progress: http://www.ludumdare.com/compo/2013/12/16/progress-as-of-sunday-night/
Title: Re: Ludum Dare
Post by: Mooch on December 16, 2013, 08:44:59 am
You have to log into LD to comment, but do you have to log in to vote? It seems like it but I can't tell; not a good organization of information on that site.
Title: Re: Ludum Dare
Post by: Fat Cerberus on December 16, 2013, 11:09:41 am

So, the game, you fight by laying down traps. There may be projectiles soon, but for now that's what's planned. The enemies are not a set amount, they keep going until you die. So you need to set up the traps in a good way, get a good routine going and just survive. The top scores are kept in a highscore table.


So it's basically endless Tower Defense then, ala PvZ endless survival mode?
Title: Re: Ludum Dare
Post by: DaVince on December 16, 2013, 03:54:06 pm

You have to log into LD to comment, but do you have to log in to vote? It seems like it but I can't tell; not a good organization of information on that site.

Yeah, you have to log in. It's worth doing so for all the fun games in there, though.

Also, when you participate, there's a system where your own entry's "coolness" (overall rating) goes up if you're nice and actually play and review other peoples' games.
Title: Re: Ludum Dare
Post by: Radnen on December 16, 2013, 04:31:34 pm


So, the game, you fight by laying down traps. There may be projectiles soon, but for now that's what's planned. The enemies are not a set amount, they keep going until you die. So you need to set up the traps in a good way, get a good routine going and just survive. The top scores are kept in a highscore table.


So it's basically endless Tower Defense then, ala PvZ endless survival mode?


Well, you run around and attack with a sword. You can lay traps and bombs. The idea is to survive for a day. It's not a tower defense.
Title: Re: Ludum Dare
Post by: Mooch on December 16, 2013, 06:45:52 pm


You have to log into LD to comment, but do you have to log in to vote? It seems like it but I can't tell; not a good organization of information on that site.

Yeah, you have to log in. It's worth doing so for all the fun games in there, though.

Also, when you participate, there's a system where your own entry's "coolness" (overall rating) goes up if you're nice and actually play and review other peoples' games.


Can you sign up without actually submitting anything? I mean, I'd like to participate in te future, but I'm nowhere near ready. Still, I'd like to vote.
Title: Re: Ludum Dare
Post by: Radnen on December 16, 2013, 09:16:43 pm



You have to log into LD to comment, but do you have to log in to vote? It seems like it but I can't tell; not a good organization of information on that site.

Yeah, you have to log in. It's worth doing so for all the fun games in there, though.

Also, when you participate, there's a system where your own entry's "coolness" (overall rating) goes up if you're nice and actually play and review other peoples' games.


Can you sign up without actually submitting anything? I mean, I'd like to participate in te future, but I'm nowhere near ready. Still, I'd like to vote.


Absolutely!!

We just finished out game, Cellar Rush: http://www.ludumdare.com/compo/ludum-dare-28/?action=preview&uid=26346

It's been a blast. And it was a lot of fun. Very stressful near the end, though.

The biggest issue: fiddling with the execution time of Vanilla Sphere's crappy JS. I could not get any decent pathfinder to run well in real time, and with the lack of threading, it was impossible. Therefore, the enemy AI is very simple, sadly.
Title: Re: Ludum Dare
Post by: Mooch on December 17, 2013, 07:31:32 am
"This application has failed to launch because zlib1.dll was not found. Re-installing the application may fix this problem."
Title: Re: Ludum Dare
Post by: DaVince on December 17, 2013, 02:19:08 pm
Something I just learned...

(http://forums.spheredev.org/index.php?action=dlattach;topic=180.0;attach=354;image)

...Ah well. I'll just comment on it, then.
Title: Re: Ludum Dare
Post by: DaVince on December 17, 2013, 02:28:06 pm
I found a blind spot! You can just stand here and keep pressing the space bar. (Until I won and accidentally skipped the "You Win" message, anyway :P ).
Title: Re: Ludum Dare
Post by: Radnen on December 17, 2013, 04:25:16 pm

"This application has failed to launch because zlib1.dll was not found. Re-installing the application may fix this problem."


I have no clue what you are trying to do. Just extract into a new folder and play. It's really not that hard... Why are you always running into these DLL errors???


I found a blind spot! You can just stand here and keep pressing the space bar. (Until I won and accidentally skipped the "You Win" message, anyway :P ).


That's from the dumbed-down enemy AI. They used to perfectly find you, but only a single enemy could go on screen since it was too slow. The A* pathfinder was impossible to speed up in Sphere.

Performances of Pathfinders in Sphere:
- Kamatsu's (A*, priority queue): 950ms to traverse 100*100 map.
- Radnen's (A*, binary tree): 600ms to traverse 100*100 map.
- Beaker's (DFS): 400ms to traverse 100*100 map.
- Radnen's (sorted list + table lookup): 200ms to traverse 100*100 map.

These are remarkably slow. In a better language these should be magnitudes faster, especially the binary tree and priority queue, which should be near instantaneous for even 100000*100000 sized maps (due to log performance). I fully expected the sorted list version to be the slowest. Sphere just can't handle - at all - any complex data structures. I remember when Kamatsu made a quadtree in Sphere and couldn't get it to do something smart (pixel collision in his terrain tech demo), because it was just way too slow, despite being a perfectly good and efficient data structure to use.

Therefore, I'm definitely going to add A* pathfinding as a stock function call straight into Sphere-SFML.
Title: Re: Ludum Dare
Post by: Flying Jester on December 17, 2013, 05:10:20 pm
I wonder if the performance optimizations in typed arrays could help here? Although just using a modern JS engine (which you'd need for typed arrays) would probably be hugely beneficial in the first place.
Title: Re: Ludum Dare
Post by: DaVince on December 17, 2013, 05:31:57 pm
That is really too bad. Figured it had to do with the pathfinding, but I also thought I needed to let you know so you could add some blockable thing on tiles like those, maybe. (Bug fixes after compo is over are allowed)

Hmm, wouldn't these make good benchmarks for testing in TS and SSFML? Just so you can see the benefits already (and diagnose performance problems, if any). :)
Title: Re: Ludum Dare
Post by: Mooch on December 17, 2013, 06:45:17 pm

Something I just learned...

(http://forums.spheredev.org/index.php?action=dlattach;topic=180.0;attach=354;image)

...Ah well. I'll just comment on it, then.


Aww, what? Sucks.



"This application has failed to launch because zlib1.dll was not found. Re-installing the application may fix this problem."


I have no clue what you are trying to do. Just extract into a new folder and play. It's really not that hard... Why are you always running into these DLL errors???


Hey, it's not my fault. I downloaded the zip, I unzipped it into sphere/games/Cellar Rush, I double-clicked "game.exe," it threw an error at me. I tried opening the game in the Sphere 1.5 editor and running it from there, too, (which I had to do with another Sphere game that wouldn't work from it's exe). That didn't work, though.

Maybe it's my system, or I have a virus or something. I'm on an Acer netbook, if that means anything. Windows XP Home SP3, N450 CPU @ 1.66GHz, 1.66 GHz 0.99 GB of RAM.

I'll try downloading it to another computer later and let you know if it works there. Then we'll know if it's my machine.
Title: Re: Ludum Dare
Post by: Radnen on December 17, 2013, 07:08:40 pm
Well, Windows should be able to find dependent DLL's in the root directory of the executable. I double checked the zip, it's definitely there. You are using XP though, which is scary since it's old and not supported anymore (sorta until early next year, that is) by Microsoft. It is a nice game though. How is it you can't play this game, but other games? Oh, and this one is released with Sphere 1.6, it may not work at all in 1.5.
Title: Re: Ludum Dare
Post by: Mooch on December 18, 2013, 03:41:40 pm
Didn't get a chance to check it on my other machine, but I can already guess what went wrong -- somehow, the zip must've downloaded incompletely or something, because my zip doesn't have zlib.dll in it (checked all the folders, too).

Ah, yep! Downloaded it again, works now.
Title: Re: Ludum Dare
Post by: N E O on December 18, 2013, 03:41:58 pm

Performances of Pathfinders in Sphere:
- Kamatsu's (A*, priority queue): 950ms to traverse 100*100 map.
- Radnen's (A*, binary tree): 600ms to traverse 100*100 map.
- Beaker's (DFS): 400ms to traverse 100*100 map.
- Radnen's (sorted list + table lookup): 200ms to traverse 100*100 map.

These are remarkably slow. In a better language these should be magnitudes faster, especially the binary tree and priority queue, which should be near instantaneous for even 100000*100000 sized maps (due to log performance). I fully expected the sorted list version to be the slowest. Sphere just can't handle - at all - any complex data structures. I remember when Kamatsu made a quadtree in Sphere and couldn't get it to do something smart (pixel collision in his terrain tech demo), because it was just way too slow, despite being a perfectly good and efficient data structure to use.

Therefore, I'm definitely going to add A* pathfinding as a stock function call straight into Sphere-SFML.


I'll tell you what: I agree with you wholeheartedly and feel that having some pathfinding written natively into the engine for speed and exposed to the API is important enough that I will make an official recommendation for conditional pathfinding to be written into future versions and forks of the Sphere engine, starting as soon as possible. The conditions are:



So yea...pathfinding!
Title: Re: Ludum Dare
Post by: Flying Jester on December 18, 2013, 05:11:41 pm

Hmm, wouldn't these make good benchmarks for testing in TS and SSFML? Just so you can see the benefits already (and diagnose performance problems, if any). :)


I would like to try this.

I expect that simply using Jurassic and V8, with compiled JS and more advanced built-in optimizations, we will see at least an order of magnitude of improvement. I haven't seen any benchmarks for Jurassic, but V8 is known to handle large and complex data well. That's one reason it was chosen for Node.js.
Title: Re: Ludum Dare
Post by: Fat Cerberus on December 18, 2013, 10:44:36 pm

I'll tell you what: I agree with you wholeheartedly and feel that having some pathfinding written natively into the engine for speed and exposed to the API is important enough that I will make an official recommendation for conditional pathfinding to be written into future versions and forks of the Sphere engine, starting as soon as possible. The conditions are:


  • Pathfinding must be built into the map engine on a pixel level and a tile level (ie, TWO map engine pathfinding functions exposed in API, one for pixel level and one for tile level); ALL obstructions (sprite, tile, AND obstruction lines) must be taken into account in both cases, possibly with a toggle to ignore/not ignore triggers and/or zones in the calculations
  • Non-map engine pathfinding must be available anywhere else (ie, pass some network mapped obstruction list, start and end points, and return...something, probably the "shortest path" as an ordered array of nodes or something)
  • Any working pathfinding algorithms may be used, but we could probably conditionally branch which to use based on list size vs performance vs whatever other factors like how FFTW conditionally switches FFT algorithms


So yea...pathfinding!


Isn't pathfinding in pixel space incredibly difficult due to the sheer size of the search space?  From what I understand that kind of precision generally requires the use of waypoints or something similar, and that would require revamping the map engine, no?
Title: Re: Ludum Dare
Post by: Radnen on December 19, 2013, 01:05:56 am
It is possible to do that in pixel space with a gradiented pathfinder. I think part of my issues with pathfinding thus far in Sphere is that you can't expect pathfinding to go that fast, unless you use a very smart method like jump point searching. Even with JPS, it's still a crutch: you need multi-tiered pathing to do anything of the sort. All state-search AI methods are about reducing the size of the state space. JPS helps cut the search down, but what about the actual size? Multi-tiered pathing can help you find a broad, coarse path, which in turn is subdivided into smaller chunks, keep doing this until the pixel level and you should have a fast pathfinder (regardless you use JPS).

That said, pathing a 200x200 grid the old fashioned way should still be very quick, it's just that realtime, 'n' entity pathing is very hard, and made near impossible since you can't thread your code in Sphere.
Title: Re: Ludum Dare
Post by: Flying Jester on December 19, 2013, 04:04:06 am
You could still do calculations it breadth-first, per entity (each entity do x number of calculations per frame, where x is inversely proportional to the number of entities).