Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (428)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5] 6 7 ... 10
 41 
 on: 2014-04-24 09:00:21 
Started by lfsmoura - Last post by Riven
The image won't load. You exhausted the allocated CPU time of your (virtual) server / account. Use free, reliable services like imgur instead.

 42 
 on: 2014-04-24 08:32:09 
Started by Mr.CodeIt - Last post by Gibbo3771
Oh look this thread, no longer going to entertain it. Me and others have told you about slick2d, lwjgl and libgdx multiple times.

 43 
 on: 2014-04-24 08:26:49 
Started by Grunnt - Last post by 04hockey
Wow this is great! Thanks for sharing!

 44 
 on: 2014-04-24 08:23:13 
Started by 04hockey - Last post by 04hockey
What I really wanted to know was whether I should have the Arrays hold Enum values or actual Objects.

But I'm pretty positive that actually having Objects is probably the better option. Thanks everyone!

 45 
 on: 2014-04-24 08:17:59 
Started by zhengdk - Last post by zhengdk
Seems we are not talking entirely about the same thing. I think you have set the GAME_UPDATE_time to a fix time, and then using a speed variable to change mobile moving speed.

But for me game speed is not just about mobile moving. For example, mage chant spells, it gets delayed. So if game speed changed, the delay time should also change. Here, you will use system time * Game.speed to measure delay time?
You mean you want game to run at 1/4 speed for example? The only way I know is to have a global variable like speed and multiply every operation you do in your game by that variable.

So if you want to have 1/4 speed, have like static float speed = 0.25f;

When you want to move character, multiply the amount you add to players position by 0.25f. So
1  
player.x += player.speed * Game.speed;


And yes, you need to do this for EVERY variable you modify that needs to change speed.. I don't know any other way.

 46 
 on: 2014-04-24 08:11:16 
Started by BurntPizza - Last post by BurntPizza
Yeah, I only really included that particular in the OP to, uh, pique interest? It is, as you say, almost never a good idea and I'd say is pushing the envelope of a "design pattern."

I had a good time writing a CPU emulation (more of a instruction set simulator I guess) and it's assembler inspired at first by that article, but only as a pet project. I wouldn't ship in a game or anything else for that matter, it's not mature at all. And that's good.

If you need some kind of scripting, write an API for mods to interface with, or use Nashorn or something. A VM (and it's language, it's implementation of that language, the list goes on...) is an enormous time sink if you want to even begin to have anything more than a really hard to use assembly language. And you most likely won't get a lot of it right, like security, which was one of the main points in this context.

I think it's a great little curiosity project, but that's it.

Edit:
I'd listen to Deutsch:
"Every now and then I feel a temptation to design a programming language but then I just lie down until it goes away."

 47 
 on: 2014-04-24 07:59:57 
Started by BurntPizza - Last post by Riven
Even a minimal (not even remotely close to full fledged) scripting language is a huge undertaking, and once you're doing it, you will keep adding features.

If you want to write a game, write a game! Don't create an environment with custom tools. True experts have done it before you, did it better than you will ever do it, and open sourced it. Use it, and finish that game, make it entertaining for the player, not technically impressive.

If this was GameEngineProgrammingPatterns.com I'd be the greatest fan (kinda), but this is just plain bad advice.

His main reason for rolling his own language is working around C compile times, which can take a few minutes per... tweak. In Java we don't have that issue, and we can even hotswap code. Regardless of his motivations, he should have used (and advised) an existing scripting language. We have enough indies that never get to publish a game.

 48 
 on: 2014-04-24 07:53:41 
Started by zhengdk - Last post by trollwarrior1
You mean you want game to run at 1/4 speed for example? The only way I know is to have a global variable like speed and multiply every operation you do in your game by that variable.

So if you want to have 1/4 speed, have like static float speed = 0.25f;

When you want to move character, multiply the amount you add to players position by 0.25f. So
1  
player.x += player.speed * Game.speed;


And yes, you need to do this for EVERY variable you modify that needs to change speed.. I don't know any other way.

 49 
 on: 2014-04-24 07:49:29 
Started by BurntPizza - Last post by LiquidNitrogen
making a simple scripting mechanism which can be edited in a level editor to control events for each individual level seems like a good idea to me.. i didnt read that article though so ill assume its not talking about something so simple

 50 
 on: 2014-04-24 07:44:40 
Started by BurntPizza - Last post by HeroesGraveDev
@Riven:
Quote
Of course, there’s nothing wrong with making a full-fledged language. Just make sure you do so deliberately. Otherwise, be very careful to control the scope of what your bytecode can express. Put a short leash on it before it runs away from you.
                                                     

Pages: 1 ... 3 4 [5] 6 7 ... 10
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (79 views)
2014-04-15 18:08:23

BurntPizza (71 views)
2014-04-15 03:46:01

UprightPath (82 views)
2014-04-14 17:39:50

UprightPath (66 views)
2014-04-14 17:35:47

Porlus (82 views)
2014-04-14 15:48:38

tom_mai78101 (106 views)
2014-04-10 04:04:31

BurntPizza (166 views)
2014-04-08 23:06:04

tom_mai78101 (262 views)
2014-04-05 13:34:39

trollwarrior1 (212 views)
2014-04-04 12:06:45

CJLetsGame (221 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!