Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  3D Game Engine From Scratch  (Read 3410 times)
0 Members and 1 Guest are viewing this topic.
Offline hwinwuzhere
« Posted 2013-11-19 18:09:47 »

Here are some pictures of the 3D Game Engine I'm developing. I made it all the way from scratch using only plain old Java. (Don't ask me why, I did it because I can).

I'm not the most experienced programmer. I have about a year experience with java and a year and a half of object oriented programming.

Any ideas, suggestions or usefull articles are welcome. Feel free to give some feedback.

Currently I can rotate from left to right, up and down and I can walk around. I have the ability to make some objects and place them in the world. That's about it Wink

UPDATE:
I've been working a few hours last night and today to clean up the code. I'm now starting my list of features I want to implement. As soon as I finish my list I'll see if I can upload it so you can download it.

I have a laptop with an AMD quad core 2.3GHz Processor, AMD Radeon 1GB dedicated VRAM graphics card and 6GB RAM.
I can reach up to 130fps sometimes, but generally it runs between 60fps and it's cap 111fps. It runs on 60 ups.





What did the boolean say to the integer? You can't handle the truth.
Offline sploreg

Senior Member


Medals: 11
Projects: 1



« Reply #1 - Posted 2013-11-19 19:09:59 »

Cool! It's a real challenge to tackle writing an engine. Just to warn you: if you want to make games, don't start with making an engine. Creating an engine will eat up a year or two of development and get you not as far as the already established engines. That being said, it is a great way to learn about the inner workings of games and the engines that power them. The knowledge you gain from it will help you down the road.
Offline hwinwuzhere
« Reply #2 - Posted 2013-11-19 19:24:18 »

Thanks for the advice! I know it's indeed ambitious to start with an engine right away, but I already learned a ton of it. I've had some experience making games in java and C#, especially 2D games. I also worked with some engines, but I'm very eager to learn make games from scratch including their engines etc. that's why I started this project. I thought it would be usefull to post it for some help and motivation to finish it.

What did the boolean say to the integer? You can't handle the truth.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline saucymeatman
« Reply #3 - Posted 2013-11-19 19:53:03 »

Is it open source?
VERY cool by the way, this is really impressive.
Offline hwinwuzhere
« Reply #4 - Posted 2013-11-19 20:32:12 »

Not yet, it's still in it's roots. I have a little checklist in my head and when most of that is done I'll put it online. There are still a few issues I need to resolve before releasing it.

What did the boolean say to the integer? You can't handle the truth.
Offline Longarmx
« Reply #5 - Posted 2013-11-20 03:56:10 »

Pretty cool engine youve got there. Using java2d correct?

Also, the [img] tags should work if you put the url inside of them. If that doesn't work, try uploading to imgur.

Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #6 - Posted 2013-11-20 03:58:41 »

It's very cool that you're using Java2D for this, at first I assumed it was done in OpenGL, and I wasn't too impressed, but then I realized my mistake! Good job!

Offline hwinwuzhere
« Reply #7 - Posted 2013-11-20 08:31:45 »

Just plain Java Wink. It took me about 3 weeks to figure out how to work with matrices and stuff. Then it took me another 3 weeks to build it as far as I am now. Long live wikipedia and google Tongue

What did the boolean say to the integer? You can't handle the truth.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #8 - Posted 2013-11-20 11:41:44 »

Oh, matrices suck, I seriously despise them! I'll have to eventually learn them someday, but I'm very impressed you learned them that quickly Smiley Very good job, I can't wait to see what else you can do!

Offline cylab

JGO Ninja


Medals: 49



« Reply #9 - Posted 2013-11-21 12:50:52 »

Oh, matrices suck...
http://www.sjbaker.org/steve/omniv/matrices_can_be_your_friends.html

Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SHC
« Reply #10 - Posted 2013-11-21 12:55:46 »

Very nice. Can you post your system specs and the fps you are achieving? Just can't believe that Java2D can be that fast to tackle a 3D engine. Good luck with your project.

Offline dime26

Senior Member


Medals: 2
Projects: 3
Exp: 5 years


Should traffic wardens be armed?


« Reply #11 - Posted 2013-11-21 12:58:21 »

Very impressive, look forward to seeing how far you take this. Huge challenge to set yourself!
Offline EgonOlsen
« Reply #12 - Posted 2013-11-21 13:22:47 »

Just can't believe that Java2D can be that fast to tackle a 3D engine. Good luck with your project.
Why shouldn't it? Softwares renderers for Java exist for ages. On a current i5/i7 machine, you can render a fully textured Quake3 level in 1280*1024 @ 30-60fps in software.

Offline hwinwuzhere
« Reply #13 - Posted 2013-11-21 14:07:31 »

I have a laptop with an AMD quad core 2.3GHz Processor, AMD Radeon 1GB dedicated VRAM graphics card and 6GB RAM.
I can reach up to 130fps sometimes, but generally it is between 60 and it's cap 111fps. Meanwhile it runs on 60 ups.

What did the boolean say to the integer? You can't handle the truth.
Offline StrideColossus
« Reply #14 - Posted 2013-11-21 15:11:06 »

Sounds like you have a list of features that you're planning to investigate, design and implement all at the same time - big challenge! but an interesting one.

Having attempted to do something very similar myself (3D using OpenGL) one approach I would suggest is to follow an iterative development style:

Decide what feature(s) you're going to deliver next and stick to it.  Once you've got the next feature up-and-running have a pause and take the time to:
- tidy-up your code and documentation or notes.
- extract any generic code into reusable classes/packages that can be used elsewhere (and checking you haven't broken anything).
- re-review your list of features, you might have to change the order or priorities depending on what you've learnt.

I like to call this the perspiration-then-consolidation approach Wink

- stride
Offline hwinwuzhere
« Reply #15 - Posted 2013-11-21 15:30:38 »

Hey that's a good one! Thx for the advice.

What did the boolean say to the integer? You can't handle the truth.
Offline lcass
« Reply #16 - Posted 2013-11-21 16:09:54 »

What kind of performance tests have you done . Good ones are where you set it to render a certain number of verticies and then check the fps.

Also what do you use to render is the render function for your objects called in a tick function?
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #17 - Posted 2013-11-21 19:41:45 »

Well , that just changed my perception on matrices, thank you very much!!

Offline hwinwuzhere
« Reply #18 - Posted 2013-11-21 20:43:00 »

I haven't done alot of tests, however I have tested it on performance when using a load of vertices. When the amount of vertices increases significantly (and then I'm speaking about hundreds of thousands) the framerate starts to drop. However when using 5 grids (so that is 20 * 20 + 20 * 10 * 4 = 1200 points in the case of the pictures in my post) it doesn't effect the performance alot.

What did the boolean say to the integer? You can't handle the truth.
Offline lcass
« Reply #19 - Posted 2013-11-21 20:45:18 »

How are you going to do the rasterization its currently what im stuck on.
Offline hwinwuzhere
« Reply #20 - Posted 2013-11-24 10:15:07 »

I. Have. No. Idea. Cheesy. I work from scratch, no knowledge, no API's I'll figure it out somehow. That's how I did the rest of it too.

What did the boolean say to the integer? You can't handle the truth.
Offline lcass
« Reply #21 - Posted 2013-11-24 11:08:00 »

Ive managed to figure it out if you would like some help also you are a genius for this  "What did the boolean say to the integer? You can't handle the truth" Cheesy
Offline hwinwuzhere
« Reply #22 - Posted 2013-11-24 11:55:25 »

I'll be sure to ask you if I get stuck. I like to figure things out for myself first ^^

What did the boolean say to the integer? You can't handle the truth.
Offline lcass
« Reply #23 - Posted 2013-11-24 14:45:58 »

tip: Think triangles Cheesy
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

radar3301 (11 views)
2014-09-21 23:33:17

BurntPizza (28 views)
2014-09-21 02:42:18

BurntPizza (19 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

BurntPizza (30 views)
2014-09-19 03:14:18

Dwinin (47 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!