Skip to main content

Posts

Showing posts with the label game-development

Corona SDK free alternatives

I tried corona sdk free edition, i really liked it. The problem is, that im not so good developer to use corona paid edition for my small project, i'm aware that i'll not earn my money back. Are there any free alternatives, like Corona? I'd prefer lua scripting, proper IDE and some other cookies. Question two: Is there any way to publish app made with corona free edition on android market? Maybe there are some companies that provide publishing apps if i share my source with them. Source: Tips4all

How can you organize the code for a game to fit the MVC pattern?

I'm a freshman in college going for my computer science degree... I've programmed plenty the last several years but just lately I've been getting more into theoretical ideas about organizing code, design patterns, differences in languages, etc. I have a Java class, so I've dropped my C++ research/development and moved into Java and JOGL (Java OpenGL). It's wonderful! But that's beside the point. I want to make a small role-playing game, but this question really applies to any sort of game. How do you organize the game objects in a way that is structured, like the Model-View-Controller pattern? It looks to be an amazing pattern, very widely used and makes a lot of sense, but I'm having trouble figuring out how to implement it. For instance, I need to keep track of a GL object for drawing to the screen. I have to have classes that implement MouseListener, MouseMotionListener, MouseWheelListener, and KeyListener (or one class, an all-in-one input manage

I wrote a "Rock, Paper, Scissor, Shoot” game in one method using Java. I need help looping the program

I am able to loop the program, but each time I input a value it will return 2 values, the user winning and the user losing. I've experimented using multiple methods and creating a new class which was the tester, but had some problems figuring out the logic. As for loops, I have tried using a for loop, while, and do while. Thanks in advance! // Rock Paper Scissor Shoot Game import java.util.Random; import java.util.Scanner; public class RockPaperSciccor { public static void main(String[] args){ int wins = 0; int losses = 0; int rnd; for(rnd=0;rnd<=10;rnd++) { Random GAME = new Random(); int PC = 1+GAME.nextInt(3); Scanner input = new Scanner (System.in); int SCISSOR, ROCK, PAPER; SCISSOR = 1; ROCK = 2; PAPER = 3; System.out.println(""); System.out.println("Choose Your Weapon! "); System.out.println("1 = Scissor| 2 = Rock| 3 = Paper"); System.out.println(""); int USER

Is it possible to switch focus from one GLKview to another without reloading everything?

I am making an opengl 2.0 based game for iPad where I have added support for external displays. I want the game to be able to hot-swap between the local display and the external display. The issue I am experiencing is that as soon as I get a DrawInRect call to a newly created GLKview, belonging to a newly attached display, it seems all the shader programs and textures I set up in the old GLKview are no longer valid for the new GLKview. Will I need to recompile the shaders and reload all textures for new GLKview's? Or is there a better way to do it? I would really like to avoid having the game pause for 5-10 seconds while loading textures to the new display, especially since they are in fact already loaded and should be available somehow? Is there a way to transfer/share these data?

Making a dynamic sequence(in Java)

Hey guys im having a problem trying to program out a set of logic. I want to make a Go(the board game) problem. What i want my program to do is read in an xml file that represents a series of steps a person can make to complete the puzzle, or a even a dead end. So in the xml it would look something like <Step x="4" y="5"> <Response x="4" y="6" /> <Step x="3" y="6" victory="true"> </Step> </Step> <!-- This is a dead end --> <Step x="4" y="4"> <Response x="4" y="5" /> <Step x="5" y="5" defeat="true"></Step> <Step x="6" y="4" defeat="true"></Step> </Step> My thought is to make a link list of sorts where my xml handler(im using SAX) uses the step class to store a step inside a step, but i cant conceptualize how i would

Two random number generators (card dealing)

I need help with this part of my code. This part deals with generating 2 random numbers and using that random number to display a card in each of 2 label boxes simultaneously. The problem here is the random numbers are not getting generated properly and thus cards are not displayed properly (there is repetition, sometimes no display, etc) Basics of my code: Let us assume h, which is a variable from another part of the code, is any number between 1 and 53 (each number pertaining to a card). If the random number generated (non-repetition) matches the variable h the timer stops. So its basically like having a deck of cards and dealing out the cards evenly to 2 people, but here the dealing stops once a number pertaining to a card (number) randomly taken is matched. (l3,l4 are label names) Global variables: Random rng = new Random(); List<Integer> generated = new ArrayList<Integer>(); List<Integer> generated2 = new ArrayList<Integer>(); int l3coun