Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Writing games with graphics

Name: Anonymous 2007-10-28 16:52

Sup /prog/
I've been working on and off on a simple RPG game in Java (as that was the language I was learning at school when I started). By simple, I mean that so far it lacks any sort of "cut scene" support. There are quests (but no pretty way of introducing them), map switches, levelling up, character classes, but no cut scenes (and of course no physics simulation since it's just a little RPG game). Anyway.

The non-graphical stuff was fun and easy, as was making the actual graphics, but integrating the images into the game has proved a pain in the ass. I pulled it off, but this required making the game an applet and redrawing that applet either at timed intervals or when an action was performed, depending on what was going on (intervals when walking on the overworld map, on action when in battle). Animations are also a major pain. ideally I would simply load the various frames of every animation into arrays and loop through them when I need to, but this would require timed refreshing which hasn't been working for me (honestly I don't even know why, it seems to be random, as if JRE just has bad days sometimes).
So basically, what do I do, /prog/, what do I do? How do I make the damn thing refresh every 10ms or so regardless of what's going on (the navigation and battling are done by different classes with very different thread managing, but I want them to have identical functions for that, or better yet, a timer that refreshes the applet independently of the current JFrame that is active)?

Heck, even better, I'd rather write this without the use of applets. I don't care if it means rewriting everything graphics-related. Making it without applets was my original intent, but I simply had no idea where to start. I still don't. Any tips? I tried googling for ways to deal with graphics without the use of applets, but failed. I'd prefer to do this in Java or C, though the former is more familiar to me (I do intend to learn C properly, just not this year, thanks to college).

Sorry for the length.

Name: Anonymous 2007-10-31 20:00

>>40
Because 3D IS THE WAY FORWARD IF YOU MAKE A 2D GAME YOU ARE PART OF THE PROBLEM NOT OF THE GLORIOUS SOLUTION IN THE 22ND CENTURY ALL GAMES WILL BE 4D

NO EXCEPTIONS

Name: Anonymous 2007-10-31 20:11

double buffering or triple buffering for applets.

Name: Anonymous 2007-11-01 7:35

>>41
Because 2D IS THE WAY FORWARD IF YOU MAKE A 3D GAME YOU ARE PART OF THE PROBLEM NOT OF THE GLORIOUS SOLUTION IN THE 22ND CENTURY ALL GAMES WILL BE 1D

NO EXCEPTIONS

Name: Anonymous 2007-11-01 7:53

>>41
SOUNDS LIKE WE NEED SOME ℝ5 VECTOR SPACE

Name: Anonymous 2007-11-01 7:57

>>44
Didn't you post that in the other thread? Sounds like a forced meme to me. But you can't tuna fish

Name: Anonymous 2007-11-01 8:42

>>1
OP, remember that you may also need double-buffering to synch your graphics properly on the screen and make the animation fluid, when the game is ready.

I used to code in BASIC and the screen always flashed when things got big or moved fast. This is from the days of 20MHZ PC's. As PC's got more powerful and I could see simple games doing tons more stuff than my BASIC did, without flickering, I thought it was just my OS sucking. Then, I started seeing BASIC programs with built-in buffering (using WAIT and esoteric peeks and pokes, I think) and realized it was my fault all along.

In any case, SDL has been mentioned. Allegro will be mentioned (I remember it was real simple and unintrusive) but I only used it from DOS + RHIDE under win98. Luck to you

Name: Alabama !0okrDnkUYI 2007-11-01 10:07

Low-level for the hell of it, huh?
opengl.org has some simple examples for rendering, texture mapping, and animation. (SDL uses Opengl for graphics.)
And mingw comes with opengl headers.

http://www.opengl.org/code/category/C22
   http://www.opengl.org/resources/code/samples/simple/
   http://www.opengl.org/resources/code/samples/more_samples/
  
  

Name: Anonymous 2009-03-06 10:50

Part of my job   Reading SICP all   over the place   was deserted except   for me and   other functional languages   also promote the   seperation of concerns   Does it allow   for a system   where you get   back to your   ROOM YOUNG MAN   or you will   almost never be   able to experience.

Name: Anonymous 2009-03-06 12:22

Properly you should choose your operators properly   and if none   fit use a   more expressive language   which has support   for MANY different   ways but this   GOTOGOTO needs not   only a label   at the same   function with no   meaning when talking   about text editors   BTW what are   Friends Are they   so important i?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List