Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


speciesUnknown

Member Since 08 Oct 2006
Offline Last Active Nov 20 2012 04:52 PM

#4969734 A stealth weapon that's never been done before

Posted by speciesUnknown on 14 August 2012 - 11:04 PM

This is the game in its current form. Note that bullets have travel time.

www.zombiebovine.com/playgame

I'm currently upgrading the zombie AI and I want to add a system where zombies hear gunshots nearby and charge toward the player; to balance this out, I need a dedicated stealth weapon. But I don't want something that has been done recently in a big game - I want something that sets my game's stealth sections apart.

Here are some ideas that I've had so far:

Boomerang - after hitting a target it returns and you have to catch it. if you don't hit an enemy, it wont return.

Throwing knives - when you throw knives in real life, you need to take care of the rotation of the blade; so some kind of mechanic of charging the spin by the right amount might make this a challenge. I throw knives in real life (although I'm not very good at it) and can reliably stick a knife in a target blade first, but this takes serious practice and concentration. Whether you go for one spin or multiple spins, you need to ensure the spin is correct.

Crossbow - How can I make this more of a challenge than just a plain old crossbow?

Longbow - Again, how to make this a proper challenge?

Dart gun - the same problem applies here, I want the stealth weapon to be harder to snipe with than other weapons and a dart gun is just too easy if its similar to a normal gun.

Any ideas are welcome, thanks for reading.


#4963744 Overload comma , operator to init the array

Posted by speciesUnknown on 27 July 2012 - 02:02 PM

Who cares if he overloads the , operator anyway? Its not like he is going to be doing anything useful for the next few years, given his choice of language.

As an empiricist, I say let him do it and learn the consequences for himself.


#4952624 how to write a game like worm reloaded

Posted by speciesUnknown on 25 June 2012 - 06:04 AM

Look into a 2d physics engine. I use chipmunk-physics, but others use box2d. Google 'em


They don't have any collision routines for a pixel map.


You can even have a screen size buffer, so that your collision check becomes simply this:

if( ScrnBuffer[x][y] != EMPTY )
{
Explosion!!!
}
...


The direct sampling approach is also no good because of tunneling. Projectiles will be on one side of a thin barrier on one frame, and the other on the next.

What you need is to cast a line into the grid, from the previous position of the projectile to its calculated next position. The point of collision is the first pixel that it hits along (the one with the smallest T value). Bresenhams line is one way to do this. Test each pixel that the line passes through until you get a hit.

http://en.wikipedia.org/wiki/Bresenham's_line_algorithm

When an explosion occurs, you can remove pixels from your pixel sized grid to damage the level. For characters walking, a ray cast downward will suffice. Let them fall through gaps of 1px (these will be rare though, if you are blowing holes in the terrain with explosions). You can do a brute force iteration over a square area that covers your circle, doing a distance-from-centre test to ensure you don't fill out the corners. Performance here is acceptable, don't try to optimise that yet.

The last thing you need to remember is to use a grid of smaller textures, don't try to do it with a single huge texture, because you have to modify textures when they get holes blown in them. Textures that stayed intact can be left unmodified. For a basic implementation, this is the only optimisation you really need.


#4952105 Planning - What do you use?

Posted by speciesUnknown on 23 June 2012 - 03:02 PM

I use UML, but I don't bother to map out the entities' methods and attributes - it is the structural relationship between the elements that is important. A whiteboard is the best place to do this, especially when one is working in a team.

Crucially, I don't try to keep and maintain the UML as a form of documentation. The problem with this form of documentation is that it quickly gets out of date. Things like UML are best used when working something out as a team, agreeing on responsibilities, etc.

Once we're happy that we have created something workable, and everybody is clued up on what they have to do, we just crack on and build the thing. Given the structural context from the UML, we are all able to understand what we are looking at when we deal with each other's code.

So thats how I do planning when it comes to code structure.

If what I'm working on is a game, for things like gameplay concepts, and feature lists, I use XMind to create a mind map. This is great for fleshing out the different parts of an idea; for example, working out what weapons are needed, working out what different monsters go in the world, etc. This is only high level planning, as drilling too far into it creates something you are unlikely to follow.


#4908283 General Game Designer Questions Inflation

Posted by speciesUnknown on 31 January 2012 - 10:37 PM

Hello all,

I have some game design question. I want to know if there's a point or is it just lazy game design.

My first one is:
What's with the inflation of numbers? Simple because I level up and do "more" damage. Yes you are doing more damage, the increase in the enemies helath can out weight the increase in damage. Or is the to deal with the pychology.


-Thanks


It's partly down to psychology, and many MMO's use this game mechanic heavily, to keep the player addicted. However, its main purpose is to increase the difficulty and variety of enemies as you progress through the game, for example, you start off killing giant rats with a crude spear and you finish killing undead chaos wyrms with your 4D20 adamantium broadsword of undead chaos wyrm slaying.


#4905722 Billboarding

Posted by speciesUnknown on 24 January 2012 - 02:29 AM

I found a simple solution to this. Here is how I build the 4 vertices of each quad when I fill an array of particles:
	 #region setting up verts
	 int si = i * 4;
	 float age = pData[i + offset].age;
	 int z = nDrawn & 1;
	 float rev = ( z == 1 ) ? -1f : 1f;
	 Matrix rotm = Matrix.CreateRotationZ(age * 5f * rev);
	 // point sprite style rendering - use the first 2 points of the normal to encode the coordinates,
	 // relative to the Position, of each of the 4 verts
	 // use the 3rd component of the normal to encode the age, for shaders to apply their own age dependent logic
	 StaticBuffer[si].Position = pData[i + offset].pos;
	 StaticBuffer[si].TextureCoordinate.X = 0;
	 StaticBuffer[si].TextureCoordinate.Y = 0;
	 StaticBuffer[si].Normal.X = -0.5f;
	 StaticBuffer[si].Normal.Y = -0.5f;
	 StaticBuffer[si].Normal.Z = age;
	 si++;
	 StaticBuffer[si].Position = pData[i + offset].pos;
	 StaticBuffer[si].TextureCoordinate.X = 1;
	 StaticBuffer[si].TextureCoordinate.Y = 0;
	 StaticBuffer[si].Normal.X = 0.5f;
	 StaticBuffer[si].Normal.Y = -0.5f;
	 StaticBuffer[si].Normal.Z = age;
	 si++;
	 StaticBuffer[si].Position = pData[i + offset].pos;
	 StaticBuffer[si].TextureCoordinate.X = 1;
	 StaticBuffer[si].TextureCoordinate.Y = 1;
	 StaticBuffer[si].Normal.X = 0.5f;
	 StaticBuffer[si].Normal.Y = 0.5f;
	 StaticBuffer[si].Normal.Z = age;
	 si++;
	 StaticBuffer[si].Position = pData[i + offset].pos;
	 StaticBuffer[si].TextureCoordinate.X = 0;
	 StaticBuffer[si].TextureCoordinate.Y = 1;
	 StaticBuffer[si].Normal.X = -0.5f;
	 StaticBuffer[si].Normal.Y = 0.5f;
	 StaticBuffer[si].Normal.Z = age;
	 #endregion

See how I am encoding the distance from the centre of the billboard into the X and Y of its normal. If I came up with my own vertex format this wouldnt be necessary, and there are other ways.

My shader is very simple; only the vertex shader has anything notable in it:

output.Position = mul( mul( mul(input.Position, matWorld) , matView), matProjection) + float4(input.Normal.xy * input.Normal.z, 0, 0);

Now, there are other ways to do this; you could use the texcoords to achieve the same effect, or instead you could use a single index which picks from an array within a shader, but I implemented this in a hurry.


#4890584 [Stupid question] What is the internet?

Posted by speciesUnknown on 04 December 2011 - 10:15 PM

What is the postal service?


A socialist conspiracy. If it were left to the free market, it wouldn't exist.


#4865460 Help regarding first RPG game

Posted by speciesUnknown on 24 September 2011 - 06:47 AM

You specifically mentioned the story; the first basic thing you need to make work is triggers, and the easiest is a proximity trigger. How about I set you a challenge?


0) You need to be able to parse a .tmx file, which is the file format for tiled. Depending on what language you use, you might be able to find a parser; I have one for XNA just sitting around.

1) make a level load; part of this level is an arena, with impassable walls all around and a gate at one point. A gate can be created in a tile based game simply by making the terrain passable, and then changing it to be impassable when the gate is closed.

2) Add a proximity sensor in the center of the arena, give it a radius that ensures the player is not standing on the gate when it triggers. The trigger should close the gate and make an enemy appear.

3) A monster runs toward the player. When it catches the player, a battle starts.

This will give you a good stable platform for developing your battle system. Step 4) would be to make the battle screen in a turn based fashion.


#4864221 [C#] Object passed to method as parameter -> questions

Posted by speciesUnknown on 21 September 2011 - 09:09 AM

Greetings.

Can you explain why
1) method nochange() doesn't change the object argument, although the object is of reference-type passed by value?
2) method change2() can change the field of the object passed without REF?

More comments in the code below.

Thanx. Bye.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ref_obj
{
    class clsTest
    {
        public int a;

        public clsTest(int i)
        {
            a = i;
        }

        //this will not change the argument
        public void noChange(clsTest obj)
        {
            clsTest newObj = new clsTest(0);
            obj = newObj; // this has no effect outside of noChange()
        }

        //this will change what the argument refers to
        public void change1(ref clsTest obj)
        {
            clsTest newObj = new clsTest(0);
            obj = newObj;//this affects the calling argument
        }

        // changing Object argument field without REF
        public void change2(clsTest obj)
        {
            obj.a = 33;// this changes a field of the called argument
        }
    }
}


namespace ref_obj
{
    class Program
    {
        static void Main(string[] args)
        {
            clsTest ob = new clsTest(100);

            Console.WriteLine("ob.a before call: " + ob.a);

            ob.noChange(ob);
            Console.WriteLine("ob.a after nochange call: " + ob.a);

            ob.change1(ref ob);
            Console.WriteLine("ob.a after change1 call: " + ob.a);

            ob.change2(ob);
            Console.WriteLine("ob.a after change2 call: " + ob.a);

            Console.ReadLine();
        }
    }
}

OUTPUT:


ob.a before call: 100
ob.a after call to NoChange(): 100
ob.a after call to Change1(): 0
ob.a after call to Change2(): 33


It is important to get your head around this stuff early on, so good job on noticing it and asking.

1)
The reason for this behaviour is that reference types are accessed through their reference, but a reference itself is actually a value type. in your function NoChange, a copy of the reference (which is usually just an integer ID of the object, depending on the language) is created. What you are doing is then modifying the local copy of the reference. The original reference cannot be changed.

This is where the ref keyword comes in. You are now passing a reference to a reference. Now, you can change the original.

2)
In this case, you are not modifying the reference, which was passed by value, but you are modifying something elsewhere in memory, using your copy of the reference to access it. Remember, only the reference itself is passed by value, the new reference still points to the same referee.


#4863352 How to make my own gui using opengl and SDL and C++ or whateva? :)

Posted by speciesUnknown on 19 September 2011 - 08:07 AM

hello im a novice at programming tired of crap and wanting to be less crap by creating things that i can work with but for me too do that i need to know where to start because everything is so dam non logical in the world of coding when theres no explanations or tutorials simplfied word by word on how to do what i want

so im assuming you want to know what i want :P

well this is it

How do i make a Graphical User interface that works ontop of OpenGL and SDL ?

no i do not want to use GLUT or freeGLUT or CEGUI or AntTweakBar

i want to make my own :)

And where did you find information on it because i cant find anything using google ("bet people do that to make it more harder for programmers") * coughs

and i dont want to hear how complex it is ,etc i just want somewhere to start that will give me anuff know how to do it for myself thanks
i really tryed hoping that i didnt have to ask but i guess theres no where else to go so

i aslo wanna state that i learn by learning word for word :) not from massive statements with comments which is just not flexible anuff imo

and ! :D i may sound like i dont know what im doing and thats because i do im guesser / reader :D it works

also i dont want to sound like im bashing just annoyed :)


There are a few ways of doing this. The level of complexity and the amount of work that goes into it depends on what features you want. What will your GUI consist of? Screens, buttons, labels, and toggle switches are simple to implement yourself.

Think up a couple of use cases.


#4862819 Female Enemies in Beat 'em Up

Posted by speciesUnknown on 17 September 2011 - 09:25 AM

When it comes to controversy, you need to find a sweet spot, one where people who will never play your game get offended and cause a lot of commotion, and your actual target audience mock these people. When it comes to sexism, you cant win - if you have a male boss this is not sexist, if you have a female boss it is; somebody is always guaranteed to be offended whenever a piece of fiction portrays something they wouldn't want to see in real life.

I would recommend avoiding the usual stereotypes, and stupid skimpy clothing that we frequently see female characters wearing in fighting games. But you have to accept that, if the fiction of your game portrays a woman with undesireable character attributes, somebody somewhere will be offended.

Some feminists are just as brainwashed by thousands of years of male dominated fiction as anybody else; they want to treat women as a special case, and the result is more inequality, so I applaud any game which treats people as equals instead of pandering to the political correctness brigade.


#4862302 10 years of 9/11 conspiracies

Posted by speciesUnknown on 15 September 2011 - 09:28 PM

The sad thing is that the more fervent the debate over the cause of a terrible event, the less focus is given to the victims. Perhaps you could argue that "the truth" is somehow of benefit to the victims, but no amount of truth can bring back a dead husband, wife, father, or mother.

Its a bit like when Israel and Palestine have yet another war. The first few times it happened I got upset, but I soon grew out of it and realized that this was the MO for those people - I began to experience compassion fatigue. Likewise, the more I hear people arguing over who the culprits of 9/11 are, the less I care about the causes.

I should feel sad whenever the anniversary of 9/11 comes around but instead I feel guilt, because this is when all the different theories begin to bounce around, and I just feel annoyed and find it impossible to feel any form of compassion.

Sometimes, I wish people would just shut the fuck up and show some respect.


#4861547 How long until c++ disapear from game development

Posted by speciesUnknown on 14 September 2011 - 07:52 AM

I still think that "never" is a stupid answer. This means that c++ will be use for game development an infinite number of years from now. It means that when games no longer exist, humans disappeared from the universe, and the earth has been swallowed by the sun, c++ will still be in use in game development.

I think that at some point between now and the end of the universe we are going to see a change in computers which means c++ is no longer used for game development. So, "Never" is the stupidest possible answer.


#4861542 Component Based Entity System Question

Posted by speciesUnknown on 14 September 2011 - 07:43 AM

Hey all, I would like your opinion on something...Okay so:

Say you have a component based entity system and your system is kind of normal:

Where an Entity is a ComponentContainer and an AttributeContainer.

Components are things that use attributes (The entity holds the attributes so that two components can say...access the Mesh attribute or health...) and can add\get attributes to an Entity.

Attributes are pretty obvious.

Now lets say you have your Renderable3D component, and when it gets added to an Entity or created you need it to also get added to the Renderer so it can be rendered...

How would you do this? Make the Renderer a singleton? (OnEntityAdded or Initialise on the component could then just add itself...)

Or have a GameSystem that would hold a Renderer* and was a singleton?

Or...? A solution without singletons!?


I cheat. I have a method call on my entity class, which it delegates to all its components: void populateRenderList(MainRenderList list)

This way, on each frame, anything within the frustum is asked to add anything it wishes to the render list. This is highly useful for components which aren't normally drawn, but which I might want to draw something for debugging purposes.


#4861175 How long until c++ disapear from game development

Posted by speciesUnknown on 13 September 2011 - 11:25 AM

Never is a stupid answer, that means that in a million years time people will still be using c++. I cant believe that most people chose that option. I chose 20, but I think it will actually take a lot longer than that. As yet, no language *with similar semantics* (please don't start telling me that java and C# are going to replace c++, you've been telling me that for 10 years) has yet been developed. When it is, c++ will be replaced.




PARTNERS