Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

878000 Posts in 32898 Topics- by 24323 Members - Latest Member: nickFromPaintteh

May 21, 2013, 01:25:36 AM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 177 178 [179] 180 181 ... 275
Print
Author Topic: The grumpy old programmer room  (Read 305882 times)
mcc
Level 10
*****


glitch


View Profile WWW Email
« Reply #2670 on: September 21, 2011, 05:44:55 PM »

And holy crud the version with mipmaps looks TERRIBLE! Everything is super blurry, the no-mipmaps version is maybe a little unpleasantly sharp but you can at least look at it. Probably I should be building my own mipmap level images with some kind of clever algorithm or external art program instead of using gluBuild2DMipmaps (if I should be attempting this at all)?

Typically when resizing an image you need to add a bit of sharpening to prevent it from becoming blurry. What do you use for image editing?  If you're using Photoshop you can just create your mipmaps using photoshop's resize and get decent results. Bicubic sharper is a good default setting to use.
Actually, I am not creating mipmaps myself. I am using gluBuild2DMipmaps, which is part of the OpenGL "glu" library, to generate the mipmap images at runtime. Checking google, apparently gluBuild2DMipmaps has a very stupid resizing algorithm. So I think I need to be generating the images offline somehow instead of expecting this random library function to look right on complex line art.

I miss photoshop Sad
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
_Tommo_
Level 7
**


frn frn frn


View Profile WWW
« Reply #2671 on: September 21, 2011, 05:53:24 PM »

Ogg Vorbis decided to be crap on Windows.

ov_open_callbacks always returns -132 if I use my callbacks (which, by the way, work fine on IOS and OSX).
If I wrap fread/ftell etc in my callbacks, it loads BUT corrupts the heap and the program crashes in the nearest subsequent free().

I will now hope that's something's up with the SVN version, maybe the stable will work.

EDIT: Actually, I was loading the whole buffer without specifiying ios_base::binary  Embarrassed
Now everything works... but loading 15 mb worth of PNGs and sounds takes 1 minute. That is NOT ok.
« Last Edit: September 21, 2011, 06:22:05 PM by _Tommo_ » Logged

mcc
Level 10
*****


glitch


View Profile WWW Email
« Reply #2672 on: September 21, 2011, 07:29:47 PM »

Ogg Vorbis decided to be crap on Windows.

ov_open_callbacks always returns -132 if I use my callbacks (which, by the way, work fine on IOS and OSX).
If I wrap fread/ftell etc in my callbacks, it loads BUT corrupts the heap and the program crashes in the nearest subsequent free().

I will now hope that's something's up with the SVN version, maybe the stable will work.

EDIT: Actually, I was loading the whole buffer without specifiying ios_base::binary  Embarrassed
Now everything works... but loading 15 mb worth of PNGs and sounds takes 1 minute. That is NOT ok.
I like loading resources in a separate thread while the user is stuck at stuff like the menu screen.

But 1 minute sounds excessive under any circumstances, hm.
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
_Tommo_
Level 7
**


frn frn frn


View Profile WWW
« Reply #2673 on: September 22, 2011, 01:16:37 AM »

I like loading resources in a separate thread while the user is stuck at stuff like the menu screen.

But 1 minute sounds excessive under any circumstances, hm.

They load in under 3 s on an iPhone 3GS, so 1 minute is a bit much on a Core 2  Epileptic
Anyway I found out why it happened: loading itself was really fast, but I enabled memory leak detection and heap corruption... so it takes a LOT of time in Debug to check the correctness of any UTF-16 string is created!
Removing that made it fast as expected. But yeah, I'm a bit worried that my Strings can be so slow, even in debug  Cool
Logged

teomat
Level 2
**



View Profile
« Reply #2674 on: September 22, 2011, 10:16:58 AM »

I said that I'd shut up about my box2d port till it's done, but every time I posted in here I was able to solve my current problem within a few minutes.

So I was able to solve the last bug which caused some collisions simply not to happen.
And only seconds after I'm done with that I run into a new one in which I run into an inifinite loop.
I only know that it happens somewhere while solving the current contacts. Great...

Ugghhh, all I want is to get this working for once so I can finally show other people!  Screamy

Edit: Well, that was quick: the contact list in a body is looping and it hangs. Now I need to find what causes this.  I knew raging in here would help :D
Logged
Pishtaco
Level 9
****



View Profile WWW
« Reply #2675 on: September 23, 2011, 12:19:52 PM »

Gah, I was thinking I would start working with D again, six months and one new computer since I last used it. But it looks like it won't work with 64 bit windows.  Lips Sealed
Logged

Ashkin
Level 10
*****



View Profile
« Reply #2676 on: September 23, 2011, 07:20:36 PM »

I should really stop trying to port code I barely understand.
Logged
mcc
Level 10
*****


glitch


View Profile WWW Email
« Reply #2677 on: September 29, 2011, 11:41:56 PM »

Code:
string file = scrub(fragmentToString(fragments[dayName[levelForSpace(gs)]]));

I am not proud to be the person who wrote this line.
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
st33d
Guest
« Reply #2678 on: September 30, 2011, 04:13:20 AM »

Add complicated new feature based on previous code.

Discover all the optimisation in previous code is completely fucking broken and does nothing but eat cpu.

/facepalm
/facedesk
/facedesk
/facedesk
Logged
_Tommo_
Level 7
**


frn frn frn


View Profile WWW
« Reply #2679 on: September 30, 2011, 07:51:44 AM »

GameCenter on iOS returns crap values for leaderboards, ranging from 0 to any int... sometimes it stabilizes and always returns the OLD values for the player. It never returns the correct value.

 Waaagh!
Logged

teomat
Level 2
**



View Profile
« Reply #2680 on: October 01, 2011, 10:18:41 AM »

Alright, poly collisions should be working.
Let's see what happens.



Alright, at least it doesn't crash right away.



Yes! It works!



Wait, what's it doing?
I can see the Contact Normals being drawn, why does it not collide??



What's happening?!?



ಠ_ಠ

Damnit.
Logged
mcc
Level 10
*****


glitch


View Profile WWW Email
« Reply #2681 on: October 01, 2011, 08:17:59 PM »

I have a bunch of projects developed over a long period of time, all based on a vaguely similar "engine". I have a separate, "the engine" project that I maintain that contains just sort of a sample project containing all my engine code but the game logic stripped out. When I start a new project, I copy either the sample project or one of my existing projects; I then copy and paste features I've implemented in the past into the new project as needed. If there's some feature I know I'll need in all projects, I backport it into the "engine" project.


This is not working. I just today lost most of a day because project B, which I duped from project A about 2 weeks ago, needed shader postprocessing, but project A never needed that feature; so I copied the OpenGL interfacing code out of project C, which did have the feature, into project B. Immediately things broke and all text I drew was being drawn at 700x size. I spent hours trying to work out why that was happening before I realized that when I copied my opengl code I should have changed a single line in an ENTIRELY DIFFERENT file from

States(immediateTexture,true);
to
States(immediateTexture,true,true);

But I didn't remember I needed to do this weird 1-line fix, because it was months since I implemented the postprocessing feature.

Because I'm developing the engine at the same time I'm using it, when I improve one part of it it effects only the project I made the improvement in (and sometimes, the root project, but usually only with a delay for me to be sure I like it enough to keep it). And I can't just copy and paste stuff from one project to another because they're all using half-finished versions of the engine with different sets of improvements, so they're all not quite compatible with each other.
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
mirosurabu
Level 4
****


View Profile Email
« Reply #2682 on: October 03, 2011, 08:09:16 AM »

I'm getting headaches with AS3's matrix transformations.

What I'm trying to do is to make camera work without resorting to containers. I wrote the basic code as I understood it and it worked perfectly up until I tested changing "rotation" which made sprites shrink with every change. I suppose the setter is doing some voodoo I'm not aware of?

By the way, what I did is save the original matrix object at the end of the update loop (just before render functions are called), then add necessary translation to make camera work and then restore that matrix object at the start of the next update loop.
Logged
Glaiel-Gamer
Moderator
Level 10
******


Stoleurface!


View Profile WWW Email
« Reply #2683 on: October 03, 2011, 11:55:25 AM »

I'm getting headaches with AS3's matrix transformations.

scale it up by 20 each time, let me know if that works.


I've never encountered this bug but i've heard about it, flash (in certain circumstances?) does a pixel-to-twip conversion on its matrices automatically (a twip is 1/20 a pixel)
Logged

_Tommo_
Level 7
**


frn frn frn


View Profile WWW
« Reply #2684 on: October 07, 2011, 10:41:54 AM »

Just been rejected from AppStore because of a crash bug on Apple's part  Cool
None of my projects work when opened manually when using iOS5 because of this.

2 days A.S.J. and counting.
Logged

Pages: 1 ... 177 178 [179] 180 181 ... 275
Print
Jump to:  

Theme orange-lt created by panic