Pigs Run! -- Complete Game

Hi all! :smiley:

Here’s my really first 3D game i’m working on these days. I named it “Pigs Run!”.

The game is finally released and rather stable, but if you find any bug please let me know!

Download website:
http://pigsrun.sourceforge.net

The concept is very simple: there are some pigs running randomly in the fence and you have to right click on the one with the bell. Of course if you success, you’ll get points and the bell will change pig!

You’ll be able to use items that will help you (or will make things harder) during your catch. You can get them by clicking on the red box when it has a question mark on it.

Rules:

Right Pig: 100 Points
Wrong Pig: -60 Points

Arrow up Item: Speeds up all pigs
Arrow down Itme: Speeds down all pigs
x2 Item: Doubles the points you get (but not the points you lose)

Comments are welcome!

PS: My highest score is 13000. Can you do better? :wink:

Screenshot updated. I’ve also changed hosting site since the image had stopped working. :wink:

Looks like a cute, simple game. Good work!

It’s amazing what you can make in Panda3d in such a short amount of time and a little elbow grease. I rather love the engine myself, too.

Game released! :smiley:
After three weeks of work, it’s finally here.

Please let me know if you find some bug and… Have Fun!

just played and it’s really funny :smiley:
i love the smiling pigs!

little tip: loadPrcFileData needs to be called before importing DirectStart, otherwise it won’t have any effect

Thanks for the comment! :smiley:

Ah, I see. That’s why I coulnd’t make it work. However, I defined the same things also in the Config.prc file so that’s not a big problem.

However I’ll fix it when I’ll have some time. Thanks for the tip! :smiley:

I uploaded a new 1.1 version of the game in which i did the following:

*Replaced the bell with a red ribbon which is easier to see.
*Slightly reduced the running speed of pigs.
*Apported few fixes to the code.
*Used instancing for repeated geometry on the ground, with a substantial game size reduction (From 7 MB to 4MB).
*Used py2exe instead of packpanda to pack the installer with a 60% size reduction. (Installer is now 13 MB)

Good work.

I think this is exactly the kind of thing Panda3D needs. The engine is amazing and development is so fast, I sometimes don’t understand why new mini-games like yours don’t come out all the time. Good job. Thanks for sharing.

Thanks for your comment!

I agree with you, with panda3d you have incredibly fast development times but even so new projects pop up rarely here. :confused:

It took me about 2 weeks to make this game and considering that i had to do everything by myself i think it’s a very short time. I think it would have taken me months if i wanted to end up with the same results using an engine programmed in C++ or C#

By the way, i’m making some changes to the game and I’ll share the new version as soon as it’s ready. :wink:

i highly recommend you to add some lights (2 or 3 pointlights) around the scene to give the scene more volume. even without shadows, lights produce a nice effect, smoothing the visuals and making things more 3d. i’d recommend checking out this blender tutorial for a example setup:

http://montagestudio.org/tutorials-page/lighting/threepoint-lighting-setup-blender/

funny game. but my pigs are proving einsteins theory to be wrong. they are very fast. may it be possible you didnt take framerate into account when moving the pigs? :wink:

Agree with Thomas - It’s a nice game, but you do need to multiply self.accel with globalClock.getDt().

i’ve played around with the lights for some minutes, just to show you how it can change the look of the scene:

the changes:

    def loadLights(self):
        #Load lights
        dlight = DirectionalLight("Sun light")
        dlightnp = self.lighting.attachNewNode(dlight)
        dlightnp.setHpr(0,-50,0)
        self.fencenp.setLight(dlightnp)
        
        plight = PointLight('plight')
        plight.setColor(VBase4(0.8, 0.6, 0.6, 1))
        plnp = render.attachNewNode(plight)
        plnp.setPos(-10, -10, 10)
        render.setLight(plnp)
        
        plight = PointLight('plight')
        plight.setColor(VBase4(0.7, 0.7, 0.7, 1))
        plnp = render.attachNewNode(plight)
        plnp.setPos(10, -10, 10)
        render.setLight(plnp)
        
        plight = PointLight('plight')
        plight.setColor(VBase4(0.6, 0.6, 0.8, 1))
        plnp = render.attachNewNode(plight)
        plnp.setPos(10, 10, 10)
        render.setLight(plnp)

Thanks for the comments!

@ThomasEgi @pro-soft:

Yeah, I’ve already fixed this “bug” for the next release using taskMgr.doMethodlater(0.02, etc.) instead of taskMgr.add. But multiplying with globalClock.getDt() is a more correct way?

@Hypnos:

I’ve already tried to play with lights on pigs but as I painted the volume with a vertex paint, I liked the “toony” effect I got and I decided to make no use of lights.

Yes, globalClock.getDt() is the right way.
Remember the basic physics formula: Δs = v * Δt
Δs is the distance travelled, v the velocity, and Δt can be accessed through globalClock.getDt().

Okay, here’s the final version of my game! You can find it on the project website as usual.

I’ve made some important changes to the game concept as well. Now pigs speed up as player’s score gets higher, and if you manage to get a good score, well… there are a couple of surprises waiting for you. :smiley:

And of course, now pigs speed does not rely on FPS.

No that’s a one cute game!

Congratulations!

I wish I had such simple ideas…

Very Nice Game :slight_smile:

is this a 2d game or 3d?

Something between 3D and 2.5D, I’d say. The graphics are 3D, but the gameplay only happens in one plane, more or less.

BTW: congratulations to reviving a thread from 2009 :smiley: