Jump to content

So, what is your current project(s)


sees_all1

Recommended Posts

  • Replies 169
  • Created
  • Last Reply

Top Posters In This Topic

Still doing the roguelike game I said about earlier. I've had a lot of trouble with mapgen, but now I have one that works perfectly. Every room is connected to every other room, and the corridors aren't as chaotic as they used to be. It's way too hardcoded (it makes 40x30 maps and nothing else), but it doesn't really matter right now.

 

[hide=screenshot]mapgen4.png[/hide]

 

Now that it is done, I can finally begin the more interesting stuff (like monsters) :)

Link to comment
Share on other sites

  • 3 weeks later...

So I've been pondering how the Runescape game engine works over the past few weeks. I know they use Java and c++ for the main engine components. One thing I was trying to figure out is how they rendered code using c++ on a java canvas (the applet canvas). After studying JNI a little further, I read about something called JAWT. JAWT is the Java abstract window toolkit native interface. It allows you to use native code (c/c++) to render on a awt component. So after doing some more digging into JAWT, I realized I can use the OpenGL libraries for c/c++ to render 3d graphics onto the canvas by calling the methods with simularly named java methods.

 

I want to try and make my own engine and see if I can achieve similar results. What I will attempt to do is generate native code for required OpenGL operation then render a 3D cube on screen. After I get that working, I can add more OpenGL calls and anything else I want. I have about 250 OpenGL calls I can use listed in a file, but I only need a few like glClear(), glPushMatrix(), glVertex3f(), glColor3f(), etc to render a simple cube.

 

Here is a copy of my GLInterface class:

[hide=Java code]

public class NullbrainGL {

static {
	System.loadLibrary("NullbrainGL");
}

public static final native void glTranslatef(float x, float y, float z);

public static final native void glRotatef(float x, float y, float z);

public static final native void glColor3f(float r, float g, float b);

public static final native void glColor3i(int x, int y, int z);

public static final native void glColor3d(double x, double y, double z);

public static final native void glColor4f(float r, float g, float b,
		float alpha);

public static final native void glColor4i(int r, int g, int b, int alpha);

public static final native void glColor4d(double r, double g, double b,
		double alpha);

public static final native void glVertex3i(int r, int g, int b);

public static final native void glVertex3f(float r, float g, float b);

public static final native void glVertex3d(double r, double g, double b);

public static final native void glScalef(float x, float y, float z);

public static final native void glBegin(int parameter);

public static final native void glEnd();

public static final native void glFlush();

public static final native void glLoadIdentity();

public static final native void glClear(int paramters);

public static final native void glEnable(int parameter);

public static final native void glDisable(int parameter);

public static final native void glTexCoord2f(float x, float y);

public static final native int glGetError();

public static final native void glOrtho(double left, double right,
		double bottom, double top, double near, double far);

// Methods not related to openGL  but to application and rendering...

public static final native void Render();

public static final native void Init();

public static final native void CleanUp();

public static final native void Logic();

}

 

 

[/hide]

This file generates:

[hide=C code]

* Method:    glDisable
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_NullbrainGL_glDisable
 (JNIEnv *, jclass, jint);

/*
* Class:     NullbrainGL
* Method:    glTexCoord2f
* Signature: (FF)V
*/
JNIEXPORT void JNICALL Java_NullbrainGL_glTexCoord2f
 (JNIEnv *, jclass, jfloat, jfloat);

/*
* Class:     NullbrainGL
* Method:    glGetError
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_NullbrainGL_glGetError
 (JNIEnv *, jclass);

/*
* Class:     NullbrainGL
* Method:    glOrtho
* Signature: (DDDDDD)V
*/
JNIEXPORT void JNICALL Java_NullbrainGL_glOrtho
 (JNIEnv *, jclass, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble);

/*
* Class:     NullbrainGL
* Method:    Render
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_NullbrainGL_Render
 (JNIEnv *, jclass);

/*
* Class:     NullbrainGL
* Method:    Init
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_NullbrainGL_Init
 (JNIEnv *, jclass);

/*
* Class:     NullbrainGL
* Method:    CleanUp
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_NullbrainGL_CleanUp
 (JNIEnv *, jclass);

/*
* Class:     NullbrainGL
* Method:    Logic
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_NullbrainGL_Logic
 (JNIEnv *, jclass);

#ifdef __cplusplus
}
#endif
#endif

[/hide]

All I have to do is add the CPP code in my GLInterface.cpp file and test it out.

wii_wheaton.png

[software Engineer] -

[Ability Bar Suggestion] - [Gaming Enthusiast]

Link to comment
Share on other sites

  • 4 weeks later...

Starting coding my Senior Project. (at least part of it for now). I'm using this javascript (http://particletree.com/features/dynamic-resolution-dependent-layouts/) so I can make sure the website looks great on different resolutions. Will probably have a mobile version (low resolution), a sort of "normal" resolution for like 1024x768/1280x1024 and then the widescreen resolution (1680x1050 and 1920x1080, which is what I designed it in). The javascript code for it is really easy to understand too, I'm happy.

 

All it does is pretty much lets me use different CSS files based off of the window size. :thumbup:. Saves me a ton of headaches, especially because I'm not very good with text formating with websites yet.

Link to comment
Share on other sites

I'm a bit curious bballer, but is the floats for efficiency and less cpu usage? I'd imagine doubles could work just fine or something.

 

As for me, I'm learning pointers and dynamic allocation. Yay.

I was going to eat hot dogs for dinner tonight. I think I will settle for cereal.

 

OPEN WIDE HERE COMES THE HELICOPTER.

Link to comment
Share on other sites

I'm a bit curious bballer, but is the floats for efficiency and less cpu usage? I'd imagine doubles could work just fine or something.

 

As for me, I'm learning pointers and dynamic allocation. Yay.

 

 

I am using floats for testing purposes for less cpu usage and speed. Floats use 32-bits of storage and are faster with mid-range processors. Doubles produce more precise mathematical calculations when working with with some of the trigonometrical and algebraical functions I will need to work with. Doubles use 64 bits of storage and are faster than floats on newer, mathematically optimized processors like the AM3 and i3/i5/i7 processors. I will switch to doubles later on, but for research purposes, I will be sticking with floats. My goal is to produce an engine which is compatible across 90% of the computers built in the past 5 years. I don't want to be limited based on prehistoric computers. I am refreshing my trig/calc/algebra skills right now, as well as doing some research and planning. My goal is ultimate efficiency while providing, with no other appropriate term, epic graphics capabilities. I have three target systems right now to test my engine on as I develop it. One machine is a Linux box running Ubuntu 8.4 I think, with a dual-core 2.8ghz processor and 2GB of RAM running an Nvidia 8600 graphics card with 256MB of memory. The next system is a iMac with a dual core 2.7 Ghz processor running OS-X using on-board graphics. The final machine will be a higher end computer with an Intel i7 960 running at 3.2Ghz with 6GB of RAM as well as a GTX 470 with 1280 MB of video memory.

wii_wheaton.png

[software Engineer] -

[Ability Bar Suggestion] - [Gaming Enthusiast]

Link to comment
Share on other sites

Ah, fair enough. I know that floats take up less cpu usage than doubles, I was just curious.

I was going to eat hot dogs for dinner tonight. I think I will settle for cereal.

 

OPEN WIDE HERE COMES THE HELICOPTER.

Link to comment
Share on other sites

  • 2 weeks later...

currently im working on a audio/midi sequencer in c++. not to far into it yet but should be pretty interesting to do. will hopefully end up with something like audacity. not ambitious enough to aim for any of the more commercial pacages :P

matyre1.png
Link to comment
Share on other sites

  • 5 months later...

Just finished writing a collision detection method for 2D polygons in java. It seemed to work with rotated rectangles, I hope it works when I test it some more. "Working" on a topdown shooter (think GTA2).

Link to comment
Share on other sites

working on a couple iphone apps right now...

 

One is a nutrition calculator, the other is a game, still in the early stages of development.

99 dungeoneering achieved, thanks to everyone that celebrated with me!

 

♪♪ Don't interrupt me as I struggle to complete this thought
Have some respect for someone more forgetful than yourself ♪♪

♪♪ And I'm not done
And I won't be till my head falls off ♪♪

Link to comment
Share on other sites

  • 2 weeks later...

working on a fangame, currently in alpha v2.5.1

 

i know that i can't link things though, but the game is called I wanna be PHAT! for those that care to look it up.

 

yes, it's an IWBTG fangame, and it's my first try at making a game.

Did you know...

... that when you click on an object in the Construction Skill guide, the materials needed show up in your chat box? (Thanks to adamantcheses!)

Link to comment
Share on other sites

Currently doing a prime finding program in java. Brute-forcing is only so good, so I'm using the sieve of eratosthenes and doing a few efficiency tweaks. The program takes an input for the max value of any prime number (ie entering 1000000 would get you all primes under 1 million), and sieves from there. My problem is that it all must be stored in RAM, because if you start using swap it just gets incredibly slow. To generate more numbers then you need to start getting rid of some entries already in the ram (not helped at all by the fact that I can't seem to find a method of storing a boolean value in one bit only, java's "boolean" seems to take a byte). However if you start filling up the ram with more numbers (say you've sieved up to 1 milllion, but want to expand to 2 million), then you need to sieve using the primes already generated again! One thing I can do is get rid of all entries for even numbers though.

 

I'm not sure if that made much sense.. I don't have the code on this computer but the logic is that data about any numbers prime-ness is stored in one boolean array. The entry in the array corresponds to a number, and the true/false flag corresponds to primality. So for example, myarray[7] would be true because 7 is prime, whereas myarray[9] would be false. (yes I know java starts arrays at [0], I just make the array 1 bigger than it must be and ignore that entry.)

RIP TET

 

original.png

 

"That which does not kill us makes us stronger." - Friedrich Nietzsche

Link to comment
Share on other sites

Currently doing a prime finding program in java. Brute-forcing is only so good, so I'm using the sieve of eratosthenes and doing a few efficiency tweaks. The program takes an input for the max value of any prime number (ie entering 1000000 would get you all primes under 1 million), and sieves from there. My problem is that it all must be stored in RAM, because if you start using swap it just gets incredibly slow. To generate more numbers then you need to start getting rid of some entries already in the ram (not helped at all by the fact that I can't seem to find a method of storing a boolean value in one bit only, java's "boolean" seems to take a byte). However if you start filling up the ram with more numbers (say you've sieved up to 1 milllion, but want to expand to 2 million), then you need to sieve using the primes already generated again! One thing I can do is get rid of all entries for even numbers though.

 

I'm not sure if that made much sense.. I don't have the code on this computer but the logic is that data about any numbers prime-ness is stored in one boolean array. The entry in the array corresponds to a number, and the true/false flag corresponds to primality. So for example, myarray[7] would be true because 7 is prime, whereas myarray[9] would be false. (yes I know java starts arrays at [0], I just make the array 1 bigger than it must be and ignore that entry.)

 

Use bitwise and bit shift methods.

Link to comment
Share on other sites

  • 2 weeks later...

o wat even is Visual Basic. No seriously, it's a horrendous language... I've recently decided to build a quick and lightweight .NET website to learn how MVC works. For some stupid reason, I somehow ended up writing the logic in VB, which I have never encountered previously (I'm a C# nerd). The language is just brutal to learn, 95% of the time I actually spend coding this project is spent correcting syntax.

 

Additionally, I have not yet started to see the distinct advantage that MVC has over classic web forms. Though the concept is quite brilliant, so far it has been quite a bit of extra work just hopping between my various project files as well as constantly reminding myself to tie my views, models, and controllers together properly.

Follow my road to 5.6/Gold Reaper/True Trim - DAT BLOG

Link to comment
Share on other sites

VB has its uses. It's definitely not the easiest programming language to use.

 

If you end up using VB.NET it's not that bad, they've added some C# like syntax that makes it a little more usable. It's once you get into vb6 or vba that it gets more annoying.

polvCwJ.gif
"It's not a rest for me, it's a rest for the weights." - Dom Mazzetti

Link to comment
Share on other sites

  • 2 weeks later...

Eh, so three weeks in, and we're just starting to get into math. No variables, nothing but making command buttons that change the properties of other objects. One of my complaints about online tutorials is they go to fast without explaining everything, but this is ridiculous. It's vb5 too for some reason.

Link to comment
Share on other sites

Okay, i want to ask something in the Ruby language, i've just started around a month ago and this is my first language, so you could say i'm new to this.

I wanted to get a program to take time to do something, i came up with this code:

 

*random loop*

*random iteration*

time1 = Time.new + 2

until (time2 = Time.new) == time1

end

end

 

so, this works, the iteration gets done every 2 seconds, BUT, the code just stops working at a random time, and i just can't get why. can anybody help?

Link to comment
Share on other sites

Eh, so three weeks in, and we're just starting to get into math. No variables, nothing but making command buttons that change the properties of other objects. One of my complaints about online tutorials is they go to fast without explaining everything, but this is ridiculous. It's vb5 too for some reason.

 

VB5? What the hell? Are you sure you're in the right place? The college I go to teaches VB.Net 2010 (although I got my papers when they were teaching 2008). vb6 is already outdated and they're teaching you vb5... :shock:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.