goodpaul6

LD27

My First LD, Lets make it a good one…

This is my first ever post here,

And I am psyched to finally have a chance to be a part of LD, sadly I had exams during the previous one hindering me from participating.

Anyways, I am going to be using the following tools:

* Java

* Swing for the rendering

* My own base framework for all my sprite and level needs

* Lots and lots of Iced Cappuccinos.

Strategy:

* Spend more time on design

* Focus on creating the game as opposed to designing a good engine structure

* Exploit anything I can to reduce development time, given that the game will still run at around 60 fps on my 4 year old laptop

* Innovate (no infinite runner! NO!)

I hope I can finish something decent in time, maybe even get a trophy or something.
I’m also looking forward to all the entries from other contestants, some of the ones in the previous ld blew me away.

Thanks for reading,
Paul

Looks Like I will be using LibGDX instead of Java2D

LibGDX seems a lot more powerful.

I think I’ll stick with it since I do like the easy cross platform publishing capabilities. It also has a tonne of very useful features like SpriteBatch, which is essentially essential for any game. I could also go with LWJGL, but I don’t exactly have the experience necessary with the library.

What are you going to use and why?

Comments

JakeHorsfield
16. Aug 2013 · 14:46 UTC
I’m also going with LibGDX. It’s a great framework, I’m hoping to make my game run on the web too using LibGDX’s HTML5 applet thingy.

Help, Please!

I have recently been having this problem within my code (java) where subclasses of certain classes share variables with every other instance.

Ex.

public abstract class Entity
{
protected int x, y;
protected int xvel, yvel;

public void setVel(int x, int y)
{
xvel = x;
yvel = y;
}
}

public class Grass extends Entity
{
public void update()
{
x += xvel;
y += yvel;
}
}

in my level class I have a list of Grass objects and so I update them in a for loop, but what I notice is that if I do the following:

entities.get(0).setVel(10, 10);

every single grass object has its velocity set to 10, 10

Please help. I have been struggling with this for 2 days.

Comments

avh4
19. Aug 2013 · 01:22 UTC
What you’re describing should only be the case if xvel and yvel are declared as “static”, but the code above doesn’t have that. You must be setting the velocity of the other entities without realizing it. I’d be trying to set a breakpoint in setVel and see where (and with which objects) it’s actually getting called.
Adjotur
19. Aug 2013 · 01:23 UTC
Honestly I’m no expert at all, but I’ve had similar problems to this, and I think it may have to do with the creation of your entities in the list. Again, I’m still new to Java, but I think what could possibly be happening is they’re all the same object, if that makes any sense. What I’m trying to say is, is it possible that you have created one object, then inserted it into an array multiple times?
19. Aug 2013 · 01:32 UTC
Without seeing more of the code, I’d agree with Adjotur – what you think are multiple instances are all actually different references to one instance. Your debugger should give you an object ID, look at your list entries in the debugger and make sure the object ID is different for each entry in the list. Then take a look at how you’re creating and adding your entries to the list.
19. Aug 2013 · 01:36 UTC
Once you eliminate what’s impossible, whatever’s left, however improbable, is the truth.
goodpaul6
19. Aug 2013 · 02:02 UTC
That is a test to see whether setting the velocity of one instance sets the velocity of others.
19. Aug 2013 · 02:08 UTC
Ah ok, I see the problem, I think. First, check in the debugger that that one line, setVelocity(10, 10), indeed does cause the immediate setting of other objects’ velocities.
goodpaul6
19. Aug 2013 · 02:10 UTC
YOUUU ARE FREAKINGTHE MAN DUWDJXSofjaseoifsiodfj ahsfhsifhsa
19. Aug 2013 · 02:13 UTC
Glad I could help =D
goodpaul6
19. Aug 2013 · 02:17 UTC
I gotta submit a bug or something on that in the library because I used Vector2.Zero basically everywhere, and I don’t want anyone else to go through what I had to. Good thing eclipse has a restore from history utility, otherwise I wouldeve been here for a while.
19. Aug 2013 · 02:20 UTC
Given that you used it everywhere, I’m astonished that you’ve had so very problems thus far.

I’d just use Eclipse’s global replace and replace all of the Vector2.Zero’s to new Vector2(0,0)’s.
goodpaul6
19. Aug 2013 · 01:53 UTC
Looking at the debugger, all I see is that setVel is being called on one instance, the velocity is being set on each instance.
goodpaul6
19. Aug 2013 · 02:02 UTC
The velocity variables are acting as if they are static

Warning to libGdx users

Do not use Vector2.Zero to initialize Vector2 variables,
use new Vector2(0, 0);
Just, dont do it.

Comments

19. Aug 2013 · 02:42 UTC
Yeah I think it’s actually by design like that.

Overslept, But have a new, better idea.

It is 1 pm here and I was planning to wake up at 8 am. Clearly that didn’t work out, but now, I have a new Idea. Lets see if I can do a complete rewrite by the end of today. 😛

 

Some Progress

Being the pessimistic bastard that I am, I almost threw in the towel.

But then an idea struck me, and so did some art abilities (kinda) and thus, Use it wisely was created, and it was good.
I hope.

It’s core mechanic revolves around freezing time for a duration of up to 10 seconds in total per level. You could freeze time for three seconds, leaving you with 7 more for the rest of the level.

splash

screnshot2

Done yesterday, Writing a post now! LD48 #27 – Use it Wisely

Hello guys, I am new to this whole ludum dare thing, so I almost forgot to post that my game has been completed!

My game is called use it wisely, it is a puzzle platformer, where you are an assassin hunting the king, making your way through the dungeons in order to get to him. The unique thing is, you have been given a watch, not just any watch, but a time holder. It is a watch which can stop the world around you for up to 10 seconds, but you are limited to 10 seconds per level.

 

Say, you freeze time for 3 seconds in order to jump of the arrow that’s flying towards you, you only have 7 seconds worth of “time holding” left.

Try it for yourself and please rate and comment, I would love any feedback.

NOTE: PLEASE, PRETTY PLEASE, READ THE INSTRUCTIONS.

P.S ARROWS MAKE REALLY GOOD PLATFORMS WHEN FROZEN, AND FALLING TILES MAKE GOOD STAIRCASES WHEN FROZEN IN TIME AS WELL 😉

http://www.ludumdare.com/compo/ludum-dare-27/?action=preview&uid=25204

LD29

My Basecode… SFML and C++

My basecode can be found at this link:
It was done for a game I was working on prior to LD:
https://bitbucket.org/goodpaul6/the-vine