Click here to Skip to main content
15,891,942 members

Comments by petter2012 (Top 54 by date)

petter2012 19-Oct-17 12:26pm View    
Hi, Thanks Johannes!
Actually, calling my gameloop from the CompositionTarget.Rendering event does the trick. I have now successfully tried with 30 dynamic objects as well as 300 dynamic objects. The objects are not moving smoothly if I have 300 moving objects, but the time is accurate: I have run the game for four minutes (exactly, and the time is correct to the second (at least - I'm confirming with my cellphone's timer :) ).

I will write an article about y game engine within a few weeks hopefully. If anyone needs my code now, then just PM me or so.
petter2012 14-Oct-17 13:23pm View    
Hi,

Thanks, yes of course! I did notice the error message but had forgotten about ToList(). Instead I tried (List)bodylist... but it didn't work.

Thanks again.
petter2012 30-Jul-17 19:01pm View    
Hi again Bill,

Thanks for sharing your story about your teaching experiences.

I am now in the process of writing the documentation for the game engine, and just covered the connection to the OO paradigm. I have a modest suggestion: why not take part in this project and make this the go-to game engine for educational settings? :) I used to teach my students the Physics Helper wrapper (by Andy Beaulieu) and the underlying Farseer physics engine, but this engine is so much easier to work with, yet more flexible. In fact, I covered the entire engine code in a two-hour lecture. What it doesn't have is elaborate collision detection, but then again, that isn't really the point of this particular game engine.

It's really coming along well, and if you want to I can send you a pre-release zip file of my most recent game produced with it.

/Petter
petter2012 29-Jul-17 4:17am View    
Hi Bill,

Thanks for your (as always) well-put and informative reply. I found your reply in the link to be very interesting, though I think I might stick to the static class, as it does work after all, and isn't really abusing the OO concept (or so I think). I learned to program before OOP became a standard, and having worked with mainly WinForms and traditional ASP.NET, I have never had to really dig in to the more elaborate parts of the OO architecture.

Glad to see your comment on the game engine project. I thought that there would be little interest in (yet) another free 2D game engine. However, this game engine is NOT about speed/performance really. Instead, it's written for an educational setting (with no focus on OO obviously :) ). It's extremely flexible, as everything can control everything. For example, in my game called "Mario in Moria", Super Mario fires blue fireballs on goblins. The longer the fireballs get away from Mario, the paler they get (transparency changes). The damage to the goblin is in turn related to the opacity of the fireball. Also, since all objects have "hitpoints" (to use an old D&D term), everything can be damaged if so wanted. Thus, if Mario gets stuck in the Moria dungeon, he can always fire lots of fireballs to the stone wall to eventually destroy it.

A few months ago, my students (with very little programming knowledge) created all kinds of games including gravity, such as a soccer game, a few games where falling objects should be rescued, a space shooter, a "Pingu" game, and a great ninja fighter game. In the Ninja game, there were a lot of things going on (they too could fire shots), but performance was never a problem.

I plan to write an article about this game engine here on CodeProject, sometime after summer. The game engine was first written for UWP, but as we hadn't Win 10 installed at the university, I changed it to WPF. By design, there is really very little framework or language-specific code, so I guess that, for example, a Java developer could translate this very easily to Java, or perhaps just use things like the (rather basic) Physics file for inspiration.

In addition to education, I also think that this game engine could come in handy for game designers who may work with other people who do the real coding. In such a scenario, this game engine could be suitable for prototyping, especially for games that aren't traditional in type (since its best feature is its flexibility). Since the code is so short and comparatively easy, there would be no abandonware risk - it's not difficult to add one's own physics code or the like. BTW, I hope that others will be wanting to add their own methods to this game engine, so that it can thrive and become more powerful than what I can hope to accomplish myself.
petter2012 12-Jul-17 4:53am View    
I found an answer in the Design forum (there is no such software). This question can be closed or even removed.