logo
down
shadow

What is the most efficient way to create a pixelated game with Kivy?


What is the most efficient way to create a pixelated game with Kivy?

By : also_taking_class
Date : November 15 2020, 06:54 AM
will help you This is a simple example of how I draw a pixelated image in my game:
code :
with self.canvas:
    Scale(6)
    self.pixelart = Rectangle(texture=texture, pos=(0, 0), size=(64, 64))


Share : facebook icon twitter icon
Kivy: How to make Kivy Pong Game to stop after maximum points reached?

Kivy: How to make Kivy Pong Game to stop after maximum points reached?


By : Abdur Rahim
Date : March 29 2020, 07:55 AM
help you fix your problem As this is for learning purpose, i won't give a solution, more like directions.
You want to have something happen when the score reach some number of points, kivy have the concepts of properties, and you can see scores are stored into NumericProperties, properties have the nice advantage that you can bind to them, that is, have actions happen when they change. (see http://kivy.org/docs/guide/events.html#introduction-to-properties). Or you can simply check the score after it's changed (each time a point is taken).
Most Efficient Way to Create a Game Level? (LibGDX)

Most Efficient Way to Create a Game Level? (LibGDX)


By : Vikas Tamang
Date : March 29 2020, 07:55 AM
it fixes the issue The answer is in your question : Tiled Map is easier and more convenient, text files are harder and less convenient then.
Instead of use text files with custom parsing, why not use standard well suited format like XML or JSON. Goos parser already exists for these formats.
Is there a more efficient way to create a counter for a quiz game using C?

Is there a more efficient way to create a counter for a quiz game using C?


By : Sriharan
Date : March 29 2020, 07:55 AM
To fix this issue Switch statements can be used when you need to check one variable against multiple values (as you do with your if ( questions == 0...5 ). In order not to rewrite the same questions over and over, we can use the way the switch statement naturally overruns into the next case to "cascade" depending on the number of questions we want.
Finally, as some other pointed out, we don't need to separate variables to track correct or incorrect answers; just track correct answers, and at the end the incorrect answers would equal questions - correct. Putting that all together, we have something that looks like this:
code :
int questions;
printf("Number of questions?\n");
scanf("%d",&questions);

int correct = 0;
int answer = 0;

switch(questions) {
    case 5:
        printf("What is 2 + 2?\n");
        scanf("%d",&answer);
        if(answer == 4)       
        {
            correct++;
        }
        //note - no break at end of each case
    case 4:
        //ask another question
    case 3:
        //ask another question
    case 2:
        //ask another question
    case 1:
        //ask another question
    default:
        break;
}
printf("Results:\nCorrect = %d\nIncorrect = %d", correct, questions - correct);
Create a Game start menu using Python kivy

Create a Game start menu using Python kivy


By : user3342543
Date : March 29 2020, 07:55 AM
help you fix your problem To get resizable Widgets, the easiest way is to use size_hint rather than size. Then Kivy will adjust the sizes of things for you. Also, in order to get a background image, you can use Rectangle and provide an image as the source. Here is a modification of your code using the ideas I mentioned:
code :
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.lang import Builder

Builder.load_string('''
<style>:
    canvas.before:
        Rectangle:
            pos: self.pos
            size: self.size
            source: "round.png"
    BoxLayout:
        orientation: "vertical"
        pos_hint: {'center_x': 0.5, 'top':1.0}
        size_hint: 0.25, 0.25
        Button:
            text:"Start Game"
        Button:
            text:"Exit"
        Button:
            text:"About"      
 ''')


class style(FloatLayout):
    pass


class MyApp(App):
    def build(self):
        return style()


if __name__=="__main__" :
    MyApp().run()
What is a good game engine for a pixelated 2D game?

What is a good game engine for a pixelated 2D game?


By : Michael Fedorchenko
Date : March 29 2020, 07:55 AM
This might help you XNA would be perfect for this, although if you want to use .NET 4.5 you will have to go through some minor annoyances to get it running in visual studio 2012 and .net 4.5
Another (better in my opinion) alternative is SharpDX. SharpDX is primarily a very well built managed DirectX API, built directly from the header files of the native DirectX. SharpDX includes a collection of additional assemblies called "Toolkit.{namespace name here}" that provide exactly what XNA provided, but in most cases, much more ideal. Should be noted that the toolkit class designs were based off the structuring of the XNA framework. SharpDX will require you to have an understanding of DirectX to take full advantage of it's capabilities, but you won't find this much capability in ANY other managed DirectX wrapper. Period (yes that's counting SlimDX as well).
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org