Allegro.cc - Online Community

Allegro.cc Forums » The Depot » Deluxe Pacman 2 updated

This thread is locked; no one can reply to it. rss feed Print
Deluxe Pacman 2 updated
Neil Roy
Member #2,229
April 2002
avatar

This seems too empty so...

My Deluxe Pacman 2 game (Allegro 5 + MinGW) was just updated with the newest Allegro 5 build (thanks Edgar) and is available along with older versions here for free, if you're curious. No strings attached, I mainly made it for my wife years ago.

http://home.cogeco.ca/~nroy15/games_index.html

Gameplay video...

video

Note: the above video was recorded with NVidia's Share (ALT+Z to bring up the interface), for anyone curious.

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

Seems like a fun game. Too bad I'm banned from playing it. ::)

Neil Roy
Member #2,229
April 2002
avatar

;D

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

Silliness aside, I really do enjoy Deluxe Pacman 2. When I first played it, I expected it to be a one-to-one clone of Pac-Man; but to my surprise, it was so much more! You've really done a great job at improving upon the classic Pac-Man formula. Movement is smooth, the sound effects are nice, and the items are a blast to collect. I played for a few hours the other night and was surprised at how much new stuff the game kept throwing my way. Well done! :)

Neil Roy
Member #2,229
April 2002
avatar

Thanks. It's been fun to work on. Did you like my Bible in there? :)

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

I sure did! I like how it protects the player. :) The one power-up that threw me off though was the skull. I should've known better. :P

Neil Roy
Member #2,229
April 2002
avatar

Yeah, you just needed to read the HELP section, it describes all of them... well... except the skull, it just says "Guess" beside it. ;D

The reason why I threw the skull in there was because I figured with the question mark tool, which gives you one of the tools at random, I figured there needed to be some risk grabbing it. So one of the tools there is a risk of getting is the skull. :)

Have you tried the level editor yet? It's in there too and very simple to use, you just pick a line set and draw (left mouse button held down and drag).

I wonder if I could make a Javascript version of this? I only played around with Javascript a little one day when I follow3ed a Youtube tutorial on it.

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

Yeah, I've tried the level editor. It's surprisingly easy to use and works well. I'm not a very good level designer though, but that's my own problem. :P

It's definitely possible to make a JavaScript version of Deluxe Pacman 2. C/C++ and JavaScript are different in a lot of minute ways though, so depending on what your code looks like, it might require a lot of rewriting.

If you're interested in going deeper into JavaScript, I recommend watching some tutorials on YouTube to learn the ins and outs of the language. Much of it is similar to C, but it has its own quirks. It's an easy language to get into if you've already mastered C though. Anyway, once you've got JavaScript as a language down, I recommend looking into the canvas API (which is what I use), or looking into a library that abstracts all of that for you.

Feel free to shoot me a message if you have any questions about JavaScript and/or the canvas API. I'd be more than happy to lend a helping hand.

Neil Roy
Member #2,229
April 2002
avatar

The tutorial I already followed (and programmed myself while watching it) used canvas where he had you make a simple JS game, whack-a-mole. :) I did like how programming with canvas worked.

I'm mainly a C programmer (not C++, I do pure C, with a C compiler) and have always loved it. My games are all in pure C. I usually program with the 2011 C standard, which is what I did with this, though I don't think I used any 2011 specific code (using commandline "-std=gnu11" which is the 2011 C standard with gnu extensions). I am not a fan of classes, I actually enjoy seeing if I can do stuff in C that is similar to C++. I liked C++ vectors for example, and I wanted a stack style function (you know, with PUSHing and PULLing to and from the stack), so I wrote my own in C (I used it in DP2). Worked well and I was surprised at how easy it was to implement, so long as you're comfortable with pointers and allocating memory, which seems to frighten C++ programmers to no end, ;D.

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

Neil Roy said:

I liked C++ vectors for example, and I wanted a stack style function (you know, with PUSHing and PULLing to and from the stack), so I wrote my own in C (I used it in DP2).

Wow! :o How long did that take you to implement?

The biggest fundamental difference between C and JavaScript is the lack of pointers and references in the latter. You can pass by reference in JavaScript if you turn variables into object literals (which are kind of like structs) first, but it's not the same. So anything that uses a pointer or a reference would have to be rewritten in JavaScript.

Somewhat related, I tried recreating the API and functionality of Allegro 5 in JavaScript a few months back. It wrapped around the canvas API and I called it "allegro5.js". I stopped developing it when I hit a major snag in creating an event-driven system for inputs though. That's when I started my own library, Momo, which handles inputs more like Allegro 4 did. Check it out if you're interested. I got tired of writing lots of boilerplate code all the time, which prompted me to wrap it all in a small library.

Neil Roy
Member #2,229
April 2002
avatar

Wow! :o How long did that take you to implement?

An afternoon, just a few hours maybe? I attached a Code::Blocks project I created at the time to test it out as I created it, it has the source etc... if you're curious. I modified this and simplified it for my game, but this is essentially what I use in my game.

I did get some help understanding certain aspects in these forums, so it may have been a day or two, but total time wasn't that much and I probably spent more of that time implementing it in my game, as I had to rewrite large portions of my code to accommodate this new way to do things.

---
“I love you too.” - last words of Wanda Roy

SiegeLord
Member #7,827
October 2006
avatar

Always nice to have a completed, polished game made with Allegro. Too bad I suck at Pacman... died on the second stage >_<.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Neil Roy
Member #2,229
April 2002
avatar

The second level was one of those levels I specifically designed to be cleared a certain way. You do each corner in order. Eat a power pill, clear the ghost spawn area and dead end while they are blue. Then move to the next corner, eat a powerpill... repeat for each corner and it is easy. Pickups/powerups and blue ghosts are mostly a distraction that will kill you if you chase after those points rather than clear the level.

With that said, I suck at my own game as well! ;D :D

For a challenge, play it on hard, the Ghost AI on hard is TOTALLY different. I programmed HARD mode so the ghosts actually act much like the arcade game's ghosts. There no randomness to them at all on that mode, but they all behave a certain way (based on the original arcade behaviour, which I researched). It may even be easier for some people once you understand how each ghost moves. Red will always chase you down on hard, other ghosts will come so close to you, then move away, some will try and get ahead of you and intercept you etc... it was fun to code anyhow. Also remember to press CTRL to move faster (uses the orange energy bar up). It can be handy to get out of sticky situations.

Lately I have been thinking of maybe doing an isometric Berzerk style game, but with some new twists. Not sure, my creativity seems to be wasting away these days.

Deluxe Pacman 1 = Allegro 4 (started out as an Allegro 3 game on DOS).
Deluxe Pacman 2 = Allegro 5 (current version)

Both are as complete as they will ever be. :)

I do have several other games I made with Allegro, but none of them are quite completed. My first Allegro game ever was "Deluxe Artillery Duel". It is playable and almost complete. I wanted to add more to it and the AI isn't the best. Two player mode is complete. You can play against teh computer, but the CPU plays a bad game, getting the AI right is a real challenge. I never did complete it, though I thought about resurrecting it and trying again as I was proud of how it turned out.

I also have a Tetris style game I made (called "Bloc!" because I suck at game titles too), with a twist. As you form each line, you reveal a little more of a picture in the background. The game being complete when you reveal the entire picture. It is playable, but doesn't have a scoring system in place.

And probably a dozen more half-done games I should probably pick one and finish one of these days. My Speedhack entry is complete too (Apollo 29)! :)

I have some non-Allegro 3D stuff I keep playing with, but don't know what to make with them. One is a 3D terrain program made mainly just with Windows code (winmain et all) and OpenGL. I'm a master of unfinished games! :D

---
“I love you too.” - last words of Wanda Roy

Ariesnl
Member #2,902
November 2002
avatar

You should build an arcade cabin for it.. ;)

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

Neil Roy
Member #2,229
April 2002
avatar

Ariesnl said:

You should build an arcade cabin for it.. ;)

That would be awesome, not sure where I would put it in my tiny apartment though. But I love the idea. :)

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

You could make a mini arcade using a Raspberry Pi. Allegro 5 works on Raspberry Pi, after all. ;)

LennyLen
Member #5,313
December 2004
avatar

Neil Roy said:

That would be awesome, not sure where I would put it in my tiny apartment though.

Maybe just make the frame for the screen and the joystick area, and wall mount it.

edit: I just saw this while watching Eric's video.

Neil Roy
Member #2,229
April 2002
avatar

Quote:

edit: I just saw this [www.youtube.com] while watching Eric's video.

Very nice! Love LGR.

I had a friend of mine build an arcade cabinet, both the upright style and the tabletop style. He done it all himself and wired up a PC inside with arcade controls etc... and MAME emulator. Was pretty kewl. I have an extra PC (or two) here, I should maybe try my hand at wiring up something simple.

I may even program a new version of the game, an arcade style version could be fun. Without the main menu and all that but just what it would be like if it were inside an arcade machine could be fun. Hmmm...

---
“I love you too.” - last words of Wanda Roy

SilverTES
Member #16,572
October 2016

Really nice game (a bit hard for me ^^) , well polished, I love the editor too, very smart and user friendly.

Go to: