saucymeatman
|
 |
«
Reply #90 - Posted
2014-03-06 23:29:07 » |
|
Sorry, I was vauge.
I meant that it would be interesting if it would generate a procedural texture based on the size parameter, so you wouldnt have to pass in any images. Because, for instance, if you pass in a low res texture and have a wall of text, it will stretch itself out, and it would be a pain to have alot of differently sized textures for gui.
You could have a constructor with no texture parameters that generates one for you that will fit the size. Like in swing with JButton,
JButton b = new JButton("ButtonText"); b.setSize(100,100); //do whatever else.
Swing generates the button texture for you, based on the size you gave it, is what I'm trying to say.
|
|
|
|
kpars
|
 |
«
Reply #91 - Posted
2014-03-06 23:49:10 » |
|
I admit to being lazy and not working on GUI. It's not really my cuppa. Still much more to come though!
(Wes Get The f**k On IRC Right Now or I'll bash your head in. #jeviny, Esper.)
- Jev
|
|
|
|
Opiop
|
 |
«
Reply #92 - Posted
2014-03-06 23:50:29 » |
|
I'm coming back too Wes  The teams all back together! *cliche music plays*
|
|
|
|
Games published by our own members! Check 'em out!
|
|
saucymeatman
|
 |
«
Reply #93 - Posted
2014-03-07 00:07:32 » |
|
Dude your old laptop looks EXACTLY like mine! Ha. HP Pavilion ENVY dv6 is mine, that one looks like a HP Pavilion ENVY also.
|
|
|
|
kpars
|
 |
«
Reply #94 - Posted
2014-03-07 00:16:01 » |
|
Can we get back on topic before this ends up in the chitchat monster?
- Jev
|
|
|
|
|
Opiop
|
 |
«
Reply #96 - Posted
2014-03-08 22:00:08 » |
|
Meh, our name is an abbreviation. I don't think it could possibly matter legally because... They are just game engines that are free.
|
|
|
|
Opiop
|
 |
«
Reply #97 - Posted
2014-03-08 22:11:15 » |
|
Yeah but Apple is a huge company just looking to snatch up more money from smaller companies. I seriously doubt this person would have a problem with us, but it would be a good move to email her.
|
|
|
|
Agro
|
 |
«
Reply #98 - Posted
2014-03-08 22:12:25 » |
|
it doesnt really matter, its just a name really... how many products/engines have i seen out there that have the same name
|
|
|
|
Brynn
|
 |
«
Reply #99 - Posted
2014-03-08 22:39:28 » |
|
I bet there is no SAGL engine already taken. 
|
Welcome to a new kind of tension All across the alienation Where everything isn't meant to be okay
|
|
|
Games published by our own members! Check 'em out!
|
|
|
Brynn
|
 |
«
Reply #101 - Posted
2014-03-08 22:58:14 » |
|
|
Welcome to a new kind of tension All across the alienation Where everything isn't meant to be okay
|
|
|
Opiop
|
 |
«
Reply #102 - Posted
2014-03-10 04:12:07 » |
|
So I've been whipping up something fun! Presenting the AutoLoader function! One thing I always hated when working with resources in other libraries was having to load every single resource one at a time, so I decided to implement a loading function that will load all resources for you! It's very simple to use (although it is a WIP). Here's how: First, you can load resources from within or outside of your Jar file. Currently loading for external is the only function that is complete, internal is going to take some more work. To load resources from a folder (relative to the Jar file): 1
| RM.autoLoad("src_base/com/teama/merc/test/resTest", false); |
The first parameter the function takes is the folder you wish to load resources from. The second parameter is whether the path is pointing to external or internal resources. The function then loads the files (only files that have parsers for them will load) and adds them to the list of resources contained in the ResourceManager. Anyway, hope someone enjoys my brain child  - Team Alluminum
|
|
|
|
kpars
|
 |
«
Reply #103 - Posted
2014-03-13 21:11:56 » |
|
Thank you for posting this, I feel more people should use IRC.
On a second note, I added a bot to the channel. Feel free to mess around with it.
- Jev
|
|
|
|
saucymeatman
|
 |
«
Reply #104 - Posted
2014-03-18 01:51:45 » |
|
That last part that, I definetly didnt read of course  made me laugh hahaha My frustration expressed in prose : Oh, my Vanessa do none other bear the same name as thou? Because my Vanessa, I'd betcha your name is all the sweeter shared Doth only one namespace exist in c++? Nay, a single identifier in Java? Hath one's symbols never, not once, been redefined? Oh, my Vanessa And if this be all true, could the Mercurys not share names too? Vanessa, your giving me the blues. Are we not indie too?
|
|
|
|
kpars
|
 |
«
Reply #105 - Posted
2014-03-18 06:28:21 » |
|
I honestly don't think we have to rename the engine 'MERC.ury' for it all to work out. There are a ton of other people using the name 'Mercury' for their game engines, and MERCury is something completely apart from that. I feel that case sensitivity should apply to this, and MERCury has 4 capitalised letters.
There's nothing she can really do as of right now. If you gave her a list of all other game engines named Mercury, and manage to find one made before hers, then maybe she'll change her mind. It all depends. I'll try to stay out of the situation and just work on other things that have to do with the engine itself.
- Jev
EDIT: It should probably be noted that MERCury is no longer named as a game engine but rather a game library, which I assume also contributes some to the issue. EDIT #2: It should also be noted that MERCury is no longer called MERCury, but just Mercury as of August 2014.
|
|
|
|
Drenius
|
 |
«
Reply #106 - Posted
2014-03-18 17:08:57 » |
|
That '.' is absolutely ugly.
|
|
|
|
kpars
|
 |
«
Reply #107 - Posted
2014-03-20 21:38:52 » |
|
Been working on the GUI a lot lately!
Plans for a default look & feel are set for the future, but as of right now nothing along those lines will come.
There's also a bug where the final words of a paragraph will be wrapped even where there's plenty of room for the. Other than that, It's going along pretty well! GUI stuff is much more fun to do than I thought it would be.
- Jev
|
|
|
|
saucymeatman
|
 |
«
Reply #108 - Posted
2014-03-30 19:59:37 » |
|
Thats the perfect use case for lambdas, your right...
That looks awsome though. Would you have to register each command you want, or could you just call methods by name?
|
|
|
|
Phibedy
|
 |
«
Reply #109 - Posted
2014-03-30 20:30:29 » |
|
we also have commandline. "[command] ? " is usefull. it says what type args should have. [command.part].? shows all commands that start with the command-part (Because we were to lazy to implement a preview  ) for example: debug.? shows debug.log, debug.drawfps, etc.
|
|
|
|
saucymeatman
|
 |
«
Reply #110 - Posted
2014-03-30 21:50:12 » |
|
Reflection is slow, and allows for alot of misuse, but if this is a debugging took than the person using it knows what they're doing. If its for also intended for an ingame console, you could maybe add in the disabling/enabling of reflection.
|
|
|
|
kingroka123
|
 |
«
Reply #111 - Posted
2014-03-31 02:36:16 » |
|
Maybe you should integrate a console window Like the Portal console that appears when you press the "`" key Console cmds: 1 2 3 4 5
| pause - pauses main thread resume- self explanatory getScreen - takes a shot of the window with the game in it, not the console widow or any other window getCpuData - prints how much cpu the program is using newInstance - creates a new instance of the program |
Just some ideas 
|
|
|
|
BurntPizza
|
 |
«
Reply #112 - Posted
2014-03-31 15:14:19 » |
|
Not entirely sure what exactly you're trying to accomplish (I'm short on time) but it sounds like you might be interested in the concept of a REPL.
|
|
|
|
Brynn
|
 |
«
Reply #113 - Posted
2014-04-01 13:04:59 » |
|
-snip- -wes  *Pinch nose* *Lowers nasal cavity* "Hay goys, weslwlsss heare"
|
Welcome to a new kind of tension All across the alienation Where everything isn't meant to be okay
|
|
|
kpars
|
 |
«
Reply #114 - Posted
2014-04-01 13:34:50 » |
|
[snip] -wes  Oh my god Wes, you're becoming Cas. - Jev 
|
|
|
|
SHC
|
 |
«
Reply #115 - Posted
2014-04-01 13:37:35 » |
|
Oh my god Wes, you're becoming Cas.
True 
|
|
|
|
saucymeatman
|
 |
«
Reply #116 - Posted
2014-04-01 22:55:13 » |
|
*Lame Joke*
I only wish there was a depreciate or -1
|
|
|
|
BurntPizza
|
 |
«
Reply #117 - Posted
2014-04-02 01:25:17 » |
|
A bit late, but I saw your (wes) post at the top of this page, there is no need for reflection, what you want is the (aptly named, no?) Command Pattern. Example usage: 1 2 3 4 5 6 7
|
while(input.hasMore()) { String cmdName = input.getNextToken(); Object[] args = input.processUntilEndOfLine(); commandMap.get(cmdName).execute(args); }
|
I will also add in variables soon as well. MAYBE you will be able to do math
Again, sounds like you want a REPL.
|
|
|
|
BurntPizza
|
 |
«
Reply #118 - Posted
2014-04-02 01:39:59 » |
|
You could also use Janino and use Java itself as your "scripting language," but it's likely overkill/not intuitive enough for users.
|
|
|
|
Opiop
|
 |
«
Reply #119 - Posted
2014-04-02 01:49:53 » |
|
Well I haven't posted in this thread for a while! Today I'm proud to present to you the new and improved Spritesheet class! Well what does it do, you may ask? Its simple really! First, you obtain or create a spritesheet, then you create a special text file that is parsed by MERCury in a specific and secret way. The information in that file is then used to split up the spritesheet into renderable sub-textures so that you (the MERCury user!) can use spritesheets with style and efficiency. But what's the best part about the new Spritesheet class? Well, read on to find out more! First lets talk about Spritesheets. Basically, you need two files. A image file (your spritesheet), and a specially designed text file. Lets take a look at the code: 1
| sheet = Spritesheet.loadSheet(Loader.loadFromClasspath("com/radirius/merc/test/tiles.txt"), Loader.streamFromClasspath("com/radirius/merc/test/tiles.png")); |
This line of code simply loads a spritesheet. The two parameters are the "special text file", and the spritesheet image file, respectively. After you have done this, you can render a sub-texture from that spritesheet like so: 1
| g.drawTexture(sheet.getTexture("Grass"), 10, 10, 128, 128); |
Incredibly easy! Now lets look at the special text file: 1 2 3
| HEADER 16 Void 0 0 Grass 1 0 |
Lets break this down. HEADER 16 basically means that on one side of the spritesheet, we have 16 sub-textures. Its VERY important you have a "square" spritesheet with the same width and height or else the entire Spritesheet class will fail  Void 0 0 "Void" is the name of the tile. 0 0 specifies that the sub-texture resides at position 0, 0 in the spritesheet. Positions are counted in increments of 1. Take a look at this example spritesheet:  The Grass tile is at (according to our special text file) position 1, 0. On the actual spritesheet you can see that the grass tile (the green square) is 1 tile over from the origin (in the top left hand corner). So, logically, the stone tile (the grey square) would be at position 2, 0. I will develop a GUI based tool that will speed up the process of creating these special text files, but for now they have to be created by hand! I am also aiming to support non-square sub-textures, but that will be down the road. On another note, I have also added the basics of IO with text files! More on that later though when it is actually complete. -Team Radirius (we have a new team name!)
|
|
|
|
|