Page 1 of 1

PIRATES [ FULL SOURCE CODE + GAME ]

Posted: Wed May 09, 2018 2:07 am
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!...

:)

Re: Game: PIRATES! The Rescue...

Posted: Wed May 09, 2018 6:24 am
by GameDude
Looks pretty nifty. Just out of curiosity is the source code included?

Re: Game: PIRATES! The Rescue...

Posted: Wed May 09, 2018 10:08 pm
by Mel
Very neat! :)

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

Posted: Sun May 13, 2018 7:44 am
by Vectrotek
Fantastic! :D Good job!!
:D :D :D :D

Re: PIRATES! [ FULL CODE + GAME ]

Posted: Sat Dec 15, 2018 2:39 pm
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! :)

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Posted: Fri Sep 09, 2022 6:11 am
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 !

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Posted: Fri Sep 09, 2022 9:43 am
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).

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Posted: Fri Sep 09, 2022 11:52 am
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" ?

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Posted: Fri Sep 09, 2022 8:48 pm
by kas1e
@All
How much FPS do you have with that game on your hardware ?

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Posted: Fri Sep 09, 2022 11:23 pm
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).

Re: PIRATES [ FULL SOURCE CODE + GAME ]

Posted: Sat Sep 10, 2022 4:58 am
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.