Riven
|
 |
«
Reply #2010 - Posted
2015-03-30 07:25:08 » |
|
ASCII alt-codes aren't cross-platform.
I honestly did not know this, guess that explains why other java games (like minecraft) use characters like the &. It's all bits at one point. Once it's compiled, your String.indexOf('§') will just work. Load & save your text-files with the UTF-8 charset, and it's as cross-platform as it will ever be. There is no reason to limit yourself to ASCII. Having said that, I'd use ♥ as a delimiter.
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings!
|
|
|
Rayvolution
|
 |
«
Reply #2011 - Posted
2015-03-30 08:50:53 » |
|
Finally finished my new in-line string colors.. here's a bunch of pages that now use it.  In the first two screenshot here's the only method calls I have to do to draw the messages on-screen. It will be nightmare for third screenshot) it will be good to remove text and position GUI from code (also after some time it will be nightmare to change someting) +easy to add in game gui editor) 1 2 3 4
| font.drawString(x, y+86, "§YEL1Seriously are" + "\nyou §RED1ABSOLUTELY sure?" + "\n§WHI0THE OLD GAME WILL BE DELETED", 2, true); buttonReally.render(g, mouse, x-43, y+165, debug, false); |
will be good use relative position not absolute position to everything It actually both, you're just not seeing the rest of the code.  The smaller parts of the GUI that's positions should be absolute to each other are loaded in small groups, and then positioned on the screen with relative values. For example.. masterGUIClass: 1 2 3
| render(){ warningMessage.render(screenWidth/2, screenHeight/2); } |
inside warningMessage: 1 2 3 4 5
| render(float x, float y){ someElement1(x+15, y+50); someElement2(x+132, y+150); someElement2(x+126, y+266); } |
The real code is a lot more complicated, but that's the general idea. So basically everything inside the element is positioned with absolute values, but where the element is rendered is relative. I also have no intention on ever adding a GUI editor. Feature creep and what not.  (EDIT: Where did the post I replied to go?  )
|
|
|
|
Icecore
|
 |
«
Reply #2012 - Posted
2015-03-30 09:00:54 » |
|
(EDIT: Where did the post I replied to go?  ) Delete it) I suddenly understand that it will make more time to logical write what I mean relative position, And don’t what dispute in this thread) And as I can see you already do it right ^^ 1 2 3 4
| font.drawString(x, y+86, "§YEL1Seriously are" + "\nyou §RED1ABSOLUTELY sure?" + "\n§WHI0THE OLD GAME WILL BE DELETED", 2, true); buttonReally.render(g, mouse, x-43, y+165, debug, false); |
relative position == buttonReally Y pos(+165) will be same if text have 1 line or 10 (Or font change, or border Gui or Font Gui offset) =)
|
Last known State: Reassembled in Cyberspace End Transmission.... .. . Journey began Now)
|
|
|
Games published by our own members! Check 'em out!
|
|
Opiop
|
 |
«
Reply #2013 - Posted
2015-03-30 16:29:23 » |
|
Finally have a nice grasp on Gradle, started rebuilding my personal website and tried harder to learn JavaScript's different version of OOP. It's... quite different than anything I've ever seen, I hope I'll have that 'click!' moment soon when JavaScript actually makes sense.
Also, finally drove my 'new' car because I have insurance on it now. That was really fun, I'm impressed how well kept it was and how smooth it feels for a used old car! Insurance actually turned out to be not too terrible, it's $100/month, but my parents are helping me out a little still until I can get a better job and can actually afford all these things. Hopefully my internship wil pay well!
|
|
|
|
basil_
|
 |
«
Reply #2014 - Posted
2015-03-30 19:37:47 » |
|
i did renew my intellij idea subscription cos' it's a nice piece of software.
|
|
|
|
chrislo27
|
 |
«
Reply #2015 - Posted
2015-03-31 01:49:57 » |
|
I did networking code for my little game I'm making, specifically the handling of new entities, removed entities, and adding the player. Didn't test once during the 45 minute work period. Worked on second try (first try failed due to forgetting a world instance in Entity was transient). Being able to flag fields that shouldn't be sent over streams is awesome 
|
|
|
|
SauronWatchesYou
|
 |
«
Reply #2016 - Posted
2015-03-31 02:12:16 » |
|
|
Hey, you! Back to work
|
|
|
Opiop
|
 |
«
Reply #2017 - Posted
2015-03-31 19:04:09 » |
|
Delved into Apache Tomcat, and the wide world of Servlets. I feel a little lost, but I'm making headway! If anyone has any good blogposts or explanations of Servlets or Tomcat, I would definitely throw you a medal 
|
|
|
|
|
Longor1996
|
 |
«
Reply #2019 - Posted
2015-03-31 19:35:34 » |
|
I was bored and have a headache... so I wrote a tiny template library. Its only 150 lines of code and does exactly what I want and nothing else. It turns this: 1
| Hello, %{name}! How are you? I am %{feel}. |
Into this: 1
| Hello, You! How are you? I am fine. |
Within (edit) 0,0003 seconds 2 ms. Not that bad for a first try! (edit): And now you can look at the nightmare of code I created (just for fun)! http://pastebin.com/QHTbPAys
|
The cake is probably a lie... but it's a delicious lie!
|
|
|
Games published by our own members! Check 'em out!
|
|
Rayvolution
|
 |
«
Reply #2020 - Posted
2015-03-31 21:14:55 » |
|
Crystal Motivator coming along nicely. 
|
|
|
|
basil_
|
 |
«
Reply #2021 - Posted
2015-03-31 21:22:18 » |
|
too bad i cannot play it 
|
|
|
|
|
thedanisaur
|
 |
«
Reply #2023 - Posted
2015-04-01 09:19:30 » |
|
Was using a ray-triangle intersect algorithm for picking in my game. I noticed that it was taking 222ms to run, then I realized that I wrapped it in a quadruple for loop. So I converted my tile and patch double arrays to single ones. Then I subdivide my patch to determine which quadrant I'll be picking in(then subdivide that subdivision) and now I'm down to less than 1ms  .
|
Every village needs an idiot 
|
|
|
theagentd
|
 |
«
Reply #2024 - Posted
2015-04-01 10:48:07 » |
|
Was using a ray-triangle intersect algorithm for picking in my game. I noticed that it was taking 222ms to run, then I realized that I wrapped it in a quadruple for loop. So I converted my tile and patch double arrays to single ones. Then I subdivide my patch to determine which quadrant I'll be picking in(then subdivide that subdivision) and now I'm down to less than 1ms  . God, I love optimization success stories like this. =D
|
Myomyomyo.
|
|
|
ziozio
|
 |
«
Reply #2025 - Posted
2015-04-01 20:16:27 » |
|
Very nice! what strategy do you use for the flame generation? My current method is quite basic (texture billboarded and then put through a particle system animator)
|
|
|
|
ClaasJG
|
 |
«
Reply #2026 - Posted
2015-04-01 22:02:43 » |
|
I learned about this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| import java.lang.annotation.*; import java.util.Arrays;
public class Test { @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.METHOD }) private static @interface Interface { String[] value() default "test"; }
@Interface public static void main(final String... args) { System.out.println(Arrays.toString(Test.class.getMethods()[0] .getAnnotation(Interface.class).value())); } } |
-ClaasJG
|
My english has to be tweaked. Please show me my mistakes.
|
|
|
Ecumene
|
 |
«
Reply #2027 - Posted
2015-04-01 22:28:21 » |
|
I've been busy the past few weeks. - Got free unity pro accounts for my entire school - Made a website for my school's art club (prototype @ http://ecumene.xyz/th-art) - Installed Gnome Shell, Ubuntu and I3 on my desktop (why haven't I heard of this before?) - Made an arduino beep on button presses, and print the letter "A" on an LCD screen - Made a linux network with 3 other PCs in my house that are woken up through LAN for general purpose - Made floppy drive music w/ a 5v power supply & an arduino
|
|
|
|
Slyth2727
|
 |
«
Reply #2028 - Posted
2015-04-02 00:19:04 » |
|
Installed OSX on my laptop and got a 25 second Rubiks solve. Pushing to sub 20!
|
|
|
|
theagentd
|
 |
«
Reply #2029 - Posted
2015-04-02 00:25:27 » |
|
I did some optimizations on the whole engine, but realized that my performance values were being skewered. An updated APU limited shader with 20% fewer instructions was running at the same speed as the old one sometimes. Seems like my computer is so full of dust that my GPUs are reaching 80 degrees and reducing their turbo clock rates to prevent overheating. Gonna have to dust it out before I can get accurate measurements.
|
Myomyomyo.
|
|
|
Opiop
|
 |
«
Reply #2030 - Posted
2015-04-02 03:02:25 » |
|
I've been busy the past few weeks. - Got free unity pro accounts for my entire school - Made a website for my school's art club (prototype @ http://ecumene.xyz/th-art) - Installed Gnome Shell, Ubuntu and I3 on my desktop (why haven't I heard of this before?) - Made an arduino beep on button presses, and print the letter "A" on an LCD screen - Made a linux network with 3 other PCs in my house that are woken up through LAN for general purpose - Made floppy drive music w/ a 5v power supply & an arduino I like the website! Only thing I don't entirely like/looks weird to me is the really wide green contact button. I think it should be narrower! Good job 
|
|
|
|
NegativeZero
|
 |
«
Reply #2031 - Posted
2015-04-02 03:17:59 » |
|
Very nice! what strategy do you use for the flame generation? My current method is quite basic (texture billboarded and then put through a particle system animator) Oops, accidentally hit Appreciate instead of Quote. Anyway. My method is just to spawn untextured triangles that accelerate upwards and rotate. They have very low opacity so that you can only see colour when there's like 100 of them overlapping. Currently there will be ~1050 triangles at one time. It's a lot more visible when I turn up the opacity 
|
|
|
|
|
Ashedragon
|
 |
«
Reply #2033 - Posted
2015-04-02 04:20:11 » |
|
A bunch of GUI work and a cheesy CRT shader. Today I realized how much I freakin' love CRT shaders.
|
boo
|
|
|
SHC
|
 |
«
Reply #2034 - Posted
2015-04-02 16:17:21 » |
|
Added an earth texture in the background to Blox.  Also solved z-fighting and lighting issues now.
|
|
|
|
Roquen
|
 |
«
Reply #2035 - Posted
2015-04-03 04:05:37 » |
|
|
|
|
|
Rayvolution
|
 |
«
Reply #2036 - Posted
2015-04-03 07:56:23 » |
|
I've been reworking my path finding to give all terrain movement costs (no more blocked tiles) so in the future monsters can plow through terrain if they can't find a clear path. I had to basically completely rewrite my path finding algo to use true A* pathfinding to do it correctly. Here's a gfycat of the new algorithm in action (still not complete). The terrain cost on the rocks are a bit low for testing. The final idea/plan is generally, a monster will look for a path with no trees, rocks or other terrain. (These terrains will have an extremely high movement cost) If that path is not found (IE: You blocked in your whole village), it'll start tearing through the high movement cost tiles to get to you. http://gfycat.com/PortlyGentleBoaconstrictor
|
|
|
|
Gibbo3771
|
 |
«
Reply #2037 - Posted
2015-04-03 11:43:36 » |
|
I've been working on a project that was shelved back in November, I am doing a refactor and update on it and I was quite curious to just how flexible the Entity and Component code was.
So I made a new playable character that was literally a cloud, I was entertained for a whole 30 minutes just building playable objects.
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
Dev Crucio
|
 |
«
Reply #2038 - Posted
2015-04-03 16:58:07 » |
|
Added an earth texture in the background to Blox.
[...]
Also solved z-fighting and lighting issues now.
The platform where the red Block is standing on looks a bit weird on the left side no?
|
Twitch - See me developing CaveGear 
|
|
|
SHC
|
 |
«
Reply #2039 - Posted
2015-04-03 17:00:18 » |
|
@Dev Crucio
Are you referring to the cone on the platform? I use cones to change the direction of the camera. This is intentional.
|
|
|
|
|