Jump to content

HackMan: PACMAN clone.. Take the challenge!


Ubbi

Recommended Posts

Good morning everybody,

I'm new to the forum and I'd like to show you my last creation as a presentation.

 

It is called Hackman, and it is a PacMan clone I've made while trying some OOP in Labview.

I have programmed chasing and moving methods as in the original arcade.

 

From the website http://hackyourpack.altervista.org/

you can download the executable... If anybody's interested I can provide source.

 

It is keeping track of the global high score.. so try it and put your name on it, so everybody will know your mastery!

 

 

Ciao!

 

Ubbi

Link to comment

Whoa... I wasn't expecting that kind of reaction.. but you're right.. why should you trust me..

 

Ok.. if you want to try and be sure I'm not stealin your soul, you can disconnect from the internet and play it offline..

It is just making 2 ftp call anyway (and you can trace it is pointing on the same altervista space), the first get the highest score, the second upload your highscore (only if you make it!).

I think you can also deny permission to go online, and it will work offline.

 

I'll post code soon, stay tuned :)

 

Ciao!

  • Like 1
Link to comment

hooovahh's post represented my immediate reaction to your offer; I look forward to the source.  Of course, why should you trust us?  Once we see how you did it, we can write whatever we want as a high score to the "altervista space". :D

  • Like 1
Link to comment

Hey sorry if I came across a bit strong.  The only time we generally get things posted here that are compiled binaries, its usually spam with some DLL to perform stuff on barcode scanners, and OCR for some reason.  

 

I haven't looked through the source much yet, but I saw a few cool things.  Like embedding the audio in the VI, sure it makes it a bit larger but the sound effects were small enough, and I like using a 2D picture control that gets redrawn.  I love using the picture control in ways that maybe aren't intuitive but make for a neat UI.  An alternative might be involving showing and hiding objects, or even moving objects like a button that looks like a pac man around the front panel.

 

Oh and I noticed you Exit LabVIEW when the VI stops running.  A better solution might be to see if the VI is in an EXE and then exit if it is, or do nothing if it isn't.  This way if you run from source when the VI stops running LabVIEW is still open.

 

Also I do hope that no one abuses your source and posts a high score of 2^32 or something.  And as for the FTP credentials, LabVIEW VIs can have password protected block diagrams, but according to NI R&D it is far less secure than you probably know.  I believe the quote had something to the effect that the amount of protection the block diagram password gives you, is similar to the amount of protection you get from tissue paper.  There are multiple ways to defeat this password protection, and it would give your online credentials to your FTP, to anyone who can defeat this tissue paper.  Not sure if there would be a good way around this, since if you just posted a VI with no block diagram, we would be back to square one where you would have a binary blob that is doing unknown things on our system.

Link to comment

Run and download a random EXE from a random site, which reportedly uploads data to a central location?  No thanks.  But if you are willing to post the source you should, either here or possibly in the code repository.

 

If it's good enough for Apple, Google and now Microsoft .......... :P

Link to comment

Wow thanks for your compliments.. They came boosted by the initial critics.. ;)

I'll consider for sure your advice and I totally agree with you about the security of hiding credentials in such a way.. I have thought exactly what you wrote but I was in a hurry to post you the source code to demonstrate my good will ;)

Sincerely I have nothing more than that hiscore on that website so if someone likes wasting his time to hack it .. well he's fully welcomed, I don't care.

I'll keep thinking about a better solution but it's not a high priority issue!

Thanks again..I hope to see your hiscore

Link to comment

Nice game.

Interesting design, any reason you created 4 different Ghost classes?

Inky is dependeny on Blinky, why

If you have ever played Pac Man maybe you have noticed that each ghost has its own personality (i. e. Chasing technique)

the base is common but they are choosing their target differently:that why I have made a different class for each one of them

Inky s target is dependin also on Blinky s position.

Ciao!

  • Like 2
Link to comment

Yes, Everything started with that article exactly... I've read it and I was thunderstruck.

 

For your info, there is no overflow error.. At first I wanted to introduce it, than I got bored and I had enough of all the rest :)

 

 

Sure, I've played it but never realized the ghosts behave differently :-)

I would still go with one single Ghost class and have different personalities/attribute to them.

That could be another implementation, but I wanted to make some excercize about classes, and inheritance and so on.. so I choosed to make more classes...

Link to comment
  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Ryan Vallieu
      I have seemingly found an issue with the shipping example code for Nested Malleable VIs.  Another user has verified that he saw the same behavior in 2019.
       
      I am working through the examples and the presentation from NIWeek 2019.  In running the Lesson 2b code (C:\Program Files (x86)\National Instruments\LabVIEW 2019\examples\Malleable VIs\Nested Malleable VIs) I found the Equals.vi in the class was not being leveraged and the search failed.  When I went to my LabVIEW 2018 machine and ran the Lesson 2b.vi the code worked to find the element by correctly leveraging the in-class Equals.vi.
      One difference I see is that in the 2018 example the Equal.vi is in the example folder with the code, and in 2019 the Equal.vi has been moved to VI.lib - otherwise the code looks to be the same.  The Equals.vi code looks identical, and the calling VIM look identical.  I posted on the LabVIEW NI.com forum here: 
      https://forums.ni.com/t5/LabVIEW/LabVIEW-2019-Malleable-VIs-Shipping-Examples-Lesson-2b-Nested/m-p/3966044/highlight/false#M1129678
       
      I am trying to determine what may have broken or changed between the implementation in 2018 and 2019, visually the code looks the same.
    • By Voklaif
      Hello all,
      I am programming with LabVIEW for around 2 years and was recently stumbled upon LVOOP.
      I am required to write a communication protocol to work with a micro-controller, which later will be also used for ATP and debug purposes.
      I want to build the program "correctly" from the beginning so it will be maintainable and flexible to additions and changes.
      My natural way of building a program would have been a queued state machine, with several loops, each loop is in charge of a different module (one for GUI obviously), but as I stated in the beginning, I want to use LVOOP.
      Does anyone have a LVOOP project I can use as reference? I've searched online and found some nice examples, but they are small and teach you the basic stuff.
      For me it's important to see the how to use the project tree wisely, where to place the classes, see the managing loop and to learn as much as possible before I create one of my own.
      Thanks in advance,
      Voklaif
    • By GregFreeman
      I have an array of classes, let's call the object TestPass, of size 1 (but it is an array because it can scale out to multiple test passes). In this class, there is one other nested class which is not too complex, then various numeric and string fields to hold some private data. There is also an array of clusters. In this cluster there is a string, two XY pair clusters, and an integer. Not very confusing.
      This array of clusters gets fairly large, however, upwards of 80-100k elements. What I am finding is when I index the array of pass classes it is crazy slow. On the order of 30 ms. Doesn't seem like much, but we are indexing the array in our method to "Get Current Pass" which is used in various places throughout our code. This is adding potentially hours to our test time over the 80k devices we are testing. 
      So, I started digging. When I flatten the class to a string and get the length, it's 3 mb. But, when I run the function with the profiler is is allocating close to 20 mb of memory!
      My gut feel was that the string is causing the issues. So I removed the string from the cluster and the index time went to 0 ms. 
      Luckily we can normalize a bit and pull the strings out of the cluster since a lot of them are duplicates. But it makes our data model a bit uglier. 
      Has anyone seen these kind of performance issues before? I saw them in 2013 and 2017.
    • By ted Francis
      I am new to LVOOP and have jsut started writing my first LVOOP program which I have attached.
      I would appreciate greatly help with the question I have
      Thank you in advance 
      Ted
      This vi will perform two tasks 
      1.Generating Report data sheet for metrology 
      2. updating the scales in a MAX .nce file
      1. Metrology will input calibration information into the tables on the tabs
      Metrology will then click "Update Tables" then "Create Report ( create report section of code is not yet written
      Update Tables will write all information entered in the tabs to class varaibles and will also delete current Max informatiomn
      2. Metrology will click "Load NCE Scale"
      vi will prompt for nce file to load and then once file is selected, display existing scales for two channels (Current Motor 1 and 
      Current Motor 2)
      Metrology will then click "Update Scales"  the program will replace the existing scales with those entered in Step 5.14 and 5.15
      from the tables on the tab
      Question 1.  Steps 5.14 and 5.15 are needed by both classes ( Table Variable and MAX) - what is the best way to share this information
       
      CAT0000032 Class Version.zip
    • By shoneill
      I was browing through the actor framework discussions on the NI site yesterday and I came across a statement by AQ.
      Never inherit a concrete class from another concrete class
      I had to think about that for a second.  The more I think about it, the more I realise that all of the LVOOP software I have been writing more or less adheres to this idea.  But I had never seen it stated so succinctly before.  Now that may just be down to me being a bit slow and all, but in the muddy and murky world of "correct" in OOP-land, this seems to be a pretty good rult to hold on to.
      Are there others which can help wannabe plebs like me grasp the correct notions a bit better?  How about only ever calling concrete methods from within the owning class, never from without?  I'm learning for a long time now, but somehow, my expectations of LVOOP and the reality always seem a little disconnected.  AQs statement above helped crystallise out some things which, up to that point, had been a bit nebulous in my mind.  Well, I say I'm learning..... I'm certainly using my brain to investigate the subject, whether or not I'm actually LEARNING is a matter for discussion... The older I get, the less sure I am that I've actually properly grasped something.  The old grey cells just seem to get more sceptical with time.  Maybe that in itself is learning...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.