Hack Forums
[.NET] Pac-man'ish Game Manager [GDI] with Script Driven Entity - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Pac-man'ish Game Manager [GDI] with Script Driven Entity (/showthread.php?tid=4374080)



Pac-man'ish Game Manager [GDI] with Script Driven Entity - TheBarret - Aug 2, 2014

With this project my aim was to see how i could extend the "movement" of let say enemy entity's
acting as enemy or whatever you decide.


So if you have followed my past script engine series, there was this odd-ball mover ,
that was my base and you could read that the project and script engine required a small class
that acts as pipeline between the project and engine.

The script looks as follows (rly easy!):

[Image: 9v1X4pi.png]


The Up, Down, Left and Right can actually be defined as variables, so you could do

Code
Go(Up);

Anyway, with some tinkering with my skill, i managed to produce this idea:

[Image: 2DUXivP.png]


The blue'ish ghost is the enemy entity that moves randomly driven by the script and also avoids walls and such.
Based on this im pretty sure i could produce a player interface that move's a pacman'ish entity arround the map.

I add the source for this build (still version 1.7.1)
ive made some fixes as well in the core engine with some flaws i noticed also the "Switch" syntax is in there but not rdy yet.


Source download: Link

Credits for the RoundRectangle Extension class:
Arun Reginald Zaheeruddin
I modified his version a little bit to my demands.


Tinker away my fellow coders, got qeustions feel free to ask.

(Remark for: Cornflower, if you start bothering me again with fps and p/invoke gdi, i dont care, alright?)

Greets - Barret 🎉


* - Cornflower Blue இڿڰۣ-ڰۣ— - Aug 2, 2014

102 fps, you should limit it to 60, you're just wasting CPU cycles, most peoples screens can't refresh more then 60.

Guess you're are using shitty graphics.drawimage, and not p/invoke?

Spoiler (Click to View)


* - á’ªeumonic - Aug 2, 2014

(Aug 2, 2014 04:54 PM)Cornflower Blue Wrote:  102 fps, you should limit it to 60, you're just wasting CPU cycles, most peoples screens can't refresh more then 60.

Guess you're are using shitty graphics.drawimage, and not p/invoke?

Spoiler (Click to View)

You rude...or naw? Chill out dude. At least he is being creative and original, unlike 90% of the rest of this section.


* - Cornflower Blue இڿڰۣ-ڰۣ— - Aug 2, 2014

(Aug 2, 2014 05:36 PM)á’ªeumonic Wrote:  You rude...or naw? Chill out dude. At least he is being creative and original, unlike 90% of the rest of this section.

It's a joke between me and Mr B, and yeah you're right.


* - NETExplorer - Aug 2, 2014

(Aug 2, 2014 05:36 PM)á’ªeumonic Wrote:  You rude...or naw? Chill out dude. At least he is being creative and original, unlike 90% of the rest of this section.

First time I see you here in a while.


(Aug 2, 2014 04:54 PM)Cornflower Blue Wrote:  102 fps, you should limit it to 60, you're just wasting CPU cycles, most peoples screens can't refresh more then 60.

Guess you're are using shitty graphics.drawimage, and not p/invoke?

Spoiler (Click to View)

My first reaction to Barrets remark on the OT and your reply was to skype you

But then I remembered that we aren't talking :/


* - nuk - Aug 2, 2014

I can never get enough of your coding sir. Just original and useful stuff banging out left and right! I keep a box of Kleenex Tissues when I see you as the OP of a new thread ;)


* - á’ªeumonic - Aug 3, 2014

(Aug 2, 2014 05:40 PM)PatPositron Wrote:  First time I see you here in a while.

I know bro. It's been a while. I'm trying to get back into HF and coding.


* - NETExplorer - Aug 3, 2014

(Aug 3, 2014 12:17 AM)á’ªeumonic Wrote:  I know bro. It's been a while. I'm trying to get back into HF and coding.

Well, I can't say I'm not happy about you coming back :)

Recuperare theme was probably my favorite out of all of yours