Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there anyone who is maintaining this library yet? #78

Open
dilo99 opened this issue Aug 9, 2023 · 2 comments
Open

is there anyone who is maintaining this library yet? #78

dilo99 opened this issue Aug 9, 2023 · 2 comments

Comments

@dilo99
Copy link

dilo99 commented Aug 9, 2023

Currently this library, in my opinion, is unusable with the latest versions of React Native. the fact that the example codes still use the classes and not the React functions already shows how old this library is. but then in the example codes no typescript is even used...
so I'm wondering, is there anyone maintaining this library, which everyone says is great, but as of today is unusable, is there?
Has anyone been able to use it with the latest versions of React Native and Typescript lately?
if yes can you share me a piece of code or an example project, because currently all the example codes on this official documentation don't work.
Thank you

@LinhLM23496
Copy link

same

@M-Jeremy
Copy link

M-Jeremy commented Sep 1, 2023

Still working with the quick start example (minimal example, JS), last RN & Expo version with react functions

  1. npx create-expo-app my-app
  2. Install RNGE
  3. Do the quick start example
  4. "Final" code :
import { StatusBar } from 'expo-status-bar'; 
import { StyleSheet, AppRegistry } from 'react-native';
import { GameEngine } from "react-native-game-engine";
import { Finger } from "./renderers";
import { MoveFinger } from "./systems";

export default function App(){
  return (
    <GameEngine
      style={styles.container}
      systems={[MoveFinger]}
      entities={{
        1: { position: [40, 200], renderer: <Finger /> }, //-- Notice that each entity has a unique id (required)
        2: { position: [100, 200], renderer: <Finger /> }, //-- and a renderer property (optional). If no renderer
        3: { position: [160, 200], renderer: <Finger /> }, //-- is supplied with the entity - it won't get displayed.
        4: { position: [220, 200], renderer: <Finger /> },
        5: { position: [280, 200], renderer: <Finger /> }
      }}>

      <StatusBar hidden={true} />

    </GameEngine>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },
});

AppRegistry.registerComponent("App", () => App);
  1. Start dev server
  2. Tested on iOS device with Expo Go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants