Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411365 Posts in 69352 Topics- by 58404 Members - Latest Member: Green Matrix

April 13, 2024, 02:23:12 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 ... 23 24 [25] 26 27 ... 31
481  Developer / Technical / Re: Sound Latency in Flash on: March 05, 2010, 09:42:25 AM
Have you checked that the sound file doesn't have any silence at the start of the file?

Very often when you convert a wav to an mp3 it adds a noticeable amount of silence as part of the encoding.
482  Developer / Technical / Re: Coding styles on: February 26, 2010, 10:15:12 AM
Code:
int var1,var2,var3;
int var4,var5,var6,frame; // i know i should keep these under one 'int' but it feels clear to read this way for me

I would avoid doing this in C/C++ because the following code doesn't do what it looks like it should do:
Code:
int* p1, p2;
483  Developer / Technical / Re: Code Design: Object deleted before higher code is completely finished with it on: February 24, 2010, 10:23:35 AM
One way: add a deleteFlag property to CClass, and instead of deleting the object set the flag.

Then do a post-processing step right at the end to actually delete any object with deleteFlag set.

Another: recheck if objects[ i ] is null after any method call which might delete it.
484  Developer / Technical / Re: What is the most elegant tile-based collision algorithm? on: February 18, 2010, 04:28:36 PM
Ok so he writes this code to test every character against every box...  What happens when you build a level of a reasonable size, with multiple entities moving, bullets, and ground response?  Then you need to start writing a whole system to partition your collision tests, and then you start getting into some serious territory.  Why reinvent a system like this when it's already been done very well?

I agree that the broadphase provided by a physics engine would be excellent and nice to have, but unless you have a lot going on in a level it's completely irrelevant. When it does become relevant you can write a quick and simple grid-based implementation and you'll almost certainly be fine.

The collision resolution, on the other hand, is the part that would be total overkill. It's also not particularly suited to a platformer game: you can make it work and many people have, but it doesn't quite work out of the box.

On the other hand, my simple move-x-then-move-y algorithm can be quickly implemented and quickly understood. I'm confident that someone who's never used a physics engine before could get my approach working a lot faster than if they used Box2D.

That doesn't mean that physics engines are useless or that my algorithm is perfect. Certainly if the required features are likely to grow then a hand-rolled solution may in the end take significantly longer. But for the problem given - AABB against AABB platformer physics - it's a good solution.

Personally the last time I tried doing this with a physics engine (disclaimer: it wasn't Box2D but that doesn't mean Box2D is immune to this kind of issue), I had issues with a non-rotating square character walking on a grid of tiles where the character would bump into the cracks between tiles even though they should be completely aligned.
485  Developer / Technical / Re: What is the most elegant tile-based collision algorithm? on: February 18, 2010, 03:34:50 PM
Move character in x axis; check for collisions and move back if needed.
Move character in y axis; check for collisions and move back if needed.

For AABB against AABB tests, Box2D is definitely overkill.
486  Developer / Technical / Re: The grumpy old programmer room on: February 18, 2010, 04:17:24 AM
Flash is the mistress who I have to hide from C++.
487  Developer / Technical / Re: The happy programmer room on: February 17, 2010, 04:26:19 AM
I've just hooked up the renderer to the physics engine which I took 2 months to write, without testing it, only to find that it works perfectly.

Shocked You, sir, are crazy.
488  Developer / Technical / Re: The grumpy old programmer room on: February 17, 2010, 04:21:37 AM
Interesting... on Linux Chrome and Firefox I get a half-second lag. Perhaps it's a Linux sound issue? Can anyone else comment?

I get a half-second lag on Linux, but I also get a half-second lag with Flash audio on Linux too.
489  Developer / Technical / Re: Component Fail! on: February 09, 2010, 04:19:49 PM
Complete guess: did you copy ComponentList from component.h into component_list.h without changing the include guard?
490  Community / Townhall / Re: AGameAWeek - Year 2 on: February 09, 2010, 04:55:25 AM
Works for me in Ubuntu. Fun idea!

The fullscreen option didn't work, and nor did alt-F4 or the window's close button to quit. Minor things though.
491  Developer / Technical / Re: OpenGL on Windows on: February 07, 2010, 05:18:51 PM
I don't believe there is a download for EASTL, which is a shame. Closest I could find is someone mentioning RDESTL which is apparently EASTL-inspired, but it's a single-person project and who knows how complete or reliable it is.

[/hijack]
492  Developer / Technical / Re: OpenGL on Windows on: February 07, 2010, 03:02:43 AM
Boost is great, but it doesn't aim to replace the STL. There is no boost::vector, for example.

Going off on this STL tangent, I found this yesterday while writing that article: EASTL. It's an analysis by someone at EA of why the STL isn't suited to (console) game development and how they designed their alternative implementation. Really interesting stuff.
493  Developer / Technical / Re: OpenGL on Windows on: February 06, 2010, 04:00:26 PM
@Draknek: Can you elaborate on the magic macros? While I doubt the containers are a problem here (I noticed the low fps even before I used containers of any kind) I would still like to gain any performance boost possible, as I'm about to use them more heavily.

I just wrote up a blog entry to condense my knowledge into one place: http://blogs.warwick.ac.uk/ahazelden/entry/visual_studio_stl/
494  Developer / Technical / Re: OpenGL on Windows on: February 06, 2010, 08:11:07 AM
Agreed, you need to profile your code. My hunch would be that it's not OpenGL slowing it down but the application code itself, but until you profile you really have no idea.

Make sure that you've got an equivalent level of optimisation enabled in Windows, too.

Are you using STL containers and using Visual Studio? If so, you should know that the Visual Studio compiler has an incredibly slow implementation of them by default. So if you have some reasonably sized STL containers and profiling says they're to blame, you'll want to do something about that. You can either define some magic macros to disable that behaviour (let me know if you want me to remember what they are) or set up GCC/MinGW as your compiler instead. Neither is trivial unfortunately.
495  Developer / Technical / Re: lightning graphic generated by code? on: February 02, 2010, 05:04:53 AM
This is very cool: http://imgbit.com/images/2868c9c9331249519453.gif

If not particularly relevant to procedurally generating the effect.
496  Community / Jams & Events / Re: GGJ Games on: February 01, 2010, 03:11:22 PM
Flippy gets lost (Flash)

A puzzle platformer, because I apparently have no imagination at the moment.
497  Developer / Technical / Re: Simple cross-platform gamepad library on: January 25, 2010, 06:42:24 AM
Tried the Linux version with an Xbox 360 controller and it worked. The axis ordering is maybe a bit weird (left x, left y, left trigger, right x, right y, right trigger), but that has nothing to do with your library.
498  Community / Creative / Re: Gameless Title Dump on: January 22, 2010, 10:46:43 AM
There is a Monster at the End of this Game

At the end it should be revealed that the monster is the player and everything you've killed along the way just wanted to be left alone.
[/artgame]
499  Community / Jams & Events / Re: TIGJAM UK 2 : POST YOUR GAMES on: January 20, 2010, 05:05:37 AM
Lifesnoozer and I made this in the final few hours I was at the jam on Monday:


Doppelganger


Tempted to expand this with more levels and get some music/sound for it.

Lifesnoozer, can you send me the updated title screen/congrats screen graphics so I can include them?
500  Community / Creative / Re: Gameless Title Dump on: January 19, 2010, 11:37:12 AM
Bug Ridden Pile of Garbage

Whether the bugs are the creepy crawly ones or the computer ones isn't really important.
Pages: 1 ... 23 24 [25] 26 27 ... 31
Theme orange-lt created by panic