PIRATES [ FULL SOURCE CODE + GAME ]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

PIRATES [ FULL SOURCE CODE + GAME ]

Post by jorgerosa »

PIRATES! - The Rescue... [ FULL SOURCE CODE + GAME ]

Hello all,

• I´ve developed a very small game for everyone at any age. No skills required, it has only 3 main keys: UP + DOWN + SHOOT.
• Its a very very earlier version, but should give you some entertainment already... I hope!...
• And since the main idea is PURE entertainment, (keep the children busy... and us too...), it was designed to completly avoid stress to the player (children), and the graphics are a try to be "cute" and friendly for both boys and girls... BUT without being too childish for us all too! :p
• So there is NO violence, NO time countdown, NO lives left, NO war sounds, NO limited "bullets", instead it only has some "funny" events (or tries to...) to keep the player smiling, it can even be played with one hand only. (Because I needed to use the other hand to hold my beer... Sorry, I mean, my little baby...)

Image URL: https://sites.google.com/site/jorgerosa ... oto-01.jpg
Image

Image URL: https://sites.google.com/site/jorgerosa ... oto-02.jpg
Image

Image URL: https://sites.google.com/site/jorgerosa ... oto-03.jpg
Image

• VIDEO #1: (The game is very different by now, but it should give you the main idea...)
https://www.youtube.com/watch?v=_wBOeY- ... yy6fHZYPTL
• VIDEO #2: (The game is very different by now, but it should give you the main idea...)
https://www.youtube.com/watch?v=q90ZsF- ... L&index=61
• VIDEO #3: (The lattest video...)
https://www.youtube.com/watch?v=4z64zWK ... L&index=63

-----------------------------------------------------------------------------------------
RECIPE INGREDIENTS:
-----------------------------------------------------------------------------------------
• Code::Blocks 17.12(IDE) - Using GNU GCC Compiler - http://www.codeblocks.org
• Bullet 2.87 (3D physics engine) - http://bulletphysics.org/wordpress
• Audiere 1.9.4 (Audio engine) - http://audiere.sourceforge.net
• Irrlicht 1.8.4 (3D graphics engine) - http://irrlicht.sourceforge.net
• Meshes created on: Autodesk 3D Studio Max 2017 & Blender 2.79 (Exported as ".X" for animated and ".OBJ" for static ones)
• Textures created on: Adobe Photoshop CS6 (64 Bits) & Gimp 2.10 (Text fonts exported as ".BMP" 24 Bits, transparencies and particles as ".PNG" and textures as ".JPG")
• Audio created on: Audacity 2.2.2 (Exported as ".WAV" 16 Bits PCM)
• And about 6 weeks to cook all the above stuff ... ... ...

-----------------------------------------------------------------------------------------
PIRATES! The Rescue...
-----------------------------------------------------------------------------------------
• Since all graphics are in 3D and it uses advanced 3D Physics too (Bullet), it may need a PC with some CPU power to run!... :(
• About ~130Mb files size ("Windows" game executable + Full source code + All the needed libraries + All working files, etc, etc... Its all included)
• Portable (No install is required)
DOWNLOAD: https://sourceforge.net/projects/pirates-the-rescue
-----------------------------------------------------------------------------------------

Have Fun!...

:)
Last edited by jorgerosa on Sat Dec 15, 2018 3:06 pm, edited 28 times in total.
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Re: Game: PIRATES! The Rescue...

Post by GameDude »

Looks pretty nifty. Just out of curiosity is the source code included?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Game: PIRATES! The Rescue...

Post by Mel »

Very neat! :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: PIRATES! The Rescue... [ FULL GAME ]

Post by Vectrotek »

Fantastic! :D Good job!!
:D :D :D :D
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: PIRATES! [ FULL CODE + GAME ]

Post by jorgerosa »

Thankyou all! ... I´m really glad to know that you liked it! :)
• I´ve cleaned the code, to be easier for everyone, so now the compressed ".ZIP" file contains:
The game executable (windows binary) + ALL the source code + ALL the needed libraries + ALL the working files, etc, etc... Its all included!
• The old ".ZIP" file was ~30Mb, but has now ~130Mb... Of course... Have fun! :)
kas1e
Posts: 212
Joined: Sun Jan 21, 2018 8:39 am

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Post by kas1e »

@All
I tried to port this game to AmigaOS4, and have 2 issues:

1). I do seems have issues with enemy detections : all my bulltes didn't hit enymy, and like hitting a wall, check this out:
https://www.youtube.com/watch?v=vpiD2jglFy0

Not sure what is that , but feels like signed/unsigned differences ?

2). I do have some big frame-rate issues when use in-game main shader for realisitc Water, this one:
viewtopic.php?t=23453

I.e. without shader enabled (as on video) i do have for example 45 FPS, while with shader enabled i do have just 12 FPS. Massive speed drop of course. So, i tried to understand why so , and seems that this shader (while being written there, on irrliht forum) is not very optimized ? At least, the things which we found with some help in fragment shader is :

---a. upvector does't depend on inputs, it could be defined as const vec3 outside the function.

---b. those 2 strings might be rewritten using mix:
vec4 combinedColor = refractiveColor * fresnelTerm + reflectiveColor * (1.0 - fresnelTerm);
vec4 finalColor = ColorBlendFactor * WaterColor + (1.0 - ColorBlendFactor) * combinedColor;
to:
vec4 combinedColor = mix(reflectiveColor, refractiveColor, fresnelTerm);
vec4 finalColor = mix(combinedColor, WaterColor, ColorBlendFactor);
Anything else which can be done to improve perfomance in shader ?

Also Is there a way to reduce details (vertices) somehow? For example, when water node is created by new ? I mean this piece of code in the game itself:

Code: Select all

/// NODE -> WATER: (Sea)
    /// TO-DO: THIS ONE CAUSES MEMORY LEACKS ON RELOAD !!!!!!! ...
    if(!waterNode){
    waterNode = new RealisticWaterSceneNode(smgr, 10000, 10000, "water", irr::core::dimension2du(512, 512), nodeLevel, -1);
    /// waterNode->setParent(nodeLevel); /// Attach to parent: Level
    waterNode->setPosition(vector3df(2500,0,0));
    waterNode->setRotation(vector3df(0,0,0));
    waterNode->setWindForce(10.0f);
    waterNode->setWindDirection(irr::core::vector2df(5.f, -5.f));
    waterNode->setWaveHeight(0.3f);
    waterNode->setWaterColor(video::SColor(0,50,50,50)); /// Black
    waterNode->setColorBlendFactor(0.15);

    /// Materials:
    waterNode->setMaterialFlag(video::EMF_LIGHTING, true);          // Node is affected by LIGHT?
    waterNode->setMaterialFlag(video::EMF_FOG_ENABLE, true);        /// Node is affected by FOG? - (Its the only node with the fog enabled)
    waterNode->setMaterialFlag(video::EMF_BACK_FACE_CULLING, true); // Render both sides !!! Affects water reflex !!!
    waterNode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
    /// waterNode->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, true); // Increase view distance quality (similar to sharpness)
    waterNode->setMaterialType(video::EMT_SOLID);
    };

Thanks for help !
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Post by CuteAlien »

If you use newer Irrlicht then the getVertexShaderConstantID calls can be buffered (as in result saved into an integer on first call and then work with the integer id). The string comparisons there can be expensive (which was the reason it got rewritten).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
kas1e
Posts: 212
Joined: Sun Jan 21, 2018 8:39 am

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Post by kas1e »

@CuteAlien
I am on 1.8.4 still, as 1.8.5 bring speed regressions in some parts (for example MeshViewer example start to be slower much).

Is getVertexShaderConstantID calls buffered since 1.8.5 ?

What intersting currently me most, is are there a way reduce details (vertices) somehow when we do "new RealisticWaterSceneNode" ?
kas1e
Posts: 212
Joined: Sun Jan 21, 2018 8:39 am

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Post by kas1e »

@All
How much FPS do you have with that game on your hardware ?
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Post by CuteAlien »

kas1e wrote: Fri Sep 09, 2022 11:52 am @CuteAlien
I am on 1.8.4 still, as 1.8.5 bring speed regressions in some parts (for example MeshViewer example start to be slower much).

Is getVertexShaderConstantID calls buffered since 1.8.5 ?
No, that needs svn trunk version.

My experience with slow meshviewer is that it's often not Irrlicht but the console output of the system that makes it slow (for example with Windows console). Maybe 1.8.5 does log a few more things? With slow console that could already be enough to make a difference (you can test that by reducing the log level).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
kas1e
Posts: 212
Joined: Sun Jan 21, 2018 8:39 am

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Post by kas1e »

@CuteAlien
As i remember it was "release" version tests, but i will recheck things with build latest trunk in next few days and provide all the info.
Post Reply