Get the latest Education e-news
 

Go Back   Game Career Guide Forums > Programming
Forum Home Register Members List Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-22-2009, 07:26 AM   #11
apatriarca
Member

Activity Longevity
0/20 17/20
Today Posts
0/11 sssssss42
Location: Turin, Italy
Default

I personally like Haskell because of its elegance and purity. But I usually use C++ or C# to make the majority of my programs.
apatriarca is offline   Reply With Quote
Old 02-27-2009, 10:37 AM   #12
Zooch
Senior Member

Activity Longevity
0/20 17/20
Today Posts
0/11 ssssss186
Default

How long have you guys been using C++? And lua?
Zooch is offline   Reply With Quote
Old 02-27-2009, 11:26 AM   #13
Adrir
Administrator
 
Adrir's Avatar

Activity Longevity
1/20 20/20
Today Posts
0/11 sssss1465
Location: London, UK
Default

Quote:
Originally Posted by DTR View Post
It just feels frustrating with Java and co' when no matter what algorithm you choose, no matter how you try optimizing your code, you will always be limited by the language itself. Sure, you can make things fast. Very fast. But still, never reaching the "optimal" execution speed.
Hehe, that's what one of our old lecturers said about going to C and C++ from Assembly.
__________________
Michael 'Adrir' Scott :: Games, Virtual Worlds, Education
Networking | Current Project | Research | Teaching
Adrir is offline   Reply With Quote
Old 02-27-2009, 03:15 PM   #14
Gshonk
Moderator

Activity Longevity
0/20 20/20
Today Posts
0/11 ssssss831
Location: Philadelphia, PA
Default

Quote:
Originally Posted by Zooch View Post
How long have you guys been using C++? And lua?
A little more than 3 years for C++. I have only looked at Lua a little.
__________________
Grant Shonkwiler()
"I would love to fix the world if someone would just give me the source code"
Website Industry blog LinkedIn
Gshonk is offline   Reply With Quote
Old 02-28-2009, 11:45 PM   #15
Tetragrammaton
Junior Member

Activity Longevity
0/20 16/20
Today Posts
0/11 sssssss29
Default

Quote:
Originally Posted by DTR View Post
It just feels frustrating with Java and co' when no matter what algorithm you choose, no matter how you try optimizing your code, you will always be limited by the language itself. ( Sure, you can make things fast. Very fast. But still, never reaching the "optimal" execution speed.
So you program in assembly?
__________________
E McNeill
Tetragrammaton is offline   Reply With Quote
Old 03-01-2009, 03:21 AM   #16
DTR
Member

Activity Longevity
0/20 17/20
Today Posts
0/11 sssssss94
Location: Helsinki, Finland
Default

Quote:
Originally Posted by Tetragrammaton View Post
So you program in assembly?
Umm, actually I do, but thats beside the point :P

Small costs here and there form a huge river.
Array index check here.
Garbage collection there.

Just for the record, I recently wrote a basic raycaster in java just for the fun of it. Nothing fancy. The everyday symmetrical grid based thingy.

Decided to use Java2D trusting that it might just be effective enough...

Lo and behold. Profiling reveals that 95% of the execution calls consists of raster array manipulations, scaleImages and drawImages.
(Managed to eliminate scaleImage calls alltogether by somesort of caching class, but that did not do much).

The thing works nicely in resolutions under 640 x 480. However, squeezing any more than 15 fps from resolutions above that mark proved difficult.

The walls render well enough, but the darn ceiling and floor casting takes insane amounts of

raster.setElem(indx, color);

Not only is it a method call, but most certainly there is also an array indexing happening inside the thing.

So here I am paying for:

method call spiced with passing of 2 params.
+ possible unwanted array index checkup

Doubt the memory cache likes this type of foolery very much. At least the fps stays ridiculously low with hundreds of thousands of individual bloated operations.

go Java!

Last edited by DTR : 03-01-2009 at 03:30 AM.
DTR is offline   Reply With Quote
Old 03-01-2009, 07:26 AM   #17
yaustar
Administrator
 
yaustar's Avatar

Activity Longevity
2/20 19/20
Today Posts
1/11 sssss2264
Location: UK
Default

Quote:
Originally Posted by DTR View Post
Decided to use Java2D trusting that it might just be effective enough...
That's a problem with the library, not the language.
yaustar is offline   Reply With Quote
Old 03-01-2009, 07:55 AM   #18
DTR
Member

Activity Longevity
0/20 17/20
Today Posts
0/11 sssssss94
Location: Helsinki, Finland
Default

Quote:
Originally Posted by yaustar View Post
That's a problem with the library, not the language.
That may be so.
Im currently making the thing make use of OpenGL with JOGL instead.

Its not like the array indexing or method calling is going to be significantly less with it.

The fact being that huge majority of time went on floor and ceiling rendering. (drawing the horizontal resolution amount of differently scaled slices was not particulary heavy task)

I wrote the pixels directly into the raster, which I drew at the end of the rendering on screen.

The actual raycasting operation took less than 7 % of the total execution time and I was happy with that.

That one blitting at the end of the rendering just cant have been that consuming, unlike the constant array operations assigning pixel values.

I just have a feeling that the performance is not going to increase too much with OpenGL....

But should it do so, well. I would ge glad.
DTR is offline   Reply With Quote
Old 03-01-2009, 08:52 AM   #19
yaustar
Administrator
 
yaustar's Avatar

Activity Longevity
2/20 19/20
Today Posts
1/11 sssss2264
Location: UK
Default

Can't you turn off the array bounds check when you compile it?
yaustar is offline   Reply With Quote
Old 03-01-2009, 10:00 AM   #20
DTR
Member

Activity Longevity
0/20 17/20
Today Posts
0/11 sssssss94
Location: Helsinki, Finland
Default

Quote:
Originally Posted by yaustar View Post
Can't you turn off the array bounds check when you compile it?
I have read a few sources on the internet about the thingy, and it definately does not seem practical.

http://c2.com/cgi/wiki?CatchDontCheck

Suggestions range from abusing try{}catch() to using array.length as the loops cap value have been suggested.

For me it seems as if the thing works much like the garbage collector. If works if the compiler so pleases without asking many questions.

Only reason I chose java for the task anyway was the crossplatfom compatibility and the apparently faster prodution speed.
DTR is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 03:22 AM.






UBM Tech