Jump to content

  • Log In with Google      Sign In   
  • Create Account

Servant of the Lord

Member Since 24 Sep 2005
Offline Last Active Yesterday, 04:47 PM

#5210890 What's the best engine for creating a 2D side-scrolling beat 'em up g...

Posted by Servant of the Lord on 15 February 2015 - 04:24 PM

Unity is fine, but I hope that's a better one.

 

Better in what way?

 

Are you looking for an engine (the code that runs the game) or an entire SDK (the engine and editors)?




#5210782 Sprites question

Posted by Servant of the Lord on 14 February 2015 - 11:55 PM

The iphone 6 is 750 x 1334px. I've made a mockup for you. which shows exactly how big 32px, 64px, 72px, and 128px graphics would look on a 750x1334px screen. This forum won't let me link to a png file, so please paste this address into your browser, but replace the asterisk with a dot: pasteboard.co/17MFF8Up*png  Personally, even 72px looks too small to me.

 
Nothing's wrong with linking to a PNG file:
 
d24643db_ebd1_4ff3_b971_1066487f6183.png
 
The forum software does allow linking to PNGs (and .gif and jpegs), you just didn't actually link to one - the website you used was lying to you. ohmy.png
 

Spoiler

 
Also, you could link to the bad link with a normal hyperlink just fine: http://pasteboard.co/17MFF8Up.png - no need for funky asterisk nonsense. wink.png




#5210741 Death is normal, permadeath is a real option

Posted by Servant of the Lord on 14 February 2015 - 03:25 PM

I like the idea of going to a death plane, which has been done several times before - infact, one of the very first MORPGs had one, though very limited from what they originally wanted. They originally wanted you to get teleported into hell and have fight your way back out, with hell being a labyrinth maze, but I think the final result was much much smaller. (I haven't played the game myself).

 

I like that, instead of having a whole different area, you use the same world, but make it a shadow-version of itself. That'd save alot on content-creation - a few special shaders, but using the exact same geometry, maybe toggle some gates so you are forced to take different routes (and have access to some special areas) when in the shadow realm.

 

I think it also opens up some potential for some fun stuff: Imagine it actually was a bear cave. There's five bears, and you kill three of them before the other two maul you. Okay great, so now you are in the shadow realm and need to get out of the cave and back to a gateway to the living realm, so you start exiting the cave but the three bears you just killed are now also in the shadow realm. biggrin.png

 

Or, after killing a boss, several weeks later you get killed during a dungeon raid and as you're walking through the shadow realm back to an exit, you find that boss sitting there (his shadow-version anyway), waiting for you, waiting for revenge, and this time you're on your own bud - except it's not as strong as it was last-time. Since this is an unasked for and unexpected surprise challenge, it shouldn't actually be too challenging, existing more for the experience than the challenge. (Random game-design thought I just had: Have experiences hunt out players, but let players hunt for challenges on their own schedule).

 

I think there should be some other odd gameplay tweaks to the shadow realm. Maybe make everything move slightly slower, as if moving through water, but not too annoyingly slow (just ~0.9 of the normal speed) with a slight motion blur to exaggerate it, weird sound modifications as if hearing everything from a distance even when they are right infront of you, maybe slightly less gravity so you can jump higher (accessing new areas while in the shadow realm), and some other more combat-specific changes.

 

There should be dungeons only accessible in the shadow realm. And some more advanced dungeons would require players to have friends going simultaneously through the shadow version of that dungeon, while they're going through the regular version, affecting things across both realms, and fighting some bosses that simultaneously exist in both planes (necromancers or giant skeletons or wraiths or something else that makes thematic sense with the living but also dead. Or just ignore it, and leave it to fridgelogic) - it'd make for interesting guild-raids if you have to split your guild ahead-of-time into two separate parties in separate realms/dimensions/planes-of-existence.

 

I'd cut out the permadeath stuff though, unless a player deliberately is playing with Permadeath enabled at account creation, after having already maxed leveled at least one character. The biggest killer in MMOs, in my limited experience, is lag. Permadeath due to lag equals ragequit. Unless your entire game is designed around permadeath, I'd avoid it.

Instead, I'd do some other costly, but limited, punishment. One of your items gets destroyed, or your stats all take a -1 hit (up to a max of -5) that costs you alot of gold at a temple to undo. (But then I guess the question is, why do you want a punishment for death, especially when death isn't always directly the player's fault? Do we want players to take death seriously, simple because "they should!" because death is serious in real-life, or is there some game-design reason why players should be punished for failures? But that's a huge topic for another time, and I'm honestly not sure where I stand on that myself - I also feel death should have consequences, but I'm not sure why, or how much, so it definitely needs more thought on my part)

 

Unless the multiple different deities has some other gameplay-related benefit, I'd just have stonehenge-like "death gates" in the real-world that nobody can enter (they are exit-only one-way gates), but in the shadow realm players can enter them to return to the living world. And I'd have, in the shadow realm only, big bursts of energy come out of the gates and reach to the skies with light and life, so players can visually see and spot the nearest locations.

 

Because players occasionally want to enter the shadow realm (for specific dungeons, items, special bosses (bone dragon?), or whatever), some type of magi class could force open the death gates for players wanting to enter without committing suicide.

 

The shadow realm could even be a form of quick-travel: instead of moving slower in the shadow realm, the player could move significantly faster (which would also explain the jumping higher), so players could enter one death gate, and run lightning fast to another death gate, travelling several miles in a very quick time.




#5210726 Anyone have tips on doing foley production?

Posted by Servant of the Lord on 14 February 2015 - 01:38 PM

Here's a quick mic comparison with the mics I own. 

 

Thank you for posting that comparison! I have some questions about the quality differences, and posted the questions in a separate thread here.




#5210584 Copyrights question

Posted by Servant of the Lord on 13 February 2015 - 09:10 PM

@Tom Sloper I understand your anger, but all posts here are much better descriptive than the FAQs.

 

On the internet, anger and bluntness can look similar. Tom Sloper is usually blunt, but also helpful and knowledgable. I'd take 'blunt and helpful' over 'kind but gives incorrect information'.

 

If you don't find the forum FAQ helpful, try Tom Sloper's website instead. It's alot more detailed and answers most basic questions you might have.

Here's the one answering your original question.




#5210583 Referencing static members in destructors?

Posted by Servant of the Lord on 13 February 2015 - 08:58 PM

Probably an invalid pointer. You'll need to step through it with a debugger to know for sure.

 

Since 'LoadedTexture' doesn't contain much data, why is it a pointer? You're manually juggling dynamic memory (and, my guess is you're dropping one of the eggs) but there doesn't seem to be any need for it.

 

I'd just do:

std::vector<LoadedTexture>

Or, if you must have a std::list, then:

std::list<LoadedTexture>



#5210544 [SFML] Animating images in an array

Posted by Servant of the Lord on 13 February 2015 - 02:35 PM

You don't need 100 sprites, you need 100 textures that you bind to one sprite. smile.png 
 

Class variables:

std::vector<sf::Texture> animation;
sf::Sprite birdSprite;
size_t currentFrameIndex = 0;
float accumulatedTime = 0.0f;
 
//The duration between each frame. I use floats, and make 1.0 = one second, but ints and milliseconds also work.
//Adjust this to speed up or slow down the entire animation.
const float FrameTime = 0.05;

When loading:

for(int frameID = 0; frameID < NUM_FRAMES; ++frameID)
{
     std::string filepath = "images/bird" + std::to_string(frameID) + ".png";
     
     sf::Texture frame;
     if (!frame.loadFromFile(filepath))
     {
         std::cout << "Could not load animation frame #" << i << " in the bird animation.\nPath: " << filepath;
     }
 
     //Even if it fails, I'd still add it to the stack.
     animation.push_back(std::move(frame));
}
 
currentFrameIndex = 0;
birdSprite.setTexture(animation[currentFrameIndex]);

 
When updating, based on the passage of time:

accumulatedTime += deltaTime;
if(accumulatedTime > frameTime)
{
     currentFrameIndex = (accumulatedTime / FrameTime);
     accumulatedTime %= FrameTime; //Remove the "used" accumulated time.
     currentFrameIndex %= animation.size(); //Loop the frames around.
 
     birdSprite.setTexture(animation[currentFrame]);
}

 
When drawing:

renderTarget.draw(birdSprite);



#5210364 Citizenship levels

Posted by Servant of the Lord on 12 February 2015 - 04:18 PM

  • Honored Citizen (by birth into the right race or by extensive military service or by paying a hefty sum (i.e. Roman Empire system))
  • Full Citizen
  • Citizen-Resident
  • Resident
  • Provisional Resident
  • Denizen
  • Occupant (implies potential illegitimacy)
  • Subsumed (initial stage after surrendering their race to the mighty empire. After full administration is set up and running on the captured planets, they become mere 'occupants' of the empire)



#5210196 2D Game Rpg

Posted by Servant of the Lord on 11 February 2015 - 10:50 PM

- load a map
- draw a map
- allow for collision with the above methods

You can create your own map format. It could be as simple as a series of numbers like {16, 201, 24, 37, 35...} where each number represents a type of tile. You can then load the map, and lookup in an array what tile is what.

//SIMPLE TILE EXAMPLE

struct TileDetails
{
    bool solid = false;
    bool doesDamageWhenWalkedOn = false;
    Location placeToWarpPlayerTo = Nowhere;
    ScriptID scriptToRun = Nothing;
    Texture textureToDisplay = GrassTexture;
};

std::vector<TileDetails> allTileTypes;
typedef int TileIndex;

std::vector<TileIndex> tilesInMap;

But I'd advise sticking with Tiled or another pre-existing editor. It's so much easier than editing text files. wink.png 

 

SFML doesn't directly support TMX files. Nor does SDL. Third party developers have written code for it though.

 

- which lib do you guys prefer and why ( SFML VS SDL )! pros and cons

SFML uses RAII, which is good. On the other hand, I don't like that I have to use a sf::Sprite went I want to just draw a texture.
Neither SDL nor SFML is "better" than each other. They both serve their purpose, and they both are stable mature APIs with ongoing development. They both have great communities and lots of resources available on the web.

The only real difference between them, at least when it comes to Windows development, is that they use different programming paradigms (SDL = more procedural, SFML = more OOP-ish). Neither paradigm is the "correct" one. I've used both APIs extensively, and think they are both great.




#5210171 [sfml] when space held, fly the player

Posted by Servant of the Lord on 11 February 2015 - 06:41 PM

It's just "flyClock.restart()", not "flyClock.restart().asMilliseconds()".
 
You probably want to restart the timer when the player hits the ground, not when he releases spacebar.
 
However, if you want the player to be able to jump even while still in air, you can do this:
sf::Time flyDuration; //Measures how much the player has been flying.
bool playerTryingToFly = false; //Detects whether the player is trying trying to fly.
 
Responding to events, react when the player is jumping:
if(...JUMP button pressed...)
{
    playerTryingToFly = true;
}
else if(...JUMP button released...)
{
    playerTryingToFly = false;
}
 
Then, every update frame, do:
bool playerIsFlying = (playerTryingToFly && (flyDuration.asSeconds() < MAX_FLY_TIME_IN_SECONDS));

if(playerIsFlying)
{
   //...code to make the player rise up in the air.

   flyDuration += flyClock.getElapsedTime();
}
else
{
   //...code to make the player fall to the ground.
    
   flyDuration -= flyClock.getElapsedTime();
   if(flyDuration.asMicroseconds() < 0)
       flyDuration = sf::Time::Zero; //Don't go below zero.
}



#5210141 [sfml] when space held, fly the player

Posted by Servant of the Lord on 11 February 2015 - 04:51 PM

Yes. sf::Time is just a value, like an int, that doesn't change on its own.

 

FlyTimer could be an sf::Clock, and when the player first jumps, you call flyTimer.restart()

 

 

A player can continue flying as long as:

if(flyTimer.getElapsedTime().asSeconds() > 0.5f)



#5210132 [sfml] when space held, fly the player

Posted by Servant of the Lord on 11 February 2015 - 04:15 PM

You can measure the actual passage of time with SFML, as explained here.

 

If you every frame you are holding space down, you get the actual amount of time that passed, and add that to 'flyTime' (and if you change the variable-type of 'flyTime' to sf::Time), then you can decide exactly how long you want it to last.

 

For example, if you only want it to last half a second, then you check if(flyTime.asSeconds() > 0.5f). Then, once the player touches the ground, you reset 'flyTime' to 0, so he can jump again later.




#5210108 Game ethics

Posted by Servant of the Lord on 11 February 2015 - 03:04 PM

 

Did these apps have barriers to make it difficult to buy things? Or did the design allow for unrestricted access to these purchasable goods? Is purchasing as easy as pressing one button and being done? Isn't it an issue that developers should account for while designing their apps?

Is this the game developers responsibility though?  
 
iOS devices have settings that can help to control this by disabling or restricting IAP.  Google Play offers similar settings for Android devices.  Whenever I make a purchase on Android I get an email within minutes (usually almost instantly) with a receipt and although it's been a long time since I've regularly used an iOS device I remember it being similar.

They didn't always have those settings though. They were introduced because some developers were (seemingly) intentionally abusing the lack of Apple/Google/government policing to exploit the situation.

Even after those settings were introduced, some developers continued to look for ways around it. With iOS, after parents inputted the password, there was a 15 minute window where kids could spend as much as they want without parental approval before the password needs to be input again.

 

That 15 minute window may have been fixed. So perhaps those same developers are looking for other ways to exploit that ignorance.

If this is an issue of children being disobedient, fine - that's on the parent. But some of these games are targeted to really young ages, and how clearly can even older children discern the difference between "Buying" fake stuff with fake "Gold" and "$$$" using in-game currencies like in any RPG ever invented, and buying (fake) stuff with (real) money. Until they get burned (by their parents getting burned, and them getting a talking-to), they won't learn that "Purchase" with one color means fake money, and "Purchase" with another color means real money.

 

They won't learn, until they are forced to learn by unexpected consequences, that $ means fake money in some games, and real money in other games. They won't recognize that the standardized iOS pop-up window means something special until they learn the difference, most likely the hard way.
 

I would argue that parents should be policing their children's spending through the use of these settings and appropriate supervision


Absolutely. But not every parent is tech-savvy. Until they get burned one or more times, they may not even realize that children can spend money inside a game, without the parent inputting a credit card number.

You grow up your whole life, and you can spend money in two ways: You had over cash, or you temporarily hand over a credit/debit card (and must confirm with a PIN number).
How is a parent supposed to know that after buying one thing, like a game for their kid, the kid (unknowingly) can then go and spend additional money without further input from the parent?

It's not unethical for in-app purchases to exist. It's not unethical for game developers to use them. There's a partial burden of responsibility on platforms (Android/iOS and even online shops Amazon or iTunes) to provide 'reasonable' safeguards/tools and make pop-up messages clear. If a corporation fails at that, they probably aren't being unethical, just negligent.

But it is unethical if some game developers intentionally try to exploit parent and child ignorance of the technology to trick children to spend their parents' money without permission.

Now, proving a developer operated out of maliciousness can be hard. However, since we're merely discussing ethics and not solutions, I think this is a developer-related ethics issue (if any developer tries to exploit it). It's also a parental ignorance of technology issue.
 

Everything "not against the law" isn't automatically ethical. Ethics is not adherence to the law - the law is a (clumsy) attempt to codify ethics. But the law does it in a general case, and doesn't cover every circumstance, and trips over itself in multiple areas. "You didn't forbid me from stabbing him, just shooting him. So technically I didn't do anything wrong!". Spirit of the law vs letter of the law. Except, you want don't actually want to focus on the spirit of the law either (spirit = what the judge/lawmaker "meant" when he originally wrote the law), you want to look at what the law was meant to reflect: general morality. So if the law fails (in law and even in the 'spirit of the law') in some area to predict or cover one area of morality, that doesn't excuse people from not being moral.

 

...while designers should be providing the best possible experience for their players -- making purchases as simple as possible is part of a good experience.


Agreed - technology itself isn't the problem.

In my opinion, ignorance of technology is part of the problem (this will probably resolve itself fairly rapidly - people will be forced to learn it, and they will). But intentionally exploiting that ignorance to rob someone is an example of developer-related ethics.




#5209742 Bringing on a partner to help with my idea and plan

Posted by Servant of the Lord on 09 February 2015 - 10:46 PM

I think this is the thread Tom Sloper mentioned in the post above mine.

 

Friendships are worth more than money, but can sour quickly when money is involved. Is the benefits of having someone you know work on it, greater than the risks of having that person harbor bitterness towards you when money starts coming in? 

 

On my own project, I've had one friend help out, and have some siblings willing to contribute additional work in various areas when I'm ready for them. Everyone knows it's my project, and nobody thinks they are getting a cut from it. They know this, first because they are very intelligent and reasonable people, but second, because their contributions are limited and contained, whereas they see me working day in and out for multiple years on the project. There's no delusion about shared ownership.

 

Personally, I don't like the idea of a "partner" at all. I want absolute control of my own project. I'm fine accepting limited help from people I trust, and I'm fine hiring contractors when I can afford it. I'm not fine doing game-design by committee. No matter how much I may think I'm on "the same page" as someone else, you can never be entirely on the same page. Just for fun with an artist friend, we once discussed a game design concept together for several hours. At the end of several hours of excited fellowshipping and discussion, we suddenly realized we were picturing entirely different games - for starters, I was thinking of a tile-based 2D overhead view focusing on world-exploration and exploring animal abuse and slavery, and she was thinking of a sidescrolling game with friendly pokemon-like animals that you befriend and train and exploring the fellowship and bond between humans and animals. So that'd be a "no" on the animal abuse, I guess. laugh.png

 

We can definitely reconcile our ideas, and intend to sometime after my current project. My point is though, that even when you think you are on the same page, unless you can read each other's minds perfectly, you're likely not. Further, someone needs to be in absolute control of the final design, otherwise you'll compromise on the design to work together, which means the design won't be as cohesive and "whole". The final game might feel as if the design itself has been compromised on, which it has!

 

Are you making the game for profit or for fun? If for fun, partner up! If for profit, then it's a business, and businesses can't be ran as smoothly with two CEOs. Own it, control it.




#5209480 Article suggestions

Posted by Servant of the Lord on 08 February 2015 - 03:17 PM

Hey SOTL, I wrote yesterday an article of a good way of organizing the modules on a game engine (more detailed). That's the link if you want to take a look:
https://irlanengine.wordpress.com/2015/02/07/organization-of-game-engine-layers/


Thanks, I just glanced over it. That article seems to be about project organization, and I'm actually really pleased with how my project is organized currently. What I'm looking for is code interaction between subsystems, for implementing the game logic. I can make them interact in my own code, but I feel like I would benefit alot from seeing how the professionals do it.
 

Isn't the way you hookup all the modules of an engine (physics, sound, collision, rendering, input) the secret sauce that make the engine different from other engines?  It's not like there is a "right way" to do this.


Overall architectures definitely change from game to game, glue included. And if your engine is more OOP or more CES or more procedural, the glue will change alot. Even between two CES or two OOP architectures, the glue may take different forms if written by different people. I agree there's no "right way", I'm just looking for your personal "clean ways", or even less-than-clean but functional ways. Having actually worked in the industry (at least somewhat), and having alot more experience than I do, how do you make your subsystems talk to each other?

 

Coupled or not, what is your typical way of solving the problem of inter-system communication? Passing a SoundSystem reference to your PhysicsSystem, so on collision within your physics system, you can call soundSystem.MakeCollisionNoise(objectA.GetMaterial(), objectB.GetMaterial()) ? That's a valid way of doing that. Is that what you do? Or do you make SoundSystem global?

Or is it basically "global" by giving every major system a reference to the struct that contains all the systems and all the game data? That's what I currently do, and it works, but I want to know what others do.
 

Perhaps a series of code-review articles that digs into how popular open-source engines hook everything together?


Most opensource engines seem to be, "I made an engine! Let me opensource it and then see what I and others can build from it...", rather than, "I have experience making several games, here's the common knowledge I've acquired."

Opensource engines are the epitome of "make engines because it's cool!" with theoretical/idealistic architectures, where as I'm looking for real-life communication problems and real-world solutions. (Note: not all opensource engines are like this).

Also, opensource engines, and even closed-source commercial engines are usually more general-purpose trying to accommodate everything. I'm not worried about general-purpose or not. I'm equally fine with narrowly applicable "here's the solution I used for this one real actual situation".

 

I probably would benefit from looking through open source engines, and even more-so from commercial open-source games. Quake 2 and Doom 3 is opensource, so I should read through those. Halflife 2 would be another good one for me to check out, because these would be actual (but also messy) attempts to solve concrete problems.
 

I am in the "Make games, not engines" camp, so I tend to just make stuff that is tightly coupled and works, rather than trying to create an engine that can work for any situation.

 

I'm with you in that camp. When making specific games, trying to design the architecture of that game, I have difficulty writing the code to handle communication of events between subsystems. Basically, how does the Physics/Collision system tell the Sound system to play the correct sound? This isn't an actual problem I'm currently having (in my 2D game, it's easy enough for my Player class to query what tile he's walking on and what sound he should play or script to trigger), but is the best example I can think of to illustrate my general problem. Or not "problem", my general "area I think I can improve in, and wish to hear how more experienced developers handle it".

 

I'm not looking for "The One True Solution", but to just further my general collection of potential ways to solve architecture problems, if that makes sense. I'm always hungry for more architecture stuff, when it's explained simple enough that I can understand it.

 

If my explanations seem vague it's because my desire is vague - You: "What would you like me to teach you?", Me: "What can you teach? What have I yet to learn? What knowledge is out there that I don't even know exists? Teach me one of the things that I don't know exists and thus can't ask for." biggrin.png

I know I have alot more to learn in many areas, but I don't know what the specifics to learn are. I only know the general areas I am currently weak in, and one that I'm especially interested in is [general software engineering big-picture architecture how-it-all-fits-together-ness].

 

It's definitely a more niche article request, and obviously you're under no obligation to cater my suggestion, especially since more general-purpose articles would be more beneficial to a wider group of people. Speaking of that, thank you for even considering writing any articles. Whatever you right, in any subject, I'm sure I and others would find it very beneficial.






PARTNERS