SyntaxBomb - Indie Coders

General Category => Showcase => Topic started by: iWasAdam on April 09, 2018, 15:46:01

Title: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 09, 2018, 15:46:01
At last. Here it is for both MacOs and Windows:
https://adamstrange.itch.io/inferno (https://adamstrange.itch.io/inferno)
(https://img.itch.zone/aW1hZ2UvMjQzNDYzLzExNjIwMDMucG5n/original/Rr983y.png)

Written in (heavily modified) Monkey2.

Inferno:

Inspired by the film 'The Towering Inferno' (it features 3d replicas of the tower as the final building) and other disaster movies.

You are in control of your city and drop new land. Crash land together to make buildings, crash buildings together to build higher, but crashing into existing building causes fires - too many fires and BANG.

Every move you make increases the chance of a disaster. and disasters spell trouble.
With Fake News and Disasters at every turn. Those citizens won't suffer - or will they?



Controls :

full mouse control


Who did what?:

Graphics done by me
3d models by me
Sound editing by me
3d engine by me
other editors by me
me by me
me me me me me me me me


EDIT - Additional :

Game complete and functional with fake news, 7 campaigns leading to free play.


Let me know your thought, your suggestions, but not your lunch (I've already had mine)!
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 10, 2018, 07:20:13
Well it's up and finished. I'd be very interested to what people think of it, how it plays, suggestions, etc :)

I'm going to do a post mortem after the game compo has finished and there are some comments, etc.
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 10, 2018, 08:15:37
Will try after the deadline (so you might update it until then)  - need to spend some hours on my entry to at least get it into something playable first.

So do not worry if the thread is a bit dead until deadline ;-)

bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 11, 2018, 07:29:55
On user (freeman69) is having an issues with windows 7 - app starts, white screen, title bar then crashes.

So far this has lead to some internal stuff that didn't fix the issue. but eliminated one thing - it's not the ini loading and windows data location.

@freeman69. Could you give me your machine stats: ram and gpu?
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 11, 2018, 09:18:21
@ freeman69

Try to start it via console and check for outputs. I just tried with "wine" and it for example outputted this (next to the white screen):


LoadSounds
1: #extension GL_EXT_draw_buffers : require
2:
3: #ifdef GL_ES
4: #ifdef GL_FRAGMENT_PRECISION_HIGH
5: precision highp float;
6: #else
7: precision mediump float;
8: #endif
9: #endif
10: #extension GL_OES_standard_derivatives : enable
11: uniform mat4 WorldMatrix;
12: uniform mat4 ProjMatrix;
13: uniform mat4 RotateMatrix;
14: uniform mat4 ObjectMatrix;
15:
16: uniform vec4 ObjectColor;
17: uniform vec4 FinalColor;
18:
19: uniform vec4 LightColor;
20: uniform vec4 LightPos;
21:
22: uniform vec4 XYZOffset;
23: uniform vec4 XYWH;
24:
25: uniform float BumpAmount;
26: uniform float BumpDirt;
27:
28: uniform float Time;
29:
30: attribute vec3 Position;
31: attribute vec4 Color;
32: attribute vec2 UV;
33:
34: varying vec4 Position_worldspace;
35: varying vec4 worldPosition;
36: varying vec4 color;
37: varying vec2 uv;
38: varying vec2 uvCell;
39: varying float depth;
40: varying float mono;
41:
42: varying vec4 lightPosition;
43: varying vec4 lightColor;
44: varying float lightPower;
45: varying float lightSize;
46:
47: varying float bumpAmount;
48: varying float bumpDirt;
49:
50: varying mat4 NormalMatrix;
51:
52: const float Sixteen = 1.0 / 16.0;
53:
54: void main(){
55: uv = UV;
56:
57: vec2 uv16 = UV / 16.0;
58: uvCell = vec2( XYWH.x * Sixteen + (uv16.x * XYWH.z), XYWH.y * Sixteen + (uv16.y * XYWH.a) );
59:
60: // Position of the vertex, in worldspace : M * position
61: Position_worldspace = (ObjectMatrix * vec4(Position, 1.0));
62:
63: //modify Position_worldspace goes here
64:
65: lightPosition = vec4( LightPos.x, LightPos.y, LightPos.z, 1.0 );
66: lightColor = vec4( LightColor.rgb, 1.0 );
67: lightPower = LightPos.a;
68: lightSize = LightColor.a;
69:
70: bumpAmount = BumpAmount;
71: bumpDirt = BumpDirt;
72:
73: worldPosition = vec4( Position_worldspace.xyz + XYZOffset.xyz, 1.0 );
74:
75: mat4 MVP = ProjMatrix * RotateMatrix * WorldMatrix;
76: vec4 Position_Object = MVP * Position_worldspace;
77: gl_Position = Position_Object;
78:
79: // NormalMatrix = MVP; // NO
80: // NormalMatrix = ObjectMatrix; //NO
81: // NormalMatrix = WorldMatrix; //NO
82: // NormalMatrix = ProjMatrix; //NO
83: // NormalMatrix = ProjMatrix * RotateMatrix; //NO
84: // NormalMatrix = RotateMatrix * WorldMatrix; //NO
85: // NormalMatrix = RotateMatrix * WorldMatrix * ObjectMatrix; //NO
86: // NormalMatrix = WorldMatrix * ObjectMatrix; //NO
87: NormalMatrix = RotateMatrix * ObjectMatrix; //NO
88:
89: Position_worldspace = Position_Object + XYZOffset;
90:
91: worldPosition.y = worldPosition.y - XYZOffset.y;
92:
93: depth = 1.0-(Position_Object.z * 0.06);
94:
95: // Color = vec4(clamp(Position, 0.0, 1.0), 1.0);
96: // Color = vec4(wPos.z, 0.0, 0.0, 1.0);
97: // color = vec4(1.0, 1.0, 1.0, 1.0) - (wPos.z);
98: // color = vec4( Color.rgb, 1.0) - (wPos.z*0.1);
99: // color = vec4( Color.rgb * ObjectColor.rgb, 1.0);
100: // color = vec4( XYZOffset.r,  XYZOffset.b, 0.0, 1.0 );
101:
102: vec3 col = Color.rgb * ObjectColor.rgb * FinalColor.rgb;
103: float m = (col.r + col.g + col.b) / 3.0;
104: vec3 monocol = vec3(m, m, m);
105: mono = FinalColor.a;
106: color = vec4( mix( monocol, col, mono ), ObjectColor.a );
107: }
108:

Failed to compile fragment shader:ERROR: 0:1: 'GL_EXT_draw_buffers' : extension is not supported


So maybe your system is having trouble with the shader?


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: freeman69 on April 11, 2018, 09:33:24
It looks like my laptop has 4Gb of memory, 2Ghz dual core CPUs with integrated graphics. (I thought they were 1Ghz - which shows how much I take notice.) I bought it because it was relatively cheap I'm afraid.
It's got both 32 & 64 bit Windows 7, which has caused the odd conflict in the past. I ignore the 64bit side.

I tried from the command prompt, (which I haven't done in years) and the same thing happened with the window frame appearing etc.

Sorry to be a numpty.
Unfortunately I've got work over the next few days, so limited availability. I'm going to email Qube directly to say that someone should be nominated to vote in my place, otherwise it's not fair to you. (And I can't unzip one of the other entries, as the download for the zip application fails and Pipanic isn't displaying properly.)
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 11, 2018, 12:21:40
Hmm.. I am not really sure how to play the game. You gave instructions here (this thread) - but as it is a "simple to play, hard to master"-style of game the mechanics should be self-explanatory. If you start the game the first time you just click on the arrows "randomly" - sometimes things explode, sometimes they move other tiles while they do not do this on other arrow-clicks.

Maybe add some "indicator" per tile to see on which "level" these things are so you see "easier" that things might burn/crash/whatever if you click on that arrow. Maybe you could add some semi-transparent arrow on each tile to where it moves - so you see what will happen if you click.


But way more important: pretty often my screen looked this way:
(https://www.syntaxbomb.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FiWmj9cF.png&hash=ca6b3f5ebdedefb4277e0218ee371cc7ea7b65bf)

It was pretty pretty dark. When it was a bit brighter I was able to see crane, buildings ... but most of the time it was dark - or very dark.

Incoming disaster should be "easy at start" and getting more and more desastrous in the later game stages (not checked that yet).


@ citizens celabrate
Incoming spelling bee attacks town!


@ rotation (minor thing)
I clicked with mouse (left button, right button) and it seems as if you are able to rotate the world - a tiny bit - and then it resets to the original POV.


@ white screen
I had about ~1s of "white background" during startup. So a white screen seems to indicate that something in the startup is failing (shader stuff?)

bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 11, 2018, 12:41:30
good call on the spellringe

mmmm. image should have lighting similar to:
(https://vjointeractive.files.wordpress.com/2018/04/screen-shot-2018-04-11-at-12-37-31.png)
could you post a pic of the title screen for me ?

@white screen. it's not a bug or a crash it 'F%($&$*!!!!!' Monkey2
you load things at the start - and its before the windows start painting!!!
I am aware of it an I will need to dig into monkey2 and see if it can be changed cause speaking to Mark is like banging one head against a wall - great fun, but pointless
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 11, 2018, 12:56:33
Titlescreen and "newspaper" look normal. Like said: it is more or less too often "darkness" (it fades from normal to dark to normal ...). So if it is "random" I just might have had bad luck :p


Fire lighting the scene:
(https://www.syntaxbomb.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FFT12uhz.png&hash=b3f6b134b853d5a374f4afe0638a7730a28de741)

Darkness/dawn:
(https://www.syntaxbomb.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FO29iu0o.png&hash=2d5f4f6e0528be0431348552b88f060b8e9b39c2)

If there was a fire somewhere, the surroundings should be enlighted (just think of "global illumination" and "indirect lighting"). I understand that your engine is not capable of that (yet). So to avoid this problem you should add fires to the backside too :-).

Another potential "helper" would be helicopters with their search-lights (they are so focused that it might be easy to implement without looking "fake").


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 11, 2018, 13:45:45
mmmmm.

so it does operate and then turns off? or it is sometimes on and sometimes off?

These are all fascinating insights to the internals of things - for me anyway. Depending on the answer to the above I do have a solution...
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 11, 2018, 15:27:17
It is like if it was intented... So it gradiently goes darker and brighter, no sudden changes. I just think the adjustment is too strong. Will try to record a video so you can judge on your own.

Bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 12, 2018, 06:45:05
that would be good to see.

I have an idea that there are issues with the monkey2 random function on windows. But seeing a quick viseo would allow me to focus down on the issue for you
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 12, 2018, 07:17:08
You could also compile a linux version for me - to check it on my NVidia GPU/Linux rather than on Intel IGP/Windows10 (you can mail it to me: ron @ gamezworld.de   - so we try if it runs before you publish it here making people expecting something which might not come).

Will try to steal some sparetime when kid is in the kindergarten.


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 12, 2018, 09:00:38


At 0:23 game scene got a bit brighter - think that should be nearly the "minimum".


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 12, 2018, 10:20:43
video is unavailable :(
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 12, 2018, 10:41:38
Thought "private" means I could still make it available by sharing the link.
Changed it to "unlisted" now. Hope that helps.


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 12, 2018, 10:53:21
yep - all sorted.

It's very interesting to watch. my first thoughts are:
1. the system is working (when there is light)
2. something seems to like turning the lights off
3. I've now got the information I need...

It (initially) looks like monkey2 internal Rnd function is borked (which is what I always thought).
The Rnd function should really be giving similar results regardless of OS. I have noticed that (in some cases) the Rnd function just sits at 0 for most of the time until about a minute then it starts!

What I will do is look into unifying the internal code so the results give a properly operational value when called.

Just more crap to add to Marks (not brilliant) code!!!!
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 12, 2018, 11:26:55
Hmm, raised an issue on the github-repo? Did not see it. Or is it something in your "modified/older" monkey2 version? Couldn't you do the lighting-randomness in the shader itself?

You might be able to do a "fake random generator" meanwhile...something like (untested):
(Edit: I extended the code to have a MinMax in too):

Code (BlitzMax) Select

SuperStrict
Framework Brl.StandardIO


Global startSeed1:Int = 12345
Global startSeed2:Int = 34567
Global startSeed3:Int = 56789
Global lastResult:Int

'https://en.wikipedia.org/wiki/Random_number_generation
Function GenerateNumber:Int()
  lastResult =  (startSeed1 * lastResult + startSeed2) Mod startSeed3
  Return lastResult
End Function


Function GenerateNumberMinMax:Int(minV:Int, maxV:Int)
Return GenerateNumber() Mod (maxV - minV) + minV
End Function


For Local i:Int = 0 Until 10
Print "GenerateNumber() = " + GenerateNumber()
Next


For Local i:Int = 0 Until 10
Print "GenerateNumberMinMax(0,10) = " + GenerateNumberMinMax(0,10)
Next


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 12, 2018, 11:54:02
mmm. great code. I'll see about thing :)
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 12, 2018, 12:00:24
As you wrote that "rnd" works from time to time (or just not at the beginning) you might consider wrapping together both things:

rnd(val) + GenerateRandom()

So in the case of "repeatingly 0" you at least get the pseudo random number. Afterwards you need to "modulo" out the added random number if you want a value between "min and max". Means you "wrap around" your limits (1.1 becomes 0.1, 1.5 becomes 0.5, 0.5 stays 0.5).

bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 13, 2018, 11:08:10
Rnd updated and some flickering toned down with it now. I also fixed a few things whilst I was in the Rnd area and extended it a bit to make it more friendly to me :)

One thing I am taking note of with this (and it brother BloodCrypt) is the look is now nailed and everyone seems to like that, but gameplay is... Lets just say lacking.

So I will be taking all of this to heart and focusing down on gameplay next. :)
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 13, 2018, 11:22:36
I think gameplay wise you can do different things:
- make a game for short breaks (waiting for the bus, sitting on the toilet, ...)
- make complex games (you play them in the evening for 2-3 hrs) - my TVTower is such a game

Think "inferno" would fit into the first area. Regardless of later stages get more complex or not (means adding new "block types" or so) - the game mechanic stays the same, you do not have much options to choose from. So there is the - as I wrote already - easy to learn, hard to master thing you need to "achieve" with that game type.
The more complex games are way harder to create as they require way more man power (more options = more assets/gfx, you might need advanced AI players ...).

For compos I think these (seemingly) "easy" game types are good candidates as you have way less to code (gameplay functionality wise, not engine wise) which allows to stay in the given time frame.

What I can think of your asset style and (maybe) likes is some kind of Dungeon Keeper alteration. So building some kind of mazes and do things in it. Other of your game ideas (the isometric flag/army one) have cool ideas, but imho fit better into "less raw" looking graphics. Strategic titles could use prerendered stuff - or a mixture of it (terrain is 3D but units are prerendered to allow high details). As you seem to have artistic skills I wonder with what you could come up when using "proper" 3d models (with textures and the likes). Some fantasy/medieval war game could suit nice to you - and you would have Matty as fanboy and "fanart provider" for free ;-)
Did I mention that I want to see that flag/army game running on my linuxbox, now as you have your engine "redone" a huge bit. Maybe create a worklog coding your engine - and bring it to life on Linux.


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 14, 2018, 06:33:06
yep. A good explanation on the 2 base types of games.

I will do a complete breakdown of what went into inferno after the compo has finished and I get me life back - lol
There has definitely been lots of internal (engine/technical) stuff been going on. I think I need to spend time with what i've created and see what it can do ;)

the isometric/flag game (warhand) was a great concept, but had issues it came to the operation. but yeah I take your point that there was something interesting in there (I think you solved a lot of the issues with your isometric engine - so you know what I mean)
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 14, 2018, 08:31:58
Couldn't you redo this stuff now - with the new engine? I mean, the 2d sprites could get reused and get placed on a 3d based iso grid?

With some anti-aliasing I think it could look a bit more polished / less "rough" (eg. you could add some simple prerendere tile graphics on the 3d grid - as it is some kind of "static").


bye
Ron
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 14, 2018, 08:38:10
yep. It's sorta on my todo list now :)
Title: Re: Inferno - Movie Game Contest Entry
Post by: iWasAdam on April 14, 2018, 08:57:25
Here's a quick shot of bloodcrypt using an isometric viewpoint:
(https://vjointeractive.files.wordpress.com/2018/04/screen-shot-2018-04-14-at-08-53-50.png)

the screen picking is rock solid and all the issues with the graphics are solved almost immediately. so a new version of WarHand is possible now.... hmmmmm
Title: Re: Inferno - Movie Game Contest Entry
Post by: Derron on April 14, 2018, 09:22:21
I am requesting it as I think you are on a "run" now and you should use the possibility to finish old stuff to increase your "portfolio" :-)

And do not forget: create little test apps so we get that running on linux too.


bye
Ron